xref: /aosp_15_r20/external/llvm/test/CodeGen/X86/fpcmp-soft-fp.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=x86 -mcpu=pentium -mtriple=x86-linux-gnu -float-abi=soft | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Workerdefine i1 @test1(double %d) #0 {
4*9880d681SAndroid Build Coastguard Workerentry:
5*9880d681SAndroid Build Coastguard Worker  %cmp = fcmp ule double %d, 0.000000e+00
6*9880d681SAndroid Build Coastguard Worker  ret i1 %cmp
7*9880d681SAndroid Build Coastguard Worker}
8*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: test1:
9*9880d681SAndroid Build Coastguard Worker; CHECK: calll __gtdf2
10*9880d681SAndroid Build Coastguard Worker; CHECK: setle
11*9880d681SAndroid Build Coastguard Worker; CHECK: retl
12*9880d681SAndroid Build Coastguard Worker
13*9880d681SAndroid Build Coastguard Workerdefine i1 @test2(double %d) #0 {
14*9880d681SAndroid Build Coastguard Workerentry:
15*9880d681SAndroid Build Coastguard Worker  %cmp = fcmp ult double %d, 0.000000e+00
16*9880d681SAndroid Build Coastguard Worker  ret i1 %cmp
17*9880d681SAndroid Build Coastguard Worker}
18*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: test2:
19*9880d681SAndroid Build Coastguard Worker; CHECK: calll __gedf2
20*9880d681SAndroid Build Coastguard Worker; CHECK: sets
21*9880d681SAndroid Build Coastguard Worker; CHECK: retl
22*9880d681SAndroid Build Coastguard Worker
23*9880d681SAndroid Build Coastguard Workerdefine i1 @test3(double %d) #0 {
24*9880d681SAndroid Build Coastguard Workerentry:
25*9880d681SAndroid Build Coastguard Worker  %cmp = fcmp ugt double %d, 0.000000e+00
26*9880d681SAndroid Build Coastguard Worker  ret i1 %cmp
27*9880d681SAndroid Build Coastguard Worker}
28*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: test3:
29*9880d681SAndroid Build Coastguard Worker; CHECK: calll __ledf2
30*9880d681SAndroid Build Coastguard Worker; CHECK: setg
31*9880d681SAndroid Build Coastguard Worker; CHECK: retl
32*9880d681SAndroid Build Coastguard Worker
33*9880d681SAndroid Build Coastguard Workerdefine i1 @test4(double %d) #0 {
34*9880d681SAndroid Build Coastguard Workerentry:
35*9880d681SAndroid Build Coastguard Worker  %cmp = fcmp uge double %d, 0.000000e+00
36*9880d681SAndroid Build Coastguard Worker  ret i1 %cmp
37*9880d681SAndroid Build Coastguard Worker}
38*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: test4:
39*9880d681SAndroid Build Coastguard Worker; CHECK: calll __ltdf2
40*9880d681SAndroid Build Coastguard Worker; CHECK: setns
41*9880d681SAndroid Build Coastguard Worker; CHECK: retl
42*9880d681SAndroid Build Coastguard Worker
43*9880d681SAndroid Build Coastguard Workerdefine i1 @test5(double %d) #0 {
44*9880d681SAndroid Build Coastguard Workerentry:
45*9880d681SAndroid Build Coastguard Worker  %cmp = fcmp ole double %d, 0.000000e+00
46*9880d681SAndroid Build Coastguard Worker  ret i1 %cmp
47*9880d681SAndroid Build Coastguard Worker}
48*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: test5:
49*9880d681SAndroid Build Coastguard Worker; CHECK: calll __ledf2
50*9880d681SAndroid Build Coastguard Worker; CHECK: setle
51*9880d681SAndroid Build Coastguard Worker; CHECK: retl
52*9880d681SAndroid Build Coastguard Worker
53*9880d681SAndroid Build Coastguard Workerdefine i1 @test6(double %d) #0 {
54*9880d681SAndroid Build Coastguard Workerentry:
55*9880d681SAndroid Build Coastguard Worker  %cmp = fcmp olt double %d, 0.000000e+00
56*9880d681SAndroid Build Coastguard Worker  ret i1 %cmp
57*9880d681SAndroid Build Coastguard Worker}
58*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: test6:
59*9880d681SAndroid Build Coastguard Worker; CHECK: calll __ltdf2
60*9880d681SAndroid Build Coastguard Worker; CHECK: sets
61*9880d681SAndroid Build Coastguard Worker; CHECK: retl
62*9880d681SAndroid Build Coastguard Worker
63*9880d681SAndroid Build Coastguard Workerdefine i1 @test7(double %d) #0 {
64*9880d681SAndroid Build Coastguard Workerentry:
65*9880d681SAndroid Build Coastguard Worker  %cmp = fcmp ogt double %d, 0.000000e+00
66*9880d681SAndroid Build Coastguard Worker  ret i1 %cmp
67*9880d681SAndroid Build Coastguard Worker}
68*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: test7:
69*9880d681SAndroid Build Coastguard Worker; CHECK: calll __gtdf2
70*9880d681SAndroid Build Coastguard Worker; CHECK: setg
71*9880d681SAndroid Build Coastguard Worker; CHECK: retl
72*9880d681SAndroid Build Coastguard Worker
73*9880d681SAndroid Build Coastguard Workerdefine i1 @test8(double %d) #0 {
74*9880d681SAndroid Build Coastguard Workerentry:
75*9880d681SAndroid Build Coastguard Worker  %cmp = fcmp oge double %d, 0.000000e+00
76*9880d681SAndroid Build Coastguard Worker  ret i1 %cmp
77*9880d681SAndroid Build Coastguard Worker}
78*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: test8:
79*9880d681SAndroid Build Coastguard Worker; CHECK: calll __gedf2
80*9880d681SAndroid Build Coastguard Worker; CHECK: setns
81*9880d681SAndroid Build Coastguard Worker; CHECK: retl
82*9880d681SAndroid Build Coastguard Worker
83*9880d681SAndroid Build Coastguard Workerdefine i1 @test9(double %d) #0 {
84*9880d681SAndroid Build Coastguard Workerentry:
85*9880d681SAndroid Build Coastguard Worker  %cmp = fcmp oeq double %d, 0.000000e+00
86*9880d681SAndroid Build Coastguard Worker  ret i1 %cmp
87*9880d681SAndroid Build Coastguard Worker}
88*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: test9:
89*9880d681SAndroid Build Coastguard Worker; CHECK: calll __eqdf2
90*9880d681SAndroid Build Coastguard Worker; CHECK: sete
91*9880d681SAndroid Build Coastguard Worker; CHECK: retl
92*9880d681SAndroid Build Coastguard Worker
93*9880d681SAndroid Build Coastguard Workerdefine i1 @test10(double %d) #0 {
94*9880d681SAndroid Build Coastguard Workerentry:
95*9880d681SAndroid Build Coastguard Worker  %cmp = fcmp ueq double %d, 0.000000e+00
96*9880d681SAndroid Build Coastguard Worker  ret i1 %cmp
97*9880d681SAndroid Build Coastguard Worker}
98*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: test10:
99*9880d681SAndroid Build Coastguard Worker; CHECK: calll __eqdf2
100*9880d681SAndroid Build Coastguard Worker; CHECK: sete
101*9880d681SAndroid Build Coastguard Worker; CHECK: calll __unorddf2
102*9880d681SAndroid Build Coastguard Worker; CHECK: setne
103*9880d681SAndroid Build Coastguard Worker; CHECK: retl
104*9880d681SAndroid Build Coastguard Worker
105*9880d681SAndroid Build Coastguard Workerdefine i1 @test11(double %d) #0 {
106*9880d681SAndroid Build Coastguard Workerentry:
107*9880d681SAndroid Build Coastguard Worker  %cmp = fcmp one double %d, 0.000000e+00
108*9880d681SAndroid Build Coastguard Worker  ret i1 %cmp
109*9880d681SAndroid Build Coastguard Worker}
110*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: test11:
111*9880d681SAndroid Build Coastguard Worker; CHECK: calll __gtdf2
112*9880d681SAndroid Build Coastguard Worker; CHECK: setg
113*9880d681SAndroid Build Coastguard Worker; CHECK: calll __ltdf2
114*9880d681SAndroid Build Coastguard Worker; CHECK: sets
115*9880d681SAndroid Build Coastguard Worker; CHECK: retl
116*9880d681SAndroid Build Coastguard Worker
117*9880d681SAndroid Build Coastguard Workerdefine i1 @test12(double %d) #0 {
118*9880d681SAndroid Build Coastguard Workerentry:
119*9880d681SAndroid Build Coastguard Worker  %cmp = fcmp une double %d, 0.000000e+00
120*9880d681SAndroid Build Coastguard Worker  ret i1 %cmp
121*9880d681SAndroid Build Coastguard Worker}
122*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: test12:
123*9880d681SAndroid Build Coastguard Worker; CHECK: calll __nedf2
124*9880d681SAndroid Build Coastguard Worker; CHECK: setne
125*9880d681SAndroid Build Coastguard Worker; CHECK: retl
126*9880d681SAndroid Build Coastguard Worker
127*9880d681SAndroid Build Coastguard Workerattributes #0 = { "use-soft-float"="true" }
128