1 # RUN: llc -march=x86-64 -start-after machine-sink -stop-after machine-sink -o /dev/null %s | FileCheck %s
2 # This test ensures that the MIR parser parses virtual register definitions and
3 # references correctly.
7 define i32 @bar(i32 %a) {
9 %0 = icmp sle i32 %a, 10
10 br i1 %0, label %less, label %exit
19 define i32 @foo(i32 %a) {
21 %0 = icmp sle i32 %a, 10
22 br i1 %0, label %less, label %exit
35 tracksRegLiveness: true
37 # CHECK-NEXT: - { id: 0, class: gr32 }
38 # CHECK-NEXT: - { id: 1, class: gr32 }
39 # CHECK-NEXT: - { id: 2, class: gr32 }
41 - { id: 0, class: gr32 }
42 - { id: 1, class: gr32 }
43 - { id: 2, class: gr32 }
46 successors: %bb.2.exit, %bb.1.less
48 ; CHECK: %0 = COPY %edi
49 ; CHECK-NEXT: %1 = SUB32ri8 %0, 10
51 %1 = SUB32ri8 %0, 10, implicit-def %eflags
52 JG_1 %bb.2.exit, implicit %eflags
57 ; CHECK-NEXT: %eax = COPY %2
58 %2 = MOV32r0 implicit-def %eflags
69 tracksRegLiveness: true
72 # CHECK-NEXT: - { id: 0, class: gr32 }
73 # CHECK-NEXT: - { id: 1, class: gr32 }
74 # CHECK-NEXT: - { id: 2, class: gr32 }
76 - { id: 2, class: gr32 }
77 - { id: 0, class: gr32 }
78 - { id: 10, class: gr32 }
81 successors: %bb.2.exit, %bb.1.less
83 ; CHECK: %0 = COPY %edi
84 ; CHECK-NEXT: %1 = SUB32ri8 %0, 10
86 %0 = SUB32ri8 %2, 10, implicit-def %eflags
87 JG_1 %bb.2.exit, implicit %eflags
92 ; CHECK-NEXT: %eax = COPY %2
93 %10 = MOV32r0 implicit-def %eflags
98 ; CHECK: %eax = COPY %0