1
1
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2
2
; RUN: llc < %s -verify-machineinstrs -mtriple=x86_64-unknown-unknown -disable-cgp-select2branch -x86-cmov-converter=false | FileCheck %s
3
- ; RUN: llc < %s -verify-machineinstrs -mtriple=x86_64-unknown-unknown -disable-cgp-select2branch -x86-cmov-converter=false -mattr=+ndd --show-mc-encoding | FileCheck %s --check-prefix=NDD
4
3
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
5
4
6
5
define i32 @test1 (i32 %x , i32 %n , i32 %w , ptr %vp ) nounwind readnone {
@@ -10,13 +9,6 @@ define i32 @test1(i32 %x, i32 %n, i32 %w, ptr %vp) nounwind readnone {
10
9
; CHECK-NEXT: movl $12, %eax
11
10
; CHECK-NEXT: cmovael (%rcx), %eax
12
11
; CHECK-NEXT: retq
13
- ;
14
- ; NDD-LABEL: test1:
15
- ; NDD: # %bb.0: # %entry
16
- ; NDD-NEXT: btl %esi, %edi # encoding: [0x0f,0xa3,0xf7]
17
- ; NDD-NEXT: movl $12, %eax # encoding: [0xb8,0x0c,0x00,0x00,0x00]
18
- ; NDD-NEXT: cmovael (%rcx), %eax # EVEX TO LEGACY Compression encoding: [0x0f,0x43,0x01]
19
- ; NDD-NEXT: retq # encoding: [0xc3]
20
12
entry:
21
13
%0 = lshr i32 %x , %n
22
14
%1 = and i32 %0 , 1
@@ -33,13 +25,6 @@ define i32 @test2(i32 %x, i32 %n, i32 %w, ptr %vp) nounwind readnone {
33
25
; CHECK-NEXT: movl $12, %eax
34
26
; CHECK-NEXT: cmovbl (%rcx), %eax
35
27
; CHECK-NEXT: retq
36
- ;
37
- ; NDD-LABEL: test2:
38
- ; NDD: # %bb.0: # %entry
39
- ; NDD-NEXT: btl %esi, %edi # encoding: [0x0f,0xa3,0xf7]
40
- ; NDD-NEXT: movl $12, %eax # encoding: [0xb8,0x0c,0x00,0x00,0x00]
41
- ; NDD-NEXT: cmovbl (%rcx), %eax # EVEX TO LEGACY Compression encoding: [0x0f,0x42,0x01]
42
- ; NDD-NEXT: retq # encoding: [0xc3]
43
28
entry:
44
29
%0 = lshr i32 %x , %n
45
30
%1 = and i32 %0 , 1
@@ -65,16 +50,6 @@ define void @test3(i64 %a, i64 %b, i1 %p) nounwind {
65
50
; CHECK-NEXT: callq bar@PLT
66
51
; CHECK-NEXT: popq %rax
67
52
; CHECK-NEXT: retq
68
- ;
69
- ; NDD-LABEL: test3:
70
- ; NDD: # %bb.0:
71
- ; NDD-NEXT: pushq %rax # encoding: [0x50]
72
- ; NDD-NEXT: testb $1, %dl # encoding: [0xf6,0xc2,0x01]
73
- ; NDD-NEXT: cmovel %esi, %edi # EVEX TO LEGACY Compression encoding: [0x0f,0x44,0xfe]
74
- ; NDD-NEXT: callq bar@PLT # encoding: [0xe8,A,A,A,A]
75
- ; NDD-NEXT: # fixup A - offset: 1, value: bar@PLT-4, kind: FK_PCRel_4
76
- ; NDD-NEXT: popq %rax # encoding: [0x58]
77
- ; NDD-NEXT: retq # encoding: [0xc3]
78
53
%c = trunc i64 %a to i32
79
54
%d = trunc i64 %b to i32
80
55
%e = select i1 %p , i32 %c , i32 %d
@@ -139,54 +114,6 @@ define i1 @test4() nounwind {
139
114
; CHECK-NEXT: movl %ebx, %eax
140
115
; CHECK-NEXT: popq %rbx
141
116
; CHECK-NEXT: retq
142
- ;
143
- ; NDD-LABEL: test4:
144
- ; NDD: # %bb.0: # %entry
145
- ; NDD-NEXT: movsbl g_3(%rip), %eax # encoding: [0x0f,0xbe,0x05,A,A,A,A]
146
- ; NDD-NEXT: # fixup A - offset: 3, value: g_3-4, kind: reloc_riprel_4byte
147
- ; NDD-NEXT: movzbl %al, %ecx # encoding: [0x0f,0xb6,0xc8]
148
- ; NDD-NEXT: shrl $7, %ecx # EVEX TO LEGACY Compression encoding: [0xc1,0xe9,0x07]
149
- ; NDD-NEXT: xorb $1, %cl # EVEX TO LEGACY Compression encoding: [0x80,0xf1,0x01]
150
- ; NDD-NEXT: sarl %cl, %eax, %ecx # encoding: [0x62,0xf4,0x74,0x18,0xd3,0xf8]
151
- ; NDD-NEXT: movzbl g_96(%rip), %eax # encoding: [0x0f,0xb6,0x05,A,A,A,A]
152
- ; NDD-NEXT: # fixup A - offset: 3, value: g_96-4, kind: reloc_riprel_4byte
153
- ; NDD-NEXT: testb %al, %al # encoding: [0x84,0xc0]
154
- ; NDD-NEXT: je .LBB3_2 # encoding: [0x74,A]
155
- ; NDD-NEXT: # fixup A - offset: 1, value: .LBB3_2-1, kind: FK_PCRel_1
156
- ; NDD-NEXT: # %bb.1: # %bb.i.i.i
157
- ; NDD-NEXT: movzbl g_100(%rip), %edx # encoding: [0x0f,0xb6,0x15,A,A,A,A]
158
- ; NDD-NEXT: # fixup A - offset: 3, value: g_100-4, kind: reloc_riprel_4byte
159
- ; NDD-NEXT: .LBB3_2: # %func_4.exit.i
160
- ; NDD-NEXT: pushq %rbx # encoding: [0x53]
161
- ; NDD-NEXT: xorl %edx, %edx # encoding: [0x31,0xd2]
162
- ; NDD-NEXT: testb %cl, %cl # encoding: [0x84,0xc9]
163
- ; NDD-NEXT: setne %bl # encoding: [0x0f,0x95,0xc3]
164
- ; NDD-NEXT: movzbl %al, %ecx # encoding: [0x0f,0xb6,0xc8]
165
- ; NDD-NEXT: cmovnel %edx, %ecx # EVEX TO LEGACY Compression encoding: [0x0f,0x45,0xca]
166
- ; NDD-NEXT: testb %al, %al # encoding: [0x84,0xc0]
167
- ; NDD-NEXT: je .LBB3_5 # encoding: [0x74,A]
168
- ; NDD-NEXT: # fixup A - offset: 1, value: .LBB3_5-1, kind: FK_PCRel_1
169
- ; NDD-NEXT: # %bb.3: # %func_4.exit.i
170
- ; NDD-NEXT: testb %bl, %bl # encoding: [0x84,0xdb]
171
- ; NDD-NEXT: jne .LBB3_5 # encoding: [0x75,A]
172
- ; NDD-NEXT: # fixup A - offset: 1, value: .LBB3_5-1, kind: FK_PCRel_1
173
- ; NDD-NEXT: # %bb.4: # %bb.i.i
174
- ; NDD-NEXT: movzbl g_100(%rip), %ecx # encoding: [0x0f,0xb6,0x0d,A,A,A,A]
175
- ; NDD-NEXT: # fixup A - offset: 3, value: g_100-4, kind: reloc_riprel_4byte
176
- ; NDD-NEXT: xorl %ebx, %ebx # encoding: [0x31,0xdb]
177
- ; NDD-NEXT: movl %eax, %ecx # encoding: [0x89,0xc1]
178
- ; NDD-NEXT: .LBB3_5: # %func_1.exit
179
- ; NDD-NEXT: movb %cl, g_96(%rip) # encoding: [0x88,0x0d,A,A,A,A]
180
- ; NDD-NEXT: # fixup A - offset: 2, value: g_96-4, kind: reloc_riprel_4byte
181
- ; NDD-NEXT: movzbl %cl, %esi # encoding: [0x0f,0xb6,0xf1]
182
- ; NDD-NEXT: movl $_2E_str, %edi # encoding: [0xbf,A,A,A,A]
183
- ; NDD-NEXT: # fixup A - offset: 1, value: _2E_str, kind: FK_Data_4
184
- ; NDD-NEXT: xorl %eax, %eax # encoding: [0x31,0xc0]
185
- ; NDD-NEXT: callq printf@PLT # encoding: [0xe8,A,A,A,A]
186
- ; NDD-NEXT: # fixup A - offset: 1, value: printf@PLT-4, kind: FK_PCRel_4
187
- ; NDD-NEXT: movl %ebx, %eax # encoding: [0x89,0xd8]
188
- ; NDD-NEXT: popq %rbx # encoding: [0x5b]
189
- ; NDD-NEXT: retq # encoding: [0xc3]
190
117
entry:
191
118
%0 = load i8 , ptr @g_3 , align 1
192
119
%1 = sext i8 %0 to i32
@@ -236,14 +163,6 @@ define i32 @test5(ptr nocapture %P) nounwind readonly {
236
163
; CHECK-NEXT: setge %al
237
164
; CHECK-NEXT: orl $-2, %eax
238
165
; CHECK-NEXT: retq
239
- ;
240
- ; NDD-LABEL: test5:
241
- ; NDD: # %bb.0: # %entry
242
- ; NDD-NEXT: xorl %eax, %eax # encoding: [0x31,0xc0]
243
- ; NDD-NEXT: cmpl $42, (%rdi) # encoding: [0x83,0x3f,0x2a]
244
- ; NDD-NEXT: setge %al # encoding: [0x0f,0x9d,0xc0]
245
- ; NDD-NEXT: orl $-2, %eax # EVEX TO LEGACY Compression encoding: [0x83,0xc8,0xfe]
246
- ; NDD-NEXT: retq # encoding: [0xc3]
247
166
entry:
248
167
%0 = load i32 , ptr %P , align 4
249
168
%1 = icmp sgt i32 %0 , 41
@@ -259,14 +178,6 @@ define i32 @test6(ptr nocapture %P) nounwind readonly {
259
178
; CHECK-NEXT: setl %al
260
179
; CHECK-NEXT: leal 4(%rax,%rax,8), %eax
261
180
; CHECK-NEXT: retq
262
- ;
263
- ; NDD-LABEL: test6:
264
- ; NDD: # %bb.0: # %entry
265
- ; NDD-NEXT: xorl %eax, %eax # encoding: [0x31,0xc0]
266
- ; NDD-NEXT: cmpl $42, (%rdi) # encoding: [0x83,0x3f,0x2a]
267
- ; NDD-NEXT: setl %al # encoding: [0x0f,0x9c,0xc0]
268
- ; NDD-NEXT: leal 4(%rax,%rax,8), %eax # encoding: [0x8d,0x44,0xc0,0x04]
269
- ; NDD-NEXT: retq # encoding: [0xc3]
270
181
entry:
271
182
%0 = load i32 , ptr %P , align 4
272
183
%1 = icmp sgt i32 %0 , 41
@@ -283,13 +194,6 @@ define i8 @test7(i1 inreg %c, i8 inreg %a, i8 inreg %b) nounwind {
283
194
; CHECK-NEXT: cmovel %edx, %eax
284
195
; CHECK-NEXT: # kill: def $al killed $al killed $eax
285
196
; CHECK-NEXT: retq
286
- ;
287
- ; NDD-LABEL: test7:
288
- ; NDD: # %bb.0:
289
- ; NDD-NEXT: testb $1, %dil # encoding: [0x40,0xf6,0xc7,0x01]
290
- ; NDD-NEXT: cmovnel %esi, %edx, %eax # encoding: [0x62,0xf4,0x7c,0x18,0x45,0xd6]
291
- ; NDD-NEXT: # kill: def $al killed $al killed $eax
292
- ; NDD-NEXT: retq # encoding: [0xc3]
293
197
%d = select i1 %c , i8 %a , i8 %b
294
198
ret i8 %d
295
199
}
@@ -301,13 +205,6 @@ define i64 @test8(i64 %0, i64 %1, i64 %2) {
301
205
; CHECK-NEXT: cmpq $-2147483648, %rdi # imm = 0x80000000
302
206
; CHECK-NEXT: cmovlq %rdx, %rax
303
207
; CHECK-NEXT: retq
304
- ;
305
- ; NDD-LABEL: test8:
306
- ; NDD: # %bb.0:
307
- ; NDD-NEXT: cmpq $-2147483648, %rdi # encoding: [0x48,0x81,0xff,0x00,0x00,0x00,0x80]
308
- ; NDD-NEXT: # imm = 0x80000000
309
- ; NDD-NEXT: cmovgeq %rsi, %rdx, %rax # encoding: [0x62,0xf4,0xfc,0x18,0x4d,0xd6]
310
- ; NDD-NEXT: retq # encoding: [0xc3]
311
208
%4 = icmp sgt i64 %0 , -2147483649
312
209
%5 = select i1 %4 , i64 %1 , i64 %2
313
210
ret i64 %5
@@ -321,14 +218,6 @@ define i32 @smin(i32 %x) {
321
218
; CHECK-NEXT: movl $-1, %eax
322
219
; CHECK-NEXT: cmovnsl %edi, %eax
323
220
; CHECK-NEXT: retq
324
- ;
325
- ; NDD-LABEL: smin:
326
- ; NDD: # %bb.0:
327
- ; NDD-NEXT: notl %edi, %eax # encoding: [0x62,0xf4,0x7c,0x18,0xf7,0xd7]
328
- ; NDD-NEXT: testl %edi, %edi # encoding: [0x85,0xff]
329
- ; NDD-NEXT: movl $-1, %ecx # encoding: [0xb9,0xff,0xff,0xff,0xff]
330
- ; NDD-NEXT: cmovsl %ecx, %eax # EVEX TO LEGACY Compression encoding: [0x0f,0x48,0xc1]
331
- ; NDD-NEXT: retq # encoding: [0xc3]
332
221
%not_x = xor i32 %x , -1
333
222
%1 = icmp slt i32 %not_x , -1
334
223
%sel = select i1 %1 , i32 %not_x , i32 -1
@@ -342,13 +231,6 @@ define i32 @pr47049_1(i32 %0) {
342
231
; CHECK-NEXT: movl $1, %eax
343
232
; CHECK-NEXT: cmovlel %edi, %eax
344
233
; CHECK-NEXT: retq
345
- ;
346
- ; NDD-LABEL: pr47049_1:
347
- ; NDD: # %bb.0:
348
- ; NDD-NEXT: testl %edi, %edi # encoding: [0x85,0xff]
349
- ; NDD-NEXT: movl $1, %eax # encoding: [0xb8,0x01,0x00,0x00,0x00]
350
- ; NDD-NEXT: cmovlel %edi, %eax # EVEX TO LEGACY Compression encoding: [0x0f,0x4e,0xc7]
351
- ; NDD-NEXT: retq # encoding: [0xc3]
352
234
%2 = icmp slt i32 %0 , 1
353
235
%3 = select i1 %2 , i32 %0 , i32 1
354
236
ret i32 %3
@@ -361,13 +243,6 @@ define i32 @pr47049_2(i32 %0) {
361
243
; CHECK-NEXT: movl $-1, %eax
362
244
; CHECK-NEXT: cmovnsl %edi, %eax
363
245
; CHECK-NEXT: retq
364
- ;
365
- ; NDD-LABEL: pr47049_2:
366
- ; NDD: # %bb.0:
367
- ; NDD-NEXT: testl %edi, %edi # encoding: [0x85,0xff]
368
- ; NDD-NEXT: movl $-1, %eax # encoding: [0xb8,0xff,0xff,0xff,0xff]
369
- ; NDD-NEXT: cmovnsl %edi, %eax # EVEX TO LEGACY Compression encoding: [0x0f,0x49,0xc7]
370
- ; NDD-NEXT: retq # encoding: [0xc3]
371
246
%2 = icmp sgt i32 %0 , -1
372
247
%3 = select i1 %2 , i32 %0 , i32 -1
373
248
ret i32 %3
@@ -380,13 +255,6 @@ define i32 @pr47049_3(i32 %0) {
380
255
; CHECK-NEXT: movl $1, %eax
381
256
; CHECK-NEXT: cmovgl %edi, %eax
382
257
; CHECK-NEXT: retq
383
- ;
384
- ; NDD-LABEL: pr47049_3:
385
- ; NDD: # %bb.0:
386
- ; NDD-NEXT: testl %edi, %edi # encoding: [0x85,0xff]
387
- ; NDD-NEXT: movl $1, %eax # encoding: [0xb8,0x01,0x00,0x00,0x00]
388
- ; NDD-NEXT: cmovgl %edi, %eax # EVEX TO LEGACY Compression encoding: [0x0f,0x4f,0xc7]
389
- ; NDD-NEXT: retq # encoding: [0xc3]
390
258
%2 = icmp sgt i32 %0 , 1
391
259
%3 = select i1 %2 , i32 %0 , i32 1
392
260
ret i32 %3
@@ -399,13 +267,6 @@ define i32 @pr47049_4(i32 %0) {
399
267
; CHECK-NEXT: movl $1, %eax
400
268
; CHECK-NEXT: cmovnel %edi, %eax
401
269
; CHECK-NEXT: retq
402
- ;
403
- ; NDD-LABEL: pr47049_4:
404
- ; NDD: # %bb.0:
405
- ; NDD-NEXT: testl %edi, %edi # encoding: [0x85,0xff]
406
- ; NDD-NEXT: movl $1, %eax # encoding: [0xb8,0x01,0x00,0x00,0x00]
407
- ; NDD-NEXT: cmovnel %edi, %eax # EVEX TO LEGACY Compression encoding: [0x0f,0x45,0xc7]
408
- ; NDD-NEXT: retq # encoding: [0xc3]
409
270
%2 = icmp ugt i32 %0 , 1
410
271
%3 = select i1 %2 , i32 %0 , i32 1
411
272
ret i32 %3
0 commit comments