1 ; RUN: llc < %s -mtriple=x86_64-- | FileCheck %s
3 ; Convert oeq and une to ole/oge/ule/uge when comparing with infinity
4 ; and negative infinity, because those are more efficient on x86.
6 declare void @f() nounwind
8 ; CHECK-LABEL: oeq_inff:
11 define void @oeq_inff(float %x) nounwind {
12 %t0 = fcmp oeq float %x, 0x7FF0000000000000
13 br i1 %t0, label %true, label %false
16 call void @f() nounwind
23 ; CHECK-LABEL: oeq_inf:
26 define void @oeq_inf(double %x) nounwind {
27 %t0 = fcmp oeq double %x, 0x7FF0000000000000
28 br i1 %t0, label %true, label %false
31 call void @f() nounwind
38 ; CHECK-LABEL: une_inff:
41 define void @une_inff(float %x) nounwind {
42 %t0 = fcmp une float %x, 0x7FF0000000000000
43 br i1 %t0, label %true, label %false
46 call void @f() nounwind
53 ; CHECK-LABEL: une_inf:
56 define void @une_inf(double %x) nounwind {
57 %t0 = fcmp une double %x, 0x7FF0000000000000
58 br i1 %t0, label %true, label %false
61 call void @f() nounwind
68 ; CHECK-LABEL: oeq_neg_inff:
71 define void @oeq_neg_inff(float %x) nounwind {
72 %t0 = fcmp oeq float %x, 0xFFF0000000000000
73 br i1 %t0, label %true, label %false
76 call void @f() nounwind
83 ; CHECK-LABEL: oeq_neg_inf:
86 define void @oeq_neg_inf(double %x) nounwind {
87 %t0 = fcmp oeq double %x, 0xFFF0000000000000
88 br i1 %t0, label %true, label %false
91 call void @f() nounwind
98 ; CHECK-LABEL: une_neg_inff:
101 define void @une_neg_inff(float %x) nounwind {
102 %t0 = fcmp une float %x, 0xFFF0000000000000
103 br i1 %t0, label %true, label %false
106 call void @f() nounwind
113 ; CHECK-LABEL: une_neg_inf:
116 define void @une_neg_inf(double %x) nounwind {
117 %t0 = fcmp une double %x, 0xFFF0000000000000
118 br i1 %t0, label %true, label %false
121 call void @f() nounwind