copy-eflags-liveinlists.mir
2.95 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# RUN: llc -mtriple=i686-unknown-unknown -run-pass=x86-flags-copy-lowering \
# RUN: -print-after=x86-flags-copy-lowering %s -o - | FileCheck %s
#
# Check that $eflags is removed from live-in lists of successor blocks.
#
# CHECK-NOT: liveins: $eflags
--- |
define void @fun(i16 %arg, i64 %arg1, i8 %arg2, i8* %arg3, i32 %arg4) { ret void}
...
---
name: fun
alignment: 16
tracksRegLiveness: true
registers:
- { id: 0, class: gr16 }
- { id: 1, class: gr16 }
- { id: 2, class: gr16 }
- { id: 3, class: gr32 }
- { id: 4, class: gr32 }
- { id: 5, class: gr8 }
- { id: 6, class: gr32 }
- { id: 7, class: gr32 }
- { id: 8, class: gr32 }
- { id: 9, class: gr32 }
- { id: 10, class: gr32 }
- { id: 11, class: gr32 }
- { id: 12, class: gr32 }
- { id: 13, class: gr8 }
- { id: 14, class: gr32 }
- { id: 15, class: gr32 }
- { id: 16, class: gr32_abcd }
- { id: 17, class: gr8 }
- { id: 18, class: gr8 }
- { id: 19, class: gr32 }
- { id: 20, class: gr32 }
frameInfo:
maxAlignment: 4
fixedStack:
- { id: 0, offset: 20, size: 4, alignment: 4, isImmutable: true }
- { id: 1, offset: 16, size: 4, alignment: 4, isImmutable: true }
- { id: 2, offset: 12, size: 1, alignment: 4, isImmutable: true }
- { id: 3, offset: 8, size: 4, alignment: 4, isImmutable: true }
- { id: 4, offset: 4, size: 4, alignment: 4, isImmutable: true }
- { id: 5, size: 2, alignment: 4, isImmutable: true }
machineFunctionInfo: {}
body: |
bb.0:
%4:gr32 = MOV32rm %fixed-stack.3, 1, $noreg, 0, $noreg :: (load 4 from %fixed-stack.3)
%3:gr32 = MOV32rm %fixed-stack.4, 1, $noreg, 0, $noreg :: (load 4 from %fixed-stack.4)
%7:gr32 = MOV32rm %fixed-stack.0, 1, $noreg, 0, $noreg :: (load 4 from %fixed-stack.0)
%6:gr32 = MOV32rm %fixed-stack.1, 1, $noreg, 0, $noreg :: (load 4 from %fixed-stack.1)
%5:gr8 = MOV8rm %fixed-stack.2, 1, $noreg, 0, $noreg :: (load 1 from %fixed-stack.2, align 4)
%9:gr32 = IMPLICIT_DEF
%11:gr32 = IMPLICIT_DEF
bb.1:
successors: %bb.2, %bb.3
CMP32rr %3, %9, implicit-def $eflags
%10:gr32 = SBB32rr %4, %11, implicit-def $eflags, implicit $eflags
%12:gr32 = COPY $eflags
%13:gr8 = SETCCr 12, implicit $eflags
%14:gr32 = MOVZX32rr8 killed %13
%15:gr32 = NEG32r %14, implicit-def dead $eflags
%16:gr32_abcd = MOV32r0 implicit-def dead $eflags
$eflags = COPY %12
%17:gr8 = COPY %16.sub_8bit
JCC_1 %bb.3, 12, implicit $eflags
bb.2:
liveins: $eflags
bb.3:
successors: %bb.4, %bb.5
liveins: $eflags
%18:gr8 = PHI %5, %bb.2, %17, %bb.1
MOV8mr %6, 1, $noreg, 0, $noreg, killed %18 :: (volatile store 1 into %ir.arg3)
JCC_1 %bb.5, 12, implicit $eflags
bb.4:
bb.5:
%19:gr32 = PHI %16, %bb.4, %15, %bb.3
$eax = COPY %7
CDQ implicit-def $eax, implicit-def $edx, implicit $eax
IDIV32r killed %19, implicit-def dead $eax, implicit-def $edx, implicit-def dead $eflags, implicit $eax, implicit $edx
JMP_1 %bb.1
...