fast-isel-fcmp-nan.ll
2.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
; RUN: llc -verify-machineinstrs -mtriple powerpc64le-unknown-linux-gnu -fast-isel -O0 < %s | FileCheck %s
define i1 @TestULT(double %t0) {
; CHECK-LABEL: TestULT:
; CHECK: xscmpudp
; CHECK: blr
entry:
%t1 = fcmp ult double %t0, 0.000000e+00
br i1 %t1, label %good, label %bad
bad:
ret i1 false
good:
ret i1 true
}
define i1 @TestULE(double %t0) {
; CHECK-LABEL: TestULE:
; CHECK: xscmpudp
; CHECK-NEXT: ble
; CHECK: blr
entry:
%t1 = fcmp ule double %t0, 0.000000e+00
br i1 %t1, label %good, label %bad
bad:
ret i1 false
good:
ret i1 true
}
define i1 @TestUNE(double %t0) {
; CHECK-LABEL: TestUNE:
; CHECK: xscmpudp
; CHECK-NEXT: bne
; CHECK: blr
entry:
%t1 = fcmp une double %t0, 0.000000e+00
br i1 %t1, label %good, label %bad
bad:
ret i1 false
good:
ret i1 true
}
define i1 @TestUEQ(double %t0) {
; CHECK-LABEL: TestUEQ:
; CHECK: xscmpudp
; CHECK: blr
entry:
%t1 = fcmp ueq double %t0, 0.000000e+00
br i1 %t1, label %good, label %bad
bad:
ret i1 false
good:
ret i1 true
}
define i1 @TestUGT(double %t0) {
; CHECK-LABEL: TestUGT:
; CHECK: xscmpudp
; CHECK: blr
entry:
%t1 = fcmp ugt double %t0, 0.000000e+00
br i1 %t1, label %good, label %bad
bad:
ret i1 false
good:
ret i1 true
}
define i1 @TestUGE(double %t0) {
; CHECK-LABEL: TestUGE:
; CHECK: xscmpudp
; CHECK-NEXT: bge
; CHECK: blr
entry:
%t1 = fcmp uge double %t0, 0.000000e+00
br i1 %t1, label %good, label %bad
bad:
ret i1 false
good:
ret i1 true
}
define i1 @TestOLT(double %t0) {
; CHECK-LABEL: TestOLT:
; CHECK: xscmpudp
; CHECK-NEXT: blt
; CHECK: blr
entry:
%t1 = fcmp olt double %t0, 0.000000e+00
br i1 %t1, label %good, label %bad
bad:
ret i1 false
good:
ret i1 true
}
define i1 @TestOLE(double %t0) {
; CHECK-LABEL: TestOLE:
; CHECK: xscmpudp
; CHECK: blr
entry:
%t1 = fcmp ole double %t0, 0.000000e+00
br i1 %t1, label %good, label %bad
bad:
ret i1 false
good:
ret i1 true
}
define i1 @TestONE(double %t0) {
; CHECK-LABEL: TestONE:
; CHECK: xscmpudp
; CHECK: blr
entry:
%t1 = fcmp one double %t0, 0.000000e+00
br i1 %t1, label %good, label %bad
bad:
ret i1 false
good:
ret i1 true
}
define i1 @TestOEQ(double %t0) {
; CHECK-LABEL: TestOEQ:
; CHECK: xscmpudp
; CHECK-NEXT: beq
; CHECK: blr
entry:
%t1 = fcmp oeq double %t0, 0.000000e+00
br i1 %t1, label %good, label %bad
bad:
ret i1 false
good:
ret i1 true
}
define i1 @TestOGT(double %t0) {
; CHECK-LABEL: TestOGT:
; CHECK: xscmpudp
; CHECK-NEXT: bgt
; CHECK: blr
entry:
%t1 = fcmp ogt double %t0, 0.000000e+00
br i1 %t1, label %good, label %bad
bad:
ret i1 false
good:
ret i1 true
}
define i1 @TestOGE(double %t0) {
; CHECK-LABEL: TestOGE:
; CHECK: xscmpudp
; CHECK: blr
entry:
%t1 = fcmp oge double %t0, 0.000000e+00
br i1 %t1, label %good, label %bad
bad:
ret i1 false
good:
ret i1 true
}