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 }
47 successors: [ '%bb.2.exit', '%bb.1.less' ]
49 # CHECK: %0 = COPY %edi
50 # CHECK-NEXT: %1 = SUB32ri8 %0, 10
53 - '%1 = SUB32ri8 %0, 10, implicit-def %eflags'
54 - 'JG_1 %bb.2.exit, implicit %eflags'
59 # CHECK-NEXT: %eax = COPY %2
61 - '%2 = MOV32r0 implicit-def %eflags'
73 tracksRegLiveness: true
76 # CHECK-NEXT: - { id: 0, class: gr32 }
77 # CHECK-NEXT: - { id: 1, class: gr32 }
78 # CHECK-NEXT: - { id: 2, class: gr32 }
80 - { id: 2, class: gr32 }
81 - { id: 0, class: gr32 }
82 - { id: 10, class: gr32 }
86 successors: [ '%bb.2.exit', '%bb.1.less' ]
88 # CHECK: %0 = COPY %edi
89 # CHECK-NEXT: %1 = SUB32ri8 %0, 10
92 - '%0 = SUB32ri8 %2, 10, implicit-def %eflags'
93 - 'JG_1 %bb.2.exit, implicit %eflags'
98 # CHECK-NEXT: %eax = COPY %2
100 - '%10 = MOV32r0 implicit-def %eflags'
105 # CHECK: %eax = COPY %0