subreg-to-reg-4.ll
5.78 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc < %s -mtriple=x86_64-- | FileCheck %s
; Utilize implicit zero-extension on x86-64 to eliminate explicit
; zero-extensions. Shrink 64-bit adds to 32-bit when the high
; 32-bits will be zeroed.
define void @bar(i64 %x, i64 %y, i64* %z) nounwind readnone {
; CHECK-LABEL: bar:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: addl %esi, %edi
; CHECK-NEXT: movq %rdi, (%rdx)
; CHECK-NEXT: retq
entry:
%t0 = add i64 %x, %y
%t1 = and i64 %t0, 4294967295
store i64 %t1, i64* %z
ret void
}
define void @easy(i32 %x, i32 %y, i64* %z) nounwind readnone {
; CHECK-LABEL: easy:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: # kill: def $edi killed $edi def $rdi
; CHECK-NEXT: addl %esi, %edi
; CHECK-NEXT: movq %rdi, (%rdx)
; CHECK-NEXT: retq
entry:
%t0 = add i32 %x, %y
%tn = zext i32 %t0 to i64
%t1 = and i64 %tn, 4294967295
store i64 %t1, i64* %z
ret void
}
define void @cola(i64 *%x, i64 %y, i64* %z, i64 %u) nounwind readnone {
; CHECK-LABEL: cola:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: addl (%rdi), %esi
; CHECK-NEXT: xorq %rcx, %rsi
; CHECK-NEXT: movq %rsi, (%rdx)
; CHECK-NEXT: retq
entry:
%p = load i64, i64* %x
%t0 = add i64 %p, %y
%t1 = and i64 %t0, 4294967295
%t2 = xor i64 %t1, %u
store i64 %t2, i64* %z
ret void
}
define void @yaks(i64 *%x, i64 %y, i64* %z, i64 %u) nounwind readnone {
; CHECK-LABEL: yaks:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: addl (%rdi), %esi
; CHECK-NEXT: xorl %esi, %ecx
; CHECK-NEXT: movq %rcx, (%rdx)
; CHECK-NEXT: retq
entry:
%p = load i64, i64* %x
%t0 = add i64 %p, %y
%t1 = xor i64 %t0, %u
%t2 = and i64 %t1, 4294967295
store i64 %t2, i64* %z
ret void
}
define void @foo(i64 *%x, i64 *%y, i64* %z) nounwind readnone {
; CHECK-LABEL: foo:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: movl (%rdi), %eax
; CHECK-NEXT: addl (%rsi), %eax
; CHECK-NEXT: movq %rax, (%rdx)
; CHECK-NEXT: retq
entry:
%a = load i64, i64* %x
%b = load i64, i64* %y
%t0 = add i64 %a, %b
%t1 = and i64 %t0, 4294967295
store i64 %t1, i64* %z
ret void
}
define void @avo(i64 %x, i64* %z, i64 %u) nounwind readnone {
; CHECK-LABEL: avo:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: addl $734847, %edi # imm = 0xB367F
; CHECK-NEXT: xorq %rdx, %rdi
; CHECK-NEXT: movq %rdi, (%rsi)
; CHECK-NEXT: retq
entry:
%t0 = add i64 %x, 734847
%t1 = and i64 %t0, 4294967295
%t2 = xor i64 %t1, %u
store i64 %t2, i64* %z
ret void
}
define void @phe(i64 %x, i64* %z, i64 %u) nounwind readnone {
; CHECK-LABEL: phe:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: addl $734847, %edi # imm = 0xB367F
; CHECK-NEXT: xorl %edi, %edx
; CHECK-NEXT: movq %rdx, (%rsi)
; CHECK-NEXT: retq
entry:
%t0 = add i64 %x, 734847
%t1 = xor i64 %t0, %u
%t2 = and i64 %t1, 4294967295
store i64 %t2, i64* %z
ret void
}
define void @oze(i64 %y, i64* %z) nounwind readnone {
; CHECK-LABEL: oze:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: incl %edi
; CHECK-NEXT: movq %rdi, (%rsi)
; CHECK-NEXT: retq
entry:
%t0 = add i64 %y, 1
%t1 = and i64 %t0, 4294967295
store i64 %t1, i64* %z
ret void
}
define void @sbar(i64 %x, i64 %y, i64* %z) nounwind readnone {
; CHECK-LABEL: sbar:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: subl %esi, %edi
; CHECK-NEXT: movq %rdi, (%rdx)
; CHECK-NEXT: retq
entry:
%t0 = sub i64 %x, %y
%t1 = and i64 %t0, 4294967295
store i64 %t1, i64* %z
ret void
}
define void @seasy(i32 %x, i32 %y, i64* %z) nounwind readnone {
; CHECK-LABEL: seasy:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: # kill: def $edi killed $edi def $rdi
; CHECK-NEXT: subl %esi, %edi
; CHECK-NEXT: movq %rdi, (%rdx)
; CHECK-NEXT: retq
entry:
%t0 = sub i32 %x, %y
%tn = zext i32 %t0 to i64
%t1 = and i64 %tn, 4294967295
store i64 %t1, i64* %z
ret void
}
define void @scola(i64 *%x, i64 %y, i64* %z, i64 %u) nounwind readnone {
; CHECK-LABEL: scola:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: movl (%rdi), %eax
; CHECK-NEXT: subl %esi, %eax
; CHECK-NEXT: xorq %rcx, %rax
; CHECK-NEXT: movq %rax, (%rdx)
; CHECK-NEXT: retq
entry:
%p = load i64, i64* %x
%t0 = sub i64 %p, %y
%t1 = and i64 %t0, 4294967295
%t2 = xor i64 %t1, %u
store i64 %t2, i64* %z
ret void
}
define void @syaks(i64 *%x, i64 %y, i64* %z, i64 %u) nounwind readnone {
; CHECK-LABEL: syaks:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: movl (%rdi), %eax
; CHECK-NEXT: subl %esi, %eax
; CHECK-NEXT: xorl %eax, %ecx
; CHECK-NEXT: movq %rcx, (%rdx)
; CHECK-NEXT: retq
entry:
%p = load i64, i64* %x
%t0 = sub i64 %p, %y
%t1 = xor i64 %t0, %u
%t2 = and i64 %t1, 4294967295
store i64 %t2, i64* %z
ret void
}
define void @sfoo(i64 *%x, i64 *%y, i64* %z) nounwind readnone {
; CHECK-LABEL: sfoo:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: movl (%rdi), %eax
; CHECK-NEXT: subl (%rsi), %eax
; CHECK-NEXT: movq %rax, (%rdx)
; CHECK-NEXT: retq
entry:
%a = load i64, i64* %x
%b = load i64, i64* %y
%t0 = sub i64 %a, %b
%t1 = and i64 %t0, 4294967295
store i64 %t1, i64* %z
ret void
}
define void @swya(i64 %y, i64* %z) nounwind readnone {
; CHECK-LABEL: swya:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: negl %edi
; CHECK-NEXT: movq %rdi, (%rsi)
; CHECK-NEXT: retq
entry:
%t0 = sub i64 0, %y
%t1 = and i64 %t0, 4294967295
store i64 %t1, i64* %z
ret void
}
define void @soze(i64 %y, i64* %z) nounwind readnone {
; CHECK-LABEL: soze:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: decl %edi
; CHECK-NEXT: movq %rdi, (%rsi)
; CHECK-NEXT: retq
entry:
%t0 = sub i64 %y, 1
%t1 = and i64 %t0, 4294967295
store i64 %t1, i64* %z
ret void
}