• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# RUN: llc -march=x86-64 -run-pass none -o - %s | FileCheck %s
2
3--- |
4
5  define i32 @foo(i32 %a) {
6  entry:
7    %0 = icmp sle i32 %a, 10
8    br i1 %0, label %less, label %exit
9
10  less:
11    ret i32 0
12
13  exit:
14    ret i32 %a
15  }
16
17  define i32 @bar(i32 %a) {
18  entry:
19    %0 = icmp sle i32 %a, 10
20    br i1 %0, label %less, label %exit
21
22  less:
23    ret i32 0
24
25  exit:
26    ret i32 %a
27  }
28
29...
30---
31name:            foo
32tracksRegLiveness: true
33liveins:
34  - { reg: '$edi' }
35# CHECK-LABEL: name: foo
36# CHECK: body: |
37# CHECK-NEXT: bb.0.entry:
38# CHECK-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
39# CHECK-NEXT: liveins: $edi
40# CHECK:      CMP32ri8 $edi, 10, implicit-def $eflags
41# CHECK-NEXT: JCC_1 %bb.2, 15, implicit killed $eflags
42
43# CHECK:      bb.1.less:
44# CHECK-NEXT: $eax = MOV32r0 implicit-def dead $eflags
45# CHECK-NEXT: RETQ killed $eax
46
47# CHECK:      bb.2.exit:
48# CHECK-NEXT: liveins: $edi
49# CHECK:      $eax = COPY killed $edi
50# CHECK-NEXT: RETQ killed $eax
51body: |
52  bb.0.entry:
53    successors: %bb.1, %bb.2
54
55    liveins: $edi
56
57    CMP32ri8 $edi, 10, implicit-def $eflags
58
59    JCC_1 %bb.2, 15, implicit killed $eflags
60
61  bb.1.less:
62
63
64    $eax = MOV32r0 implicit-def dead $eflags
65    RETQ killed $eax
66  bb.2.exit:
67
68
69    liveins: $edi
70    $eax = COPY killed $edi
71    RETQ killed $eax
72
73...
74---
75name:            bar
76tracksRegLiveness: true
77liveins:
78  - { reg: '$edi' }
79# CHECK-LABEL: name: bar
80# CHECK: body: |
81# CHECK-NEXT: bb.0.entry:
82# CHECK-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
83# CHECK-NEXT: liveins: $edi
84# CHECK:      CMP32ri8 $edi, 10, implicit-def $eflags
85# CHECK-NEXT: JCC_1 %bb.2, 15, implicit killed $eflags
86
87# CHECK:      bb.1.less:
88# CHECK-NEXT: $eax = MOV32r0 implicit-def dead $eflags
89# CHECK-NEXT: RETQ killed $eax
90
91# CHECK:      bb.2.exit:
92# CHECK-NEXT: liveins: $edi
93# CHECK:      $eax = COPY killed $edi
94# CHECK-NEXT: RETQ killed $eax
95body: |
96
97  bb.0.entry:
98    successors: %bb.1, %bb.2
99    liveins: $edi
100    CMP32ri8 $edi, 10, implicit-def $eflags
101    JCC_1 %bb.2, 15, implicit killed $eflags
102  bb.1.less:  $eax = MOV32r0 implicit-def dead $eflags
103              RETQ killed $eax
104
105  bb.2.exit:  liveins: $edi
106    $eax = COPY killed $edi
107    RETQ killed $eax
108
109...
110