• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc < %s                             -mtriple=x86_64-apple-darwin10 | FileCheck %s --check-prefix=SDAG
2; RUN: llc < %s -fast-isel -fast-isel-abort=1 -mtriple=x86_64-apple-darwin10 | FileCheck %s --check-prefix=FAST
3
4define zeroext i1 @fcmp_oeq(float %x, float %y) {
5; SDAG-LABEL: fcmp_oeq
6; SDAG:       cmpeqss  %xmm1, %xmm0
7; SDAG-NEXT:  movd     %xmm0, %eax
8; SDAG-NEXT:  andl     $1, %eax
9; FAST-LABEL: fcmp_oeq
10; FAST:       ucomiss  %xmm1, %xmm0
11; FAST-NEXT:  sete     %al
12; FAST-NEXT:  setnp    %cl
13; FAST-NEXT:  andb     %al, %cl
14  %1 = fcmp oeq float %x, %y
15  ret i1 %1
16}
17
18define zeroext i1 @fcmp_ogt(float %x, float %y) {
19; SDAG-LABEL: fcmp_ogt
20; SDAG:       ucomiss  %xmm1, %xmm0
21; SDAG-NEXT:  seta     %al
22; FAST:       ucomiss  %xmm1, %xmm0
23; FAST-NEXT:  seta     %al
24  %1 = fcmp ogt float %x, %y
25  ret i1 %1
26}
27
28define zeroext i1 @fcmp_oge(float %x, float %y) {
29; SDAG-LABEL: fcmp_oge
30; SDAG:       ucomiss  %xmm1, %xmm0
31; SDAG-NEXT:  setae    %al
32; FAST-LABEL: fcmp_oge
33; FAST:       ucomiss  %xmm1, %xmm0
34; FAST-NEXT:  setae    %al
35  %1 = fcmp oge float %x, %y
36  ret i1 %1
37}
38
39define zeroext i1 @fcmp_olt(float %x, float %y) {
40; SDAG-LABEL: fcmp_olt
41; SDAG:       ucomiss  %xmm0, %xmm1
42; SDAG-NEXT:  seta     %al
43; FAST-LABEL: fcmp_olt
44; FAST:       ucomiss  %xmm0, %xmm1
45; FAST-NEXT:  seta     %al
46  %1 = fcmp olt float %x, %y
47  ret i1 %1
48}
49
50define zeroext i1 @fcmp_ole(float %x, float %y) {
51; SDAG-LABEL: fcmp_ole
52; SDAG:       ucomiss  %xmm0, %xmm1
53; SDAG-NEXT:  setae    %al
54; FAST-LABEL: fcmp_ole
55; FAST:       ucomiss  %xmm0, %xmm1
56; FAST-NEXT:  setae    %al
57  %1 = fcmp ole float %x, %y
58  ret i1 %1
59}
60
61define zeroext i1 @fcmp_one(float %x, float %y) {
62; SDAG-LABEL: fcmp_one
63; SDAG:       ucomiss  %xmm1, %xmm0
64; SDAG-NEXT:  setne    %al
65; FAST-LABEL: fcmp_one
66; FAST:       ucomiss  %xmm1, %xmm0
67; FAST-NEXT:  setne    %al
68  %1 = fcmp one float %x, %y
69  ret i1 %1
70}
71
72define zeroext i1 @fcmp_ord(float %x, float %y) {
73; SDAG-LABEL: fcmp_ord
74; SDAG:       ucomiss  %xmm1, %xmm0
75; SDAG-NEXT:  setnp    %al
76; FAST-LABEL: fcmp_ord
77; FAST:       ucomiss  %xmm1, %xmm0
78; FAST-NEXT:  setnp    %al
79  %1 = fcmp ord float %x, %y
80  ret i1 %1
81}
82
83define zeroext i1 @fcmp_uno(float %x, float %y) {
84; SDAG-LABEL: fcmp_uno
85; SDAG:       ucomiss  %xmm1, %xmm0
86; SDAG-NEXT:  setp     %al
87; FAST-LABEL: fcmp_uno
88; FAST:       ucomiss  %xmm1, %xmm0
89; FAST-NEXT:  setp     %al
90  %1 = fcmp uno float %x, %y
91  ret i1 %1
92}
93
94define zeroext i1 @fcmp_ueq(float %x, float %y) {
95; SDAG-LABEL: fcmp_ueq
96; SDAG:       ucomiss  %xmm1, %xmm0
97; SDAG-NEXT:  sete     %al
98; FAST-LABEL: fcmp_ueq
99; FAST:       ucomiss  %xmm1, %xmm0
100; FAST-NEXT:  sete     %al
101  %1 = fcmp ueq float %x, %y
102  ret i1 %1
103}
104
105define zeroext i1 @fcmp_ugt(float %x, float %y) {
106; SDAG-LABEL: fcmp_ugt
107; SDAG:       ucomiss  %xmm0, %xmm1
108; SDAG-NEXT:  setb     %al
109; FAST-LABEL: fcmp_ugt
110; FAST:       ucomiss  %xmm0, %xmm1
111; FAST-NEXT:  setb     %al
112  %1 = fcmp ugt float %x, %y
113  ret i1 %1
114}
115
116define zeroext i1 @fcmp_uge(float %x, float %y) {
117; SDAG-LABEL: fcmp_uge
118; SDAG:       ucomiss  %xmm0, %xmm1
119; SDAG-NEXT:  setbe    %al
120; FAST-LABEL: fcmp_uge
121; FAST:       ucomiss  %xmm0, %xmm1
122; FAST-NEXT:  setbe    %al
123  %1 = fcmp uge float %x, %y
124  ret i1 %1
125}
126
127define zeroext i1 @fcmp_ult(float %x, float %y) {
128; SDAG-LABEL: fcmp_ult
129; SDAG:       ucomiss  %xmm1, %xmm0
130; SDAG-NEXT:  setb     %al
131; FAST-LABEL: fcmp_ult
132; FAST:       ucomiss  %xmm1, %xmm0
133; FAST-NEXT:  setb     %al
134  %1 = fcmp ult float %x, %y
135  ret i1 %1
136}
137
138define zeroext i1 @fcmp_ule(float %x, float %y) {
139; SDAG-LABEL: fcmp_ule
140; SDAG:       ucomiss  %xmm1, %xmm0
141; SDAG-NEXT:  setbe    %al
142; FAST-LABEL: fcmp_ule
143; FAST:       ucomiss  %xmm1, %xmm0
144; FAST-NEXT:  setbe    %al
145  %1 = fcmp ule float %x, %y
146  ret i1 %1
147}
148
149define zeroext i1 @fcmp_une(float %x, float %y) {
150; SDAG-LABEL: fcmp_une
151; SDAG:       cmpneqss %xmm1, %xmm0
152; SDAG-NEXT:  movd     %xmm0, %eax
153; SDAG-NEXT:  andl     $1, %eax
154; FAST-LABEL: fcmp_une
155; FAST:       ucomiss  %xmm1, %xmm0
156; FAST-NEXT:  setne    %al
157; FAST-NEXT:  setp     %cl
158; FAST-NEXT:  orb      %al, %cl
159  %1 = fcmp une float %x, %y
160  ret i1 %1
161}
162
163define zeroext i1 @icmp_eq(i32 %x, i32 %y) {
164; SDAG-LABEL: icmp_eq
165; SDAG:       cmpl     %esi, %edi
166; SDAG-NEXT:  sete     %al
167; FAST-LABEL: icmp_eq
168; FAST:       cmpl     %esi, %edi
169; FAST-NEXT:  sete     %al
170  %1 = icmp eq i32 %x, %y
171  ret i1 %1
172}
173
174define zeroext i1 @icmp_ne(i32 %x, i32 %y) {
175; SDAG-LABEL: icmp_ne
176; SDAG:       cmpl     %esi, %edi
177; SDAG-NEXT:  setne    %al
178; FAST-LABEL: icmp_ne
179; FAST:       cmpl     %esi, %edi
180; FAST-NEXT:  setne    %al
181  %1 = icmp ne i32 %x, %y
182  ret i1 %1
183}
184
185define zeroext i1 @icmp_ugt(i32 %x, i32 %y) {
186; SDAG-LABEL: icmp_ugt
187; SDAG:       cmpl     %edi, %esi
188; SDAG-NEXT:  setb     %al
189; FAST-LABEL: icmp_ugt
190; FAST:       cmpl     %esi, %edi
191; FAST-NEXT:  seta     %al
192  %1 = icmp ugt i32 %x, %y
193  ret i1 %1
194}
195
196define zeroext i1 @icmp_uge(i32 %x, i32 %y) {
197; SDAG-LABEL: icmp_uge
198; SDAG:       cmpl     %esi, %edi
199; SDAG-NEXT:  setae    %al
200; FAST-LABEL: icmp_uge
201; FAST:       cmpl     %esi, %edi
202; FAST-NEXT:  setae    %al
203  %1 = icmp uge i32 %x, %y
204  ret i1 %1
205}
206
207define zeroext i1 @icmp_ult(i32 %x, i32 %y) {
208; SDAG-LABEL: icmp_ult
209; SDAG:       cmpl     %esi, %edi
210; SDAG-NEXT:  setb     %al
211; FAST-LABEL: icmp_ult
212; FAST:       cmpl     %esi, %edi
213; FAST-NEXT:  setb     %al
214  %1 = icmp ult i32 %x, %y
215  ret i1 %1
216}
217
218define zeroext i1 @icmp_ule(i32 %x, i32 %y) {
219; SDAG-LABEL: icmp_ule
220; SDAG:       cmpl     %esi, %edi
221; SDAG-NEXT:  setbe    %al
222; FAST-LABEL: icmp_ule
223; FAST:       cmpl     %esi, %edi
224; FAST-NEXT:  setbe    %al
225  %1 = icmp ule i32 %x, %y
226  ret i1 %1
227}
228
229define zeroext i1 @icmp_sgt(i32 %x, i32 %y) {
230; SDAG-LABEL: icmp_sgt
231; SDAG:       cmpl     %esi, %edi
232; SDAG-NEXT:  setg     %al
233; FAST-LABEL: icmp_sgt
234; FAST:       cmpl     %esi, %edi
235; FAST-NEXT:  setg     %al
236  %1 = icmp sgt i32 %x, %y
237  ret i1 %1
238}
239
240define zeroext i1 @icmp_sge(i32 %x, i32 %y) {
241; SDAG-LABEL: icmp_sge
242; SDAG:       cmpl     %esi, %edi
243; SDAG-NEXT:  setge    %al
244; FAST-LABEL: icmp_sge
245; FAST:       cmpl     %esi, %edi
246; FAST-NEXT:  setge    %al
247  %1 = icmp sge i32 %x, %y
248  ret i1 %1
249}
250
251define zeroext i1 @icmp_slt(i32 %x, i32 %y) {
252; SDAG-LABEL: icmp_slt
253; SDAG:       cmpl     %esi, %edi
254; SDAG-NEXT:  setl     %al
255; FAST-LABEL: icmp_slt
256; FAST:       cmpl     %esi, %edi
257; FAST-NEXT:  setl     %al
258  %1 = icmp slt i32 %x, %y
259  ret i1 %1
260}
261
262define zeroext i1 @icmp_sle(i32 %x, i32 %y) {
263; SDAG-LABEL: icmp_sle
264; SDAG:       cmpl     %esi, %edi
265; SDAG-NEXT:  setle    %al
266; FAST-LABEL: icmp_sle
267; FAST:       cmpl     %esi, %edi
268; FAST-NEXT:  setle    %al
269  %1 = icmp sle i32 %x, %y
270  ret i1 %1
271}
272
273; Test cmp folding and condition optimization.
274define zeroext i1 @fcmp_oeq2(float %x) {
275; SDAG-LABEL: fcmp_oeq2
276; SDAG:       ucomiss  %xmm0, %xmm0
277; SDAG-NEXT:  setnp    %al
278; FAST-LABEL: fcmp_oeq2
279; FAST:       ucomiss  %xmm0, %xmm0
280; FAST-NEXT:  setnp    %al
281  %1 = fcmp oeq float %x, %x
282  ret i1 %1
283}
284
285define zeroext i1 @fcmp_oeq3(float %x) {
286; SDAG-LABEL: fcmp_oeq3
287; SDAG:       xorps    %xmm1, %xmm1
288; SDAG-NEXT:  cmpeqss  %xmm1, %xmm0
289; SDAG-NEXT:  movd     %xmm0, %eax
290; SDAG-NEXT:  andl     $1, %eax
291; FAST-LABEL: fcmp_oeq3
292; FAST:       xorps    %xmm1, %xmm1
293; FAST-NEXT:  ucomiss  %xmm1, %xmm0
294; FAST-NEXT:  sete     %al
295; FAST-NEXT:  setnp    %cl
296; FAST-NEXT:  andb     %al, %cl
297  %1 = fcmp oeq float %x, 0.000000e+00
298  ret i1 %1
299}
300
301define zeroext i1 @fcmp_ogt2(float %x) {
302; SDAG-LABEL: fcmp_ogt2
303; SDAG:       xorl     %eax, %eax
304; FAST-LABEL: fcmp_ogt2
305; FAST:       xorl     %eax, %eax
306  %1 = fcmp ogt float %x, %x
307  ret i1 %1
308}
309
310define zeroext i1 @fcmp_ogt3(float %x) {
311; SDAG-LABEL: fcmp_ogt3
312; SDAG:       xorps    %xmm1, %xmm1
313; SDAG-NEXT:  ucomiss  %xmm1, %xmm0
314; SDAG-NEXT:  seta     %al
315; FAST-LABEL: fcmp_ogt3
316; FAST:       xorps    %xmm1, %xmm1
317; FAST-NEXT:  ucomiss  %xmm1, %xmm0
318; FAST-NEXT:  seta     %al
319  %1 = fcmp ogt float %x, 0.000000e+00
320  ret i1 %1
321}
322
323define zeroext i1 @fcmp_oge2(float %x) {
324; SDAG-LABEL: fcmp_oge2
325; SDAG:       ucomiss  %xmm0, %xmm0
326; SDAG-NEXT:  setnp    %al
327; FAST-LABEL: fcmp_oge2
328; FAST:       ucomiss  %xmm0, %xmm0
329; FAST-NEXT:  setnp    %al
330  %1 = fcmp oge float %x, %x
331  ret i1 %1
332}
333
334define zeroext i1 @fcmp_oge3(float %x) {
335; SDAG-LABEL: fcmp_oge3
336; SDAG:       xorps    %xmm1, %xmm1
337; SDAG-NEXT:  ucomiss  %xmm1, %xmm0
338; SDAG-NEXT:  setae    %al
339; FAST-LABEL: fcmp_oge3
340; FAST:       xorps    %xmm1, %xmm1
341; FAST-NEXT:  ucomiss  %xmm1, %xmm0
342; FAST-NEXT:  setae    %al
343  %1 = fcmp oge float %x, 0.000000e+00
344  ret i1 %1
345}
346
347define zeroext i1 @fcmp_olt2(float %x) {
348; SDAG-LABEL: fcmp_olt2
349; SDAG:       xorl     %eax, %eax
350; FAST-LABEL: fcmp_olt2
351; FAST:       xorl     %eax, %eax
352  %1 = fcmp olt float %x, %x
353  ret i1 %1
354}
355
356define zeroext i1 @fcmp_olt3(float %x) {
357; SDAG-LABEL: fcmp_olt3
358; SDAG:       xorps    %xmm1, %xmm1
359; SDAG-NEXT:  ucomiss  %xmm0, %xmm1
360; SDAG-NEXT:  seta     %al
361; FAST-LABEL: fcmp_olt3
362; FAST:       xorps    %xmm1, %xmm1
363; FAST-NEXT:  ucomiss  %xmm0, %xmm1
364; FAST-NEXT:  seta     %al
365  %1 = fcmp olt float %x, 0.000000e+00
366  ret i1 %1
367}
368
369define zeroext i1 @fcmp_ole2(float %x) {
370; SDAG-LABEL: fcmp_ole2
371; SDAG:       ucomiss  %xmm0, %xmm0
372; SDAG-NEXT:  setnp    %al
373; FAST-LABEL: fcmp_ole2
374; FAST:       ucomiss  %xmm0, %xmm0
375; FAST-NEXT:  setnp    %al
376  %1 = fcmp ole float %x, %x
377  ret i1 %1
378}
379
380define zeroext i1 @fcmp_ole3(float %x) {
381; SDAG-LABEL: fcmp_ole3
382; SDAG:       xorps    %xmm1, %xmm1
383; SDAG-NEXT:  ucomiss  %xmm0, %xmm1
384; SDAG-NEXT:  setae    %al
385; FAST-LABEL: fcmp_ole3
386; FAST:       xorps    %xmm1, %xmm1
387; FAST-NEXT:  ucomiss  %xmm0, %xmm1
388; FAST-NEXT:  setae    %al
389  %1 = fcmp ole float %x, 0.000000e+00
390  ret i1 %1
391}
392
393define zeroext i1 @fcmp_one2(float %x) {
394; SDAG-LABEL: fcmp_one2
395; SDAG:       xorl     %eax, %eax
396; FAST-LABEL: fcmp_one2
397; FAST:       xorl     %eax, %eax
398  %1 = fcmp one float %x, %x
399  ret i1 %1
400}
401
402define zeroext i1 @fcmp_one3(float %x) {
403; SDAG-LABEL: fcmp_one3
404; SDAG:       xorps    %xmm1, %xmm1
405; SDAG-NEXT:  ucomiss  %xmm1, %xmm0
406; SDAG-NEXT:  setne    %al
407; FAST-LABEL: fcmp_one3
408; FAST:       xorps    %xmm1, %xmm1
409; FAST-NEXT:  ucomiss  %xmm1, %xmm0
410; FAST-NEXT:  setne    %al
411  %1 = fcmp one float %x, 0.000000e+00
412  ret i1 %1
413}
414
415define zeroext i1 @fcmp_ord2(float %x) {
416; SDAG-LABEL: fcmp_ord2
417; SDAG:       ucomiss  %xmm0, %xmm0
418; SDAG-NEXT:  setnp    %al
419; FAST-LABEL: fcmp_ord2
420; FAST:       ucomiss  %xmm0, %xmm0
421; FAST-NEXT:  setnp    %al
422  %1 = fcmp ord float %x, %x
423  ret i1 %1
424}
425
426define zeroext i1 @fcmp_ord3(float %x) {
427; SDAG-LABEL: fcmp_ord3
428; SDAG:       ucomiss  %xmm0, %xmm0
429; SDAG-NEXT:  setnp    %al
430; FAST-LABEL: fcmp_ord3
431; FAST:       ucomiss  %xmm0, %xmm0
432; FAST-NEXT:  setnp    %al
433  %1 = fcmp ord float %x, 0.000000e+00
434  ret i1 %1
435}
436
437define zeroext i1 @fcmp_uno2(float %x) {
438; SDAG-LABEL: fcmp_uno2
439; SDAG:       ucomiss  %xmm0, %xmm0
440; SDAG-NEXT:  setp     %al
441; FAST-LABEL: fcmp_uno2
442; FAST:       ucomiss  %xmm0, %xmm0
443; FAST-NEXT:  setp     %al
444  %1 = fcmp uno float %x, %x
445  ret i1 %1
446}
447
448define zeroext i1 @fcmp_uno3(float %x) {
449; SDAG-LABEL: fcmp_uno3
450; SDAG:       ucomiss  %xmm0, %xmm0
451; SDAG-NEXT:  setp     %al
452; FAST-LABEL: fcmp_uno3
453; FAST:       ucomiss  %xmm0, %xmm0
454; FAST-NEXT:  setp     %al
455  %1 = fcmp uno float %x, 0.000000e+00
456  ret i1 %1
457}
458
459define zeroext i1 @fcmp_ueq2(float %x) {
460; SDAG-LABEL: fcmp_ueq2
461; SDAG:       movb     $1, %al
462; FAST-LABEL: fcmp_ueq2
463; FAST:       movb     $1, %al
464  %1 = fcmp ueq float %x, %x
465  ret i1 %1
466}
467
468define zeroext i1 @fcmp_ueq3(float %x) {
469; SDAG-LABEL: fcmp_ueq3
470; SDAG:       xorps    %xmm1, %xmm1
471; SDAG-NEXT:  ucomiss  %xmm1, %xmm0
472; SDAG-NEXT:  sete     %al
473; FAST-LABEL: fcmp_ueq3
474; FAST:       xorps    %xmm1, %xmm1
475; FAST-NEXT:  ucomiss  %xmm1, %xmm0
476; FAST-NEXT:  sete     %al
477  %1 = fcmp ueq float %x, 0.000000e+00
478  ret i1 %1
479}
480
481define zeroext i1 @fcmp_ugt2(float %x) {
482; SDAG-LABEL: fcmp_ugt2
483; SDAG:       ucomiss  %xmm0, %xmm0
484; SDAG-NEXT:  setp     %al
485; FAST-LABEL: fcmp_ugt2
486; FAST:       ucomiss  %xmm0, %xmm0
487; FAST-NEXT:  setp     %al
488  %1 = fcmp ugt float %x, %x
489  ret i1 %1
490}
491
492define zeroext i1 @fcmp_ugt3(float %x) {
493; SDAG-LABEL: fcmp_ugt3
494; SDAG:       xorps    %xmm1, %xmm1
495; SDAG-NEXT:  ucomiss  %xmm0, %xmm1
496; SDAG-NEXT:  setb     %al
497; FAST-LABEL: fcmp_ugt3
498; FAST:       xorps    %xmm1, %xmm1
499; FAST-NEXT:  ucomiss  %xmm0, %xmm1
500; FAST-NEXT:  setb     %al
501  %1 = fcmp ugt float %x, 0.000000e+00
502  ret i1 %1
503}
504
505define zeroext i1 @fcmp_uge2(float %x) {
506; SDAG-LABEL: fcmp_uge2
507; SDAG:       movb     $1, %al
508; FAST-LABEL: fcmp_uge2
509; FAST:       movb     $1, %al
510  %1 = fcmp uge float %x, %x
511  ret i1 %1
512}
513
514define zeroext i1 @fcmp_uge3(float %x) {
515; SDAG-LABEL: fcmp_uge3
516; SDAG:       xorps    %xmm1, %xmm1
517; SDAG-NEXT:  ucomiss  %xmm0, %xmm1
518; SDAG-NEXT:  setbe    %al
519; FAST-LABEL: fcmp_uge3
520; FAST:       xorps    %xmm1, %xmm1
521; FAST-NEXT:  ucomiss  %xmm0, %xmm1
522; FAST-NEXT:  setbe    %al
523  %1 = fcmp uge float %x, 0.000000e+00
524  ret i1 %1
525}
526
527define zeroext i1 @fcmp_ult2(float %x) {
528; SDAG-LABEL: fcmp_ult2
529; SDAG:       ucomiss  %xmm0, %xmm0
530; SDAG-NEXT:  setp     %al
531; FAST-LABEL: fcmp_ult2
532; FAST:       ucomiss  %xmm0, %xmm0
533; FAST-NEXT:  setp     %al
534  %1 = fcmp ult float %x, %x
535  ret i1 %1
536}
537
538define zeroext i1 @fcmp_ult3(float %x) {
539; SDAG-LABEL: fcmp_ult3
540; SDAG:       xorps    %xmm1, %xmm1
541; SDAG-NEXT:  ucomiss  %xmm1, %xmm0
542; SDAG-NEXT:  setb     %al
543; FAST-LABEL: fcmp_ult3
544; FAST:       xorps    %xmm1, %xmm1
545; FAST-NEXT:  ucomiss  %xmm1, %xmm0
546; FAST-NEXT:  setb     %al
547  %1 = fcmp ult float %x, 0.000000e+00
548  ret i1 %1
549}
550
551define zeroext i1 @fcmp_ule2(float %x) {
552; SDAG-LABEL: fcmp_ule2
553; SDAG:       movb     $1, %al
554; FAST-LABEL: fcmp_ule2
555; FAST:       movb     $1, %al
556  %1 = fcmp ule float %x, %x
557  ret i1 %1
558}
559
560define zeroext i1 @fcmp_ule3(float %x) {
561; SDAG-LABEL: fcmp_ule3
562; SDAG:       xorps    %xmm1, %xmm1
563; SDAG-NEXT:  ucomiss  %xmm1, %xmm0
564; SDAG-NEXT:  setbe    %al
565; FAST-LABEL: fcmp_ule3
566; FAST:       xorps    %xmm1, %xmm1
567; FAST-NEXT:  ucomiss  %xmm1, %xmm0
568; FAST-NEXT:  setbe    %al
569  %1 = fcmp ule float %x, 0.000000e+00
570  ret i1 %1
571}
572
573define zeroext i1 @fcmp_une2(float %x) {
574; SDAG-LABEL: fcmp_une2
575; SDAG:       ucomiss  %xmm0, %xmm0
576; SDAG-NEXT:  setp     %al
577; FAST-LABEL: fcmp_une2
578; FAST:       ucomiss  %xmm0, %xmm0
579; FAST-NEXT:  setp     %al
580  %1 = fcmp une float %x, %x
581  ret i1 %1
582}
583
584define zeroext i1 @fcmp_une3(float %x) {
585; SDAG-LABEL: fcmp_une3
586; SDAG:       xorps    %xmm1, %xmm1
587; SDAG-NEXT:  cmpneqss %xmm1, %xmm0
588; SDAG-NEXT:  movd     %xmm0, %eax
589; SDAG-NEXT:  andl     $1, %eax
590; FAST-LABEL: fcmp_une3
591; FAST:       xorps    %xmm1, %xmm1
592; FAST-NEXT:  ucomiss  %xmm1, %xmm0
593; FAST-NEXT:  setne    %al
594; FAST-NEXT:  setp     %cl
595; FAST-NEXT:  orb      %al, %cl
596  %1 = fcmp une float %x, 0.000000e+00
597  ret i1 %1
598}
599
600define zeroext i1 @icmp_eq2(i32 %x) {
601; SDAG-LABEL: icmp_eq2
602; SDAG:       movb     $1, %al
603; FAST-LABEL: icmp_eq2
604; FAST:       movb     $1, %al
605  %1 = icmp eq i32 %x, %x
606  ret i1 %1
607}
608
609define zeroext i1 @icmp_ne2(i32 %x) {
610; SDAG-LABEL: icmp_ne2
611; SDAG:       xorl     %eax, %eax
612; FAST-LABEL: icmp_ne2
613; FAST:       xorl     %eax, %eax
614  %1 = icmp ne i32 %x, %x
615  ret i1 %1
616}
617
618define zeroext i1 @icmp_ugt2(i32 %x) {
619; SDAG-LABEL: icmp_ugt2
620; SDAG:       xorl     %eax, %eax
621; FAST-LABEL: icmp_ugt2
622; FAST:       xorl     %eax, %eax
623  %1 = icmp ugt i32 %x, %x
624  ret i1 %1
625}
626
627define zeroext i1 @icmp_uge2(i32 %x) {
628; SDAG-LABEL: icmp_uge2
629; SDAG:       movb     $1, %al
630; FAST-LABEL: icmp_uge2
631; FAST:       movb     $1, %al
632  %1 = icmp uge i32 %x, %x
633  ret i1 %1
634}
635
636define zeroext i1 @icmp_ult2(i32 %x) {
637; SDAG-LABEL: icmp_ult2
638; SDAG:       xorl     %eax, %eax
639; FAST-LABEL: icmp_ult2
640; FAST:       xorl     %eax, %eax
641  %1 = icmp ult i32 %x, %x
642  ret i1 %1
643}
644
645define zeroext i1 @icmp_ule2(i32 %x) {
646; SDAG-LABEL: icmp_ule2
647; SDAG:       movb     $1, %al
648; FAST-LABEL: icmp_ule2
649; FAST:       movb     $1, %al
650  %1 = icmp ule i32 %x, %x
651  ret i1 %1
652}
653
654define zeroext i1 @icmp_sgt2(i32 %x) {
655; SDAG-LABEL: icmp_sgt2
656; SDAG:       xorl     %eax, %eax
657; FAST-LABEL: icmp_sgt2
658; FAST:       xorl     %eax, %eax
659  %1 = icmp sgt i32 %x, %x
660  ret i1 %1
661}
662
663define zeroext i1 @icmp_sge2(i32 %x) {
664; SDAG-LABEL: icmp_sge2
665; SDAG:       movb     $1, %al
666; FAST-LABEL: icmp_sge2
667; FAST:       movb     $1, %al
668  %1 = icmp sge i32 %x, %x
669  ret i1 %1
670}
671
672define zeroext i1 @icmp_slt2(i32 %x) {
673; SDAG-LABEL: icmp_slt2
674; SDAG:       xorl     %eax, %eax
675; FAST-LABEL: icmp_slt2
676; FAST:       xorl     %eax, %eax
677  %1 = icmp slt i32 %x, %x
678  ret i1 %1
679}
680
681define zeroext i1 @icmp_sle2(i32 %x) {
682; SDAG-LABEL: icmp_sle2
683; SDAG:       movb     $1, %al
684; FAST-LABEL: icmp_sle2
685; FAST:       movb     $1, %al
686  %1 = icmp sle i32 %x, %x
687  ret i1 %1
688}
689
690