1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
|
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 5
# RUN: llc -mtriple=aarch64-none-linux-gnu -run-pass machine-cp -verify-machineinstrs -o - %s | FileCheck %s
# Normal case
---
name: test1
body: |
bb.0:
liveins: $w2
; CHECK-LABEL: name: test1
; CHECK: liveins: $w2
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: renamable $w0 = MOVi32imm 5
; CHECK-NEXT: renamable $w3 = ADDWrr renamable $w0, killed renamable $w2
; CHECK-NEXT: RET_ReallyLR implicit killed $w0
renamable $w1 = MOVi32imm 5
renamable $w3 = ADDWrr renamable $w1, killed renamable $w2
renamable $w0 = COPY killed renamable $w1
RET_ReallyLR implicit killed $w0
...
# Not renamable use
---
name: test2
body: |
bb.0:
liveins: $w2
; CHECK-LABEL: name: test2
; CHECK: liveins: $w2
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: renamable $w1 = MOVi32imm 5
; CHECK-NEXT: renamable $w3 = ADDWrr $w1, killed renamable $w2
; CHECK-NEXT: renamable $w0 = COPY killed renamable $w1
; CHECK-NEXT: RET_ReallyLR implicit killed $w0
renamable $w1 = MOVi32imm 5
renamable $w3 = ADDWrr $w1, killed renamable $w2
renamable $w0 = COPY killed renamable $w1
RET_ReallyLR implicit killed $w0
...
# Implicit use
---
name: test3
body: |
bb.0:
liveins: $w2
; CHECK-LABEL: name: test3
; CHECK: liveins: $w2
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: renamable $w1 = MOVi32imm 5
; CHECK-NEXT: renamable $w3 = ADDWrr renamable $w1, killed renamable $w2, implicit $w1
; CHECK-NEXT: renamable $w0 = COPY killed renamable $w1
; CHECK-NEXT: RET_ReallyLR implicit killed $w0
renamable $w1 = MOVi32imm 5
renamable $w3 = ADDWrr renamable $w1, killed renamable $w2, implicit $w1
renamable $w0 = COPY killed renamable $w1
RET_ReallyLR implicit killed $w0
...
|