@@ -14,12 +14,11 @@ define i16 @cmov_zpromotion_8_to_16(i1 %c) {
14
14
;
15
15
; NO_CMOV-LABEL: cmov_zpromotion_8_to_16:
16
16
; NO_CMOV: # %bb.0:
17
- ; NO_CMOV-NEXT: testb $1, {{[0-9]+}}(%esp)
18
- ; NO_CMOV-NEXT: movl $117, %eax
19
- ; NO_CMOV-NEXT: jne .LBB0_2
20
- ; NO_CMOV-NEXT: # %bb.1:
21
- ; NO_CMOV-NEXT: movl $237, %eax
22
- ; NO_CMOV-NEXT: .LBB0_2:
17
+ ; NO_CMOV-NEXT: movzbl {{[0-9]+}}(%esp), %eax
18
+ ; NO_CMOV-NEXT: andl $1, %eax
19
+ ; NO_CMOV-NEXT: negl %eax
20
+ ; NO_CMOV-NEXT: andl $152, %eax
21
+ ; NO_CMOV-NEXT: xorl $237, %eax
23
22
; NO_CMOV-NEXT: # kill: def $ax killed $ax killed $eax
24
23
; NO_CMOV-NEXT: retl
25
24
%t0 = select i1 %c , i8 117 , i8 -19
@@ -38,12 +37,11 @@ define i32 @cmov_zpromotion_8_to_32(i1 %c) {
38
37
;
39
38
; NO_CMOV-LABEL: cmov_zpromotion_8_to_32:
40
39
; NO_CMOV: # %bb.0:
41
- ; NO_CMOV-NEXT: testb $1, {{[0-9]+}}(%esp)
42
- ; NO_CMOV-NEXT: movl $126, %eax
43
- ; NO_CMOV-NEXT: jne .LBB1_2
44
- ; NO_CMOV-NEXT: # %bb.1:
45
- ; NO_CMOV-NEXT: movl $255, %eax
46
- ; NO_CMOV-NEXT: .LBB1_2:
40
+ ; NO_CMOV-NEXT: movzbl {{[0-9]+}}(%esp), %eax
41
+ ; NO_CMOV-NEXT: andl $1, %eax
42
+ ; NO_CMOV-NEXT: negl %eax
43
+ ; NO_CMOV-NEXT: andl $129, %eax
44
+ ; NO_CMOV-NEXT: xorl $255, %eax
47
45
; NO_CMOV-NEXT: retl
48
46
%t0 = select i1 %c , i8 12414 , i8 -1
49
47
%ret = zext i8 %t0 to i32
@@ -61,12 +59,11 @@ define i64 @cmov_zpromotion_8_to_64(i1 %c) {
61
59
;
62
60
; NO_CMOV-LABEL: cmov_zpromotion_8_to_64:
63
61
; NO_CMOV: # %bb.0:
64
- ; NO_CMOV-NEXT: testb $1, {{[0-9]+}}(%esp)
65
- ; NO_CMOV-NEXT: movl $126, %eax
66
- ; NO_CMOV-NEXT: jne .LBB2_2
67
- ; NO_CMOV-NEXT: # %bb.1:
68
- ; NO_CMOV-NEXT: movl $255, %eax
69
- ; NO_CMOV-NEXT: .LBB2_2:
62
+ ; NO_CMOV-NEXT: movzbl {{[0-9]+}}(%esp), %eax
63
+ ; NO_CMOV-NEXT: andl $1, %eax
64
+ ; NO_CMOV-NEXT: negl %eax
65
+ ; NO_CMOV-NEXT: andl $129, %eax
66
+ ; NO_CMOV-NEXT: xorl $255, %eax
70
67
; NO_CMOV-NEXT: xorl %edx, %edx
71
68
; NO_CMOV-NEXT: retl
72
69
%t0 = select i1 %c , i8 12414 , i8 -1
@@ -85,12 +82,11 @@ define i32 @cmov_zpromotion_16_to_32(i1 %c) {
85
82
;
86
83
; NO_CMOV-LABEL: cmov_zpromotion_16_to_32:
87
84
; NO_CMOV: # %bb.0:
88
- ; NO_CMOV-NEXT: testb $1, {{[0-9]+}}(%esp)
89
- ; NO_CMOV-NEXT: movl $12414, %eax # imm = 0x307E
90
- ; NO_CMOV-NEXT: jne .LBB3_2
91
- ; NO_CMOV-NEXT: # %bb.1:
92
- ; NO_CMOV-NEXT: movl $65535, %eax # imm = 0xFFFF
93
- ; NO_CMOV-NEXT: .LBB3_2:
85
+ ; NO_CMOV-NEXT: movzbl {{[0-9]+}}(%esp), %eax
86
+ ; NO_CMOV-NEXT: andl $1, %eax
87
+ ; NO_CMOV-NEXT: negl %eax
88
+ ; NO_CMOV-NEXT: andl $53121, %eax # imm = 0xCF81
89
+ ; NO_CMOV-NEXT: xorl $65535, %eax # imm = 0xFFFF
94
90
; NO_CMOV-NEXT: retl
95
91
%t0 = select i1 %c , i16 12414 , i16 -1
96
92
%ret = zext i16 %t0 to i32
@@ -108,12 +104,11 @@ define i64 @cmov_zpromotion_16_to_64(i1 %c) {
108
104
;
109
105
; NO_CMOV-LABEL: cmov_zpromotion_16_to_64:
110
106
; NO_CMOV: # %bb.0:
111
- ; NO_CMOV-NEXT: testb $1, {{[0-9]+}}(%esp)
112
- ; NO_CMOV-NEXT: movl $12414, %eax # imm = 0x307E
113
- ; NO_CMOV-NEXT: jne .LBB4_2
114
- ; NO_CMOV-NEXT: # %bb.1:
115
- ; NO_CMOV-NEXT: movl $65535, %eax # imm = 0xFFFF
116
- ; NO_CMOV-NEXT: .LBB4_2:
107
+ ; NO_CMOV-NEXT: movzbl {{[0-9]+}}(%esp), %eax
108
+ ; NO_CMOV-NEXT: andl $1, %eax
109
+ ; NO_CMOV-NEXT: negl %eax
110
+ ; NO_CMOV-NEXT: andl $53121, %eax # imm = 0xCF81
111
+ ; NO_CMOV-NEXT: xorl $65535, %eax # imm = 0xFFFF
117
112
; NO_CMOV-NEXT: xorl %edx, %edx
118
113
; NO_CMOV-NEXT: retl
119
114
%t0 = select i1 %c , i16 12414 , i16 -1
@@ -132,12 +127,11 @@ define i64 @cmov_zpromotion_32_to_64(i1 %c) {
132
127
;
133
128
; NO_CMOV-LABEL: cmov_zpromotion_32_to_64:
134
129
; NO_CMOV: # %bb.0:
135
- ; NO_CMOV-NEXT: testb $1, {{[0-9]+}}(%esp)
136
- ; NO_CMOV-NEXT: movl $12414, %eax # imm = 0x307E
137
- ; NO_CMOV-NEXT: jne .LBB5_2
138
- ; NO_CMOV-NEXT: # %bb.1:
139
- ; NO_CMOV-NEXT: movl $43107, %eax # imm = 0xA863
140
- ; NO_CMOV-NEXT: .LBB5_2:
130
+ ; NO_CMOV-NEXT: movzbl {{[0-9]+}}(%esp), %eax
131
+ ; NO_CMOV-NEXT: andl $1, %eax
132
+ ; NO_CMOV-NEXT: negl %eax
133
+ ; NO_CMOV-NEXT: andl $38941, %eax # imm = 0x981D
134
+ ; NO_CMOV-NEXT: xorl $43107, %eax # imm = 0xA863
141
135
; NO_CMOV-NEXT: xorl %edx, %edx
142
136
; NO_CMOV-NEXT: retl
143
137
%t0 = select i1 %c , i32 12414 , i32 43107
@@ -157,12 +151,11 @@ define i16 @cmov_spromotion_8_to_16(i1 %c) {
157
151
;
158
152
; NO_CMOV-LABEL: cmov_spromotion_8_to_16:
159
153
; NO_CMOV: # %bb.0:
160
- ; NO_CMOV-NEXT: testb $1, {{[0-9]+}}(%esp)
161
- ; NO_CMOV-NEXT: movl $117, %eax
162
- ; NO_CMOV-NEXT: jne .LBB6_2
163
- ; NO_CMOV-NEXT: # %bb.1:
164
- ; NO_CMOV-NEXT: movl $65517, %eax # imm = 0xFFED
165
- ; NO_CMOV-NEXT: .LBB6_2:
154
+ ; NO_CMOV-NEXT: movzbl {{[0-9]+}}(%esp), %eax
155
+ ; NO_CMOV-NEXT: andl $1, %eax
156
+ ; NO_CMOV-NEXT: negl %eax
157
+ ; NO_CMOV-NEXT: andl $-104, %eax
158
+ ; NO_CMOV-NEXT: xorl $65517, %eax # imm = 0xFFED
166
159
; NO_CMOV-NEXT: # kill: def $ax killed $ax killed $eax
167
160
; NO_CMOV-NEXT: retl
168
161
%t0 = select i1 %c , i8 117 , i8 -19
@@ -181,12 +174,11 @@ define i32 @cmov_spromotion_8_to_32(i1 %c) {
181
174
;
182
175
; NO_CMOV-LABEL: cmov_spromotion_8_to_32:
183
176
; NO_CMOV: # %bb.0:
184
- ; NO_CMOV-NEXT: testb $1, {{[0-9]+}}(%esp)
185
- ; NO_CMOV-NEXT: movl $126, %eax
186
- ; NO_CMOV-NEXT: jne .LBB7_2
187
- ; NO_CMOV-NEXT: # %bb.1:
188
- ; NO_CMOV-NEXT: movl $99, %eax
189
- ; NO_CMOV-NEXT: .LBB7_2:
177
+ ; NO_CMOV-NEXT: movzbl {{[0-9]+}}(%esp), %eax
178
+ ; NO_CMOV-NEXT: andl $1, %eax
179
+ ; NO_CMOV-NEXT: negl %eax
180
+ ; NO_CMOV-NEXT: andl $29, %eax
181
+ ; NO_CMOV-NEXT: xorl $99, %eax
190
182
; NO_CMOV-NEXT: retl
191
183
%t0 = select i1 %c , i8 12414 , i8 43107
192
184
%ret = sext i8 %t0 to i32
@@ -204,12 +196,11 @@ define i64 @cmov_spromotion_8_to_64(i1 %c) {
204
196
;
205
197
; NO_CMOV-LABEL: cmov_spromotion_8_to_64:
206
198
; NO_CMOV: # %bb.0:
207
- ; NO_CMOV-NEXT: testb $1, {{[0-9]+}}(%esp)
208
- ; NO_CMOV-NEXT: movl $126, %eax
209
- ; NO_CMOV-NEXT: jne .LBB8_2
210
- ; NO_CMOV-NEXT: # %bb.1:
211
- ; NO_CMOV-NEXT: movl $99, %eax
212
- ; NO_CMOV-NEXT: .LBB8_2:
199
+ ; NO_CMOV-NEXT: movzbl {{[0-9]+}}(%esp), %eax
200
+ ; NO_CMOV-NEXT: andl $1, %eax
201
+ ; NO_CMOV-NEXT: negl %eax
202
+ ; NO_CMOV-NEXT: andl $29, %eax
203
+ ; NO_CMOV-NEXT: xorl $99, %eax
213
204
; NO_CMOV-NEXT: xorl %edx, %edx
214
205
; NO_CMOV-NEXT: retl
215
206
%t0 = select i1 %c , i8 12414 , i8 43107
@@ -228,12 +219,11 @@ define i32 @cmov_spromotion_16_to_32(i1 %c) {
228
219
;
229
220
; NO_CMOV-LABEL: cmov_spromotion_16_to_32:
230
221
; NO_CMOV: # %bb.0:
231
- ; NO_CMOV-NEXT: testb $1, {{[0-9]+}}(%esp)
232
- ; NO_CMOV-NEXT: movl $12414, %eax # imm = 0x307E
233
- ; NO_CMOV-NEXT: jne .LBB9_2
234
- ; NO_CMOV-NEXT: # %bb.1:
235
- ; NO_CMOV-NEXT: movl $-22429, %eax # imm = 0xA863
236
- ; NO_CMOV-NEXT: .LBB9_2:
222
+ ; NO_CMOV-NEXT: movzbl {{[0-9]+}}(%esp), %eax
223
+ ; NO_CMOV-NEXT: andl $1, %eax
224
+ ; NO_CMOV-NEXT: negl %eax
225
+ ; NO_CMOV-NEXT: andl $-26595, %eax # imm = 0x981D
226
+ ; NO_CMOV-NEXT: xorl $-22429, %eax # imm = 0xA863
237
227
; NO_CMOV-NEXT: retl
238
228
%t0 = select i1 %c , i16 12414 , i16 43107
239
229
%ret = sext i16 %t0 to i32
@@ -251,16 +241,12 @@ define i64 @cmov_spromotion_16_to_64(i1 %c) {
251
241
;
252
242
; NO_CMOV-LABEL: cmov_spromotion_16_to_64:
253
243
; NO_CMOV: # %bb.0:
254
- ; NO_CMOV-NEXT: movzbl {{[0-9]+}}(%esp), %ecx
255
- ; NO_CMOV-NEXT: andb $1, %cl
256
- ; NO_CMOV-NEXT: movl $12414, %eax # imm = 0x307E
257
- ; NO_CMOV-NEXT: jne .LBB10_2
258
- ; NO_CMOV-NEXT: # %bb.1:
259
- ; NO_CMOV-NEXT: movl $-22429, %eax # imm = 0xA863
260
- ; NO_CMOV-NEXT: .LBB10_2:
261
- ; NO_CMOV-NEXT: xorl %edx, %edx
262
- ; NO_CMOV-NEXT: cmpb $1, %cl
263
- ; NO_CMOV-NEXT: sbbl %edx, %edx
244
+ ; NO_CMOV-NEXT: movzbl {{[0-9]+}}(%esp), %eax
245
+ ; NO_CMOV-NEXT: andl $1, %eax
246
+ ; NO_CMOV-NEXT: leal -1(%eax), %edx
247
+ ; NO_CMOV-NEXT: negl %eax
248
+ ; NO_CMOV-NEXT: andl $-26595, %eax # imm = 0x981D
249
+ ; NO_CMOV-NEXT: xorl $-22429, %eax # imm = 0xA863
264
250
; NO_CMOV-NEXT: retl
265
251
%t0 = select i1 %c , i16 12414 , i16 43107
266
252
%ret = sext i16 %t0 to i64
@@ -278,12 +264,11 @@ define i64 @cmov_spromotion_32_to_64(i1 %c) {
278
264
;
279
265
; NO_CMOV-LABEL: cmov_spromotion_32_to_64:
280
266
; NO_CMOV: # %bb.0:
281
- ; NO_CMOV-NEXT: testb $1, {{[0-9]+}}(%esp)
282
- ; NO_CMOV-NEXT: movl $12414, %eax # imm = 0x307E
283
- ; NO_CMOV-NEXT: jne .LBB11_2
284
- ; NO_CMOV-NEXT: # %bb.1:
285
- ; NO_CMOV-NEXT: movl $43107, %eax # imm = 0xA863
286
- ; NO_CMOV-NEXT: .LBB11_2:
267
+ ; NO_CMOV-NEXT: movzbl {{[0-9]+}}(%esp), %eax
268
+ ; NO_CMOV-NEXT: andl $1, %eax
269
+ ; NO_CMOV-NEXT: negl %eax
270
+ ; NO_CMOV-NEXT: andl $38941, %eax # imm = 0x981D
271
+ ; NO_CMOV-NEXT: xorl $43107, %eax # imm = 0xA863
287
272
; NO_CMOV-NEXT: xorl %edx, %edx
288
273
; NO_CMOV-NEXT: retl
289
274
%t0 = select i1 %c , i32 12414 , i32 43107
0 commit comments