@@ -177,6 +177,26 @@ define i1 @oge_pinf_fmf(half %x) {
177
177
ret i1 %cmp
178
178
}
179
179
180
+ define <2 x i1 > @olt_pinf_vec (<2 x half > %x ) {
181
+ ; CHECK-LABEL: define <2 x i1> @olt_pinf_vec(
182
+ ; CHECK-SAME: <2 x half> [[X:%.*]]) {
183
+ ; CHECK-NEXT: [[CMP:%.*]] = fcmp one <2 x half> [[X]], <half 0xH7C00, half 0xH7C00>
184
+ ; CHECK-NEXT: ret <2 x i1> [[CMP]]
185
+ ;
186
+ %cmp = fcmp olt <2 x half > %x , <half 0xH7c00, half 0xH7c00>
187
+ ret <2 x i1 > %cmp
188
+ }
189
+
190
+ define <2 x i1 > @oge_ninf_vec (<2 x half > %x ) {
191
+ ; CHECK-LABEL: define <2 x i1> @oge_ninf_vec(
192
+ ; CHECK-SAME: <2 x half> [[X:%.*]]) {
193
+ ; CHECK-NEXT: [[CMP:%.*]] = fcmp ord <2 x half> [[X]], zeroinitializer
194
+ ; CHECK-NEXT: ret <2 x i1> [[CMP]]
195
+ ;
196
+ %cmp = fcmp oge <2 x half > %x , <half 0xHfc00, half 0xHfc00>
197
+ ret <2 x i1 > %cmp
198
+ }
199
+
180
200
; Negative tests
181
201
182
202
define i1 @ord_pinf (half %x ) {
@@ -189,6 +209,72 @@ define i1 @ord_pinf(half %x) {
189
209
ret i1 %cmp
190
210
}
191
211
212
+ define i1 @uno_pinf (half %x ) {
213
+ ; CHECK-LABEL: define i1 @uno_pinf(
214
+ ; CHECK-SAME: half [[X:%.*]]) {
215
+ ; CHECK-NEXT: [[CMP:%.*]] = fcmp uno half [[X]], 0xH0000
216
+ ; CHECK-NEXT: ret i1 [[CMP]]
217
+ ;
218
+ %cmp = fcmp uno half %x , 0xH7c00
219
+ ret i1 %cmp
220
+ }
221
+
222
+ define i1 @true_pinf (half %x ) {
223
+ ; CHECK-LABEL: define i1 @true_pinf(
224
+ ; CHECK-SAME: half [[X:%.*]]) {
225
+ ; CHECK-NEXT: ret i1 true
226
+ ;
227
+ %cmp = fcmp true half %x , 0xH7c00
228
+ ret i1 %cmp
229
+ }
230
+
231
+ define i1 @false_pinf (half %x ) {
232
+ ; CHECK-LABEL: define i1 @false_pinf(
233
+ ; CHECK-SAME: half [[X:%.*]]) {
234
+ ; CHECK-NEXT: ret i1 false
235
+ ;
236
+ %cmp = fcmp false half %x , 0xH7c00
237
+ ret i1 %cmp
238
+ }
239
+
240
+ define i1 @ord_ninf (half %x ) {
241
+ ; CHECK-LABEL: define i1 @ord_ninf(
242
+ ; CHECK-SAME: half [[X:%.*]]) {
243
+ ; CHECK-NEXT: [[CMP:%.*]] = fcmp ord half [[X]], 0xH0000
244
+ ; CHECK-NEXT: ret i1 [[CMP]]
245
+ ;
246
+ %cmp = fcmp ord half %x , 0xHfc00
247
+ ret i1 %cmp
248
+ }
249
+
250
+ define i1 @uno_ninf (half %x ) {
251
+ ; CHECK-LABEL: define i1 @uno_ninf(
252
+ ; CHECK-SAME: half [[X:%.*]]) {
253
+ ; CHECK-NEXT: [[CMP:%.*]] = fcmp uno half [[X]], 0xH0000
254
+ ; CHECK-NEXT: ret i1 [[CMP]]
255
+ ;
256
+ %cmp = fcmp uno half %x , 0xHfc00
257
+ ret i1 %cmp
258
+ }
259
+
260
+ define i1 @true_ninf (half %x ) {
261
+ ; CHECK-LABEL: define i1 @true_ninf(
262
+ ; CHECK-SAME: half [[X:%.*]]) {
263
+ ; CHECK-NEXT: ret i1 true
264
+ ;
265
+ %cmp = fcmp true half %x , 0xHfc00
266
+ ret i1 %cmp
267
+ }
268
+
269
+ define i1 @false_ninf (half %x ) {
270
+ ; CHECK-LABEL: define i1 @false_ninf(
271
+ ; CHECK-SAME: half [[X:%.*]]) {
272
+ ; CHECK-NEXT: ret i1 false
273
+ ;
274
+ %cmp = fcmp false half %x , 0xHfc00
275
+ ret i1 %cmp
276
+ }
277
+
192
278
define i1 @olt_one (half %x ) {
193
279
; CHECK-LABEL: define i1 @olt_one(
194
280
; CHECK-SAME: half [[X:%.*]]) {
0 commit comments