1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -S -passes=instcombine < %s | FileCheck %s
4 ; --------------------------------------------------------------------
6 ; --------------------------------------------------------------------
8 ; FIXME: Should this really be immarg?
9 ; define i1 @test_class_undef_mask_f32(float %x) {
10 ; %val = call i1 @llvm.is.fpclass.f32(float %x, i32 undef)
14 define i1 @test_class_no_mask_f32(float %x) {
15 ; CHECK-LABEL: @test_class_no_mask_f32(
16 ; CHECK-NEXT: ret i1 false
18 %val = call i1 @llvm.is.fpclass.f32(float %x, i32 0)
22 define i1 @test_class_full_mask_f32(float %x) {
23 ; CHECK-LABEL: @test_class_full_mask_f32(
24 ; CHECK-NEXT: ret i1 true
26 %val = call i1 @llvm.is.fpclass.f32(float %x, i32 1023)
30 define i1 @test_class_undef_no_mask_f32() {
31 ; CHECK-LABEL: @test_class_undef_no_mask_f32(
32 ; CHECK-NEXT: ret i1 false
34 %val = call i1 @llvm.is.fpclass.f32(float undef, i32 0)
38 define i1 @test_class_undef_full_mask_f32() {
39 ; CHECK-LABEL: @test_class_undef_full_mask_f32(
40 ; CHECK-NEXT: ret i1 true
42 %val = call i1 @llvm.is.fpclass.f32(float undef, i32 1023)
46 define i1 @test_class_poison_no_mask_f32() {
47 ; CHECK-LABEL: @test_class_poison_no_mask_f32(
48 ; CHECK-NEXT: ret i1 poison
50 %val = call i1 @llvm.is.fpclass.f32(float poison, i32 0)
54 define i1 @test_class_poison_full_mask_f32() {
55 ; CHECK-LABEL: @test_class_poison_full_mask_f32(
56 ; CHECK-NEXT: ret i1 poison
58 %val = call i1 @llvm.is.fpclass.f32(float poison, i32 1023)
62 define i1 @test_class_undef_val_f32() {
63 ; CHECK-LABEL: @test_class_undef_val_f32(
64 ; CHECK-NEXT: ret i1 undef
66 %val = call i1 @llvm.is.fpclass.f32(float undef, i32 4)
70 define i1 @test_class_poison_val_f32() {
71 ; CHECK-LABEL: @test_class_poison_val_f32(
72 ; CHECK-NEXT: ret i1 poison
74 %val = call i1 @llvm.is.fpclass.f32(float poison, i32 4)
78 ; FIXME: Should this really be immarg?
79 ; define i1 @test_class_undef_undef_f32() {
80 ; %val = call i1 @llvm.is.fpclass.f32(float undef, i32 undef)
84 ; FIXME: Should this really be immarg?
85 ; define i1 @test_class_var_mask_f32(float %x, i32 %mask) {
86 ; %val = call i1 @llvm.is.fpclass.f32(float %x, i32 %mask)
90 define i1 @test_class_isnan_f32(float %x) {
91 ; CHECK-LABEL: @test_class_isnan_f32(
92 ; CHECK-NEXT: [[VAL:%.*]] = fcmp uno float [[X:%.*]], 0.000000e+00
93 ; CHECK-NEXT: ret i1 [[VAL]]
95 %val = call i1 @llvm.is.fpclass.f32(float %x, i32 3)
99 define <2 x i1> @test_class_isnan_v2f32(<2 x float> %x) {
100 ; CHECK-LABEL: @test_class_isnan_v2f32(
101 ; CHECK-NEXT: [[VAL:%.*]] = fcmp uno <2 x float> [[X:%.*]], zeroinitializer
102 ; CHECK-NEXT: ret <2 x i1> [[VAL]]
104 %val = call <2 x i1> @llvm.is.fpclass.v2f32(<2 x float> %x, i32 3)
108 define i1 @test_class_isnan_f32_strict(float %x) strictfp {
109 ; CHECK-LABEL: @test_class_isnan_f32_strict(
110 ; CHECK-NEXT: [[VAL:%.*]] = call i1 @llvm.is.fpclass.f32(float [[X:%.*]], i32 3) #[[ATTR0:[0-9]+]]
111 ; CHECK-NEXT: ret i1 [[VAL]]
113 %val = call i1 @llvm.is.fpclass.f32(float %x, i32 3) strictfp
117 define i1 @test_class_is_p0_n0_f32(float %x) {
118 ; CHECK-LABEL: @test_class_is_p0_n0_f32(
119 ; CHECK-NEXT: [[VAL:%.*]] = fcmp oeq float [[X:%.*]], 0.000000e+00
120 ; CHECK-NEXT: ret i1 [[VAL]]
122 %val = call i1 @llvm.is.fpclass.f32(float %x, i32 96) ; fcZero
126 define <2 x i1> @test_class_is_p0_n0_v2f32(<2 x float> %x) {
127 ; CHECK-LABEL: @test_class_is_p0_n0_v2f32(
128 ; CHECK-NEXT: [[VAL:%.*]] = fcmp oeq <2 x float> [[X:%.*]], zeroinitializer
129 ; CHECK-NEXT: ret <2 x i1> [[VAL]]
131 %val = call <2 x i1> @llvm.is.fpclass.v2f32(<2 x float> %x, i32 96) ; fcZero
135 define <2 x i1> @test_class_is_p0_n0_v2f32_daz(<2 x float> %x) "denormal-fp-math-f32"="ieee,preserve-sign" {
136 ; CHECK-LABEL: @test_class_is_p0_n0_v2f32_daz(
137 ; CHECK-NEXT: [[VAL:%.*]] = call <2 x i1> @llvm.is.fpclass.v2f32(<2 x float> [[X:%.*]], i32 96)
138 ; CHECK-NEXT: ret <2 x i1> [[VAL]]
140 %val = call <2 x i1> @llvm.is.fpclass.v2f32(<2 x float> %x, i32 96) ; fcZero
144 define <2 x i1> @test_class_is_p0_n0_v2f32_dynamic(<2 x float> %x) "denormal-fp-math-f32"="ieee,dynamic" {
145 ; CHECK-LABEL: @test_class_is_p0_n0_v2f32_dynamic(
146 ; CHECK-NEXT: [[VAL:%.*]] = call <2 x i1> @llvm.is.fpclass.v2f32(<2 x float> [[X:%.*]], i32 96)
147 ; CHECK-NEXT: ret <2 x i1> [[VAL]]
149 %val = call <2 x i1> @llvm.is.fpclass.v2f32(<2 x float> %x, i32 96) ; fcZero
153 define i1 @test_class_is_p0_n0_or_nan_f32(float %x) {
154 ; CHECK-LABEL: @test_class_is_p0_n0_or_nan_f32(
155 ; CHECK-NEXT: [[VAL:%.*]] = fcmp ueq float [[X:%.*]], 0.000000e+00
156 ; CHECK-NEXT: ret i1 [[VAL]]
158 %val = call i1 @llvm.is.fpclass.f32(float %x, i32 99) ; fcZero|fcNan
162 define <2 x i1> @test_class_is_p0_n0_or_nan_v2f32(<2 x float> %x) {
163 ; CHECK-LABEL: @test_class_is_p0_n0_or_nan_v2f32(
164 ; CHECK-NEXT: [[VAL:%.*]] = fcmp ueq <2 x float> [[X:%.*]], zeroinitializer
165 ; CHECK-NEXT: ret <2 x i1> [[VAL]]
167 %val = call <2 x i1> @llvm.is.fpclass.v2f32(<2 x float> %x, i32 99) ; fcZero|fcNan
171 define i1 @test_class_is_p0_n0_or_nan_f32_daz(float %x) "denormal-fp-math-f32"="ieee,preserve-sign" {
172 ; CHECK-LABEL: @test_class_is_p0_n0_or_nan_f32_daz(
173 ; CHECK-NEXT: [[VAL:%.*]] = call i1 @llvm.is.fpclass.f32(float [[X:%.*]], i32 99)
174 ; CHECK-NEXT: ret i1 [[VAL]]
176 %val = call i1 @llvm.is.fpclass.f32(float %x, i32 99) ; fcZero|fcNan
180 define <2 x i1> @test_class_is_p0_n0_or_nan_v2f32_daz(<2 x float> %x) "denormal-fp-math-f32"="ieee,preserve-sign" {
181 ; CHECK-LABEL: @test_class_is_p0_n0_or_nan_v2f32_daz(
182 ; CHECK-NEXT: [[VAL:%.*]] = call <2 x i1> @llvm.is.fpclass.v2f32(<2 x float> [[X:%.*]], i32 99)
183 ; CHECK-NEXT: ret <2 x i1> [[VAL]]
185 %val = call <2 x i1> @llvm.is.fpclass.v2f32(<2 x float> %x, i32 99) ; fcZero|fcNan
189 define i1 @test_class_is_p0_n0_or_sub_or_nan_f32(float %x) {
190 ; CHECK-LABEL: @test_class_is_p0_n0_or_sub_or_nan_f32(
191 ; CHECK-NEXT: [[VAL:%.*]] = call i1 @llvm.is.fpclass.f32(float [[X:%.*]], i32 243)
192 ; CHECK-NEXT: ret i1 [[VAL]]
195 %val = call i1 @llvm.is.fpclass.f32(float %x, i32 243) ; fcZero|fcNan|fcSubnormal
199 define <2 x i1> @test_class_is_p0_n0_or_sub_or_nan_v2f32(<2 x float> %x) {
200 ; CHECK-LABEL: @test_class_is_p0_n0_or_sub_or_nan_v2f32(
201 ; CHECK-NEXT: [[VAL:%.*]] = call <2 x i1> @llvm.is.fpclass.v2f32(<2 x float> [[X:%.*]], i32 243)
202 ; CHECK-NEXT: ret <2 x i1> [[VAL]]
204 %val = call <2 x i1> @llvm.is.fpclass.v2f32(<2 x float> %x, i32 243) ; fcZero|fcNan|fcSubnormal
208 define i1 @test_class_is_p0_n0_or_sub_or_nan_f32_daz(float %x) "denormal-fp-math-f32"="ieee,preserve-sign" {
209 ; CHECK-LABEL: @test_class_is_p0_n0_or_sub_or_nan_f32_daz(
210 ; CHECK-NEXT: [[VAL:%.*]] = fcmp ueq float [[X:%.*]], 0.000000e+00
211 ; CHECK-NEXT: ret i1 [[VAL]]
213 %val = call i1 @llvm.is.fpclass.f32(float %x, i32 243) ; fcZero|fcNan|fcSubnormal
217 define <2 x i1> @test_class_is_p0_n0_or_sub_or_nan_v2f32_daz(<2 x float> %x) "denormal-fp-math-f32"="ieee,preserve-sign" {
218 ; CHECK-LABEL: @test_class_is_p0_n0_or_sub_or_nan_v2f32_daz(
219 ; CHECK-NEXT: [[VAL:%.*]] = fcmp ueq <2 x float> [[X:%.*]], zeroinitializer
220 ; CHECK-NEXT: ret <2 x i1> [[VAL]]
222 %val = call <2 x i1> @llvm.is.fpclass.v2f32(<2 x float> %x, i32 243) ; fcZero|fcNan|fcSubnormal
226 define i1 @test_class_is_p0_n0_or_sub_or_snan_f32_daz(float %x) "denormal-fp-math-f32"="ieee,preserve-sign" {
227 ; CHECK-LABEL: @test_class_is_p0_n0_or_sub_or_snan_f32_daz(
228 ; CHECK-NEXT: [[VAL:%.*]] = call i1 @llvm.is.fpclass.f32(float [[X:%.*]], i32 241)
229 ; CHECK-NEXT: ret i1 [[VAL]]
231 %val = call i1 @llvm.is.fpclass.f32(float %x, i32 241) ; fcZero|fcSNan|fcSubnormal
235 define i1 @test_class_is_p0_n0_or_sub_or_qnan_f32_daz(float %x) "denormal-fp-math-f32"="ieee,preserve-sign" {
236 ; CHECK-LABEL: @test_class_is_p0_n0_or_sub_or_qnan_f32_daz(
237 ; CHECK-NEXT: [[VAL:%.*]] = call i1 @llvm.is.fpclass.f32(float [[X:%.*]], i32 242)
238 ; CHECK-NEXT: ret i1 [[VAL]]
240 %val = call i1 @llvm.is.fpclass.f32(float %x, i32 242) ; fcZero|fcQNan|fcSubnormal
244 define i1 @test_class_is_not_p0_n0_or_nan_f32(float %x) {
245 ; CHECK-LABEL: @test_class_is_not_p0_n0_or_nan_f32(
246 ; CHECK-NEXT: [[VAL:%.*]] = fcmp one float [[X:%.*]], 0.000000e+00
247 ; CHECK-NEXT: ret i1 [[VAL]]
249 %val = call i1 @llvm.is.fpclass.f32(float %x, i32 924) ; ~fcZero & ~fcNan & fcAllFlags
253 define i1 @test_class_is_not_p0_n0_or_qnan_f32(float %x) {
254 ; CHECK-LABEL: @test_class_is_not_p0_n0_or_qnan_f32(
255 ; CHECK-NEXT: [[VAL:%.*]] = call i1 @llvm.is.fpclass.f32(float [[X:%.*]], i32 926)
256 ; CHECK-NEXT: ret i1 [[VAL]]
258 %val = call i1 @llvm.is.fpclass.f32(float %x, i32 926) ; ~fcZero & ~fcSNan & fcAllFlags
262 define i1 @test_class_is_not_p0_n0_or_snan_f32(float %x) {
263 ; CHECK-LABEL: @test_class_is_not_p0_n0_or_snan_f32(
264 ; CHECK-NEXT: [[VAL:%.*]] = call i1 @llvm.is.fpclass.f32(float [[X:%.*]], i32 925)
265 ; CHECK-NEXT: ret i1 [[VAL]]
267 %val = call i1 @llvm.is.fpclass.f32(float %x, i32 925) ; ~fcZero & ~fcQNan & fcAllFlags
271 define i1 @test_class_is_not_p0_n0_or_nan_f32_daz(float %x) "denormal-fp-math-f32"="ieee,preserve-sign" {
272 ; CHECK-LABEL: @test_class_is_not_p0_n0_or_nan_f32_daz(
273 ; CHECK-NEXT: [[VAL:%.*]] = call i1 @llvm.is.fpclass.f32(float [[X:%.*]], i32 924)
274 ; CHECK-NEXT: ret i1 [[VAL]]
276 %val = call i1 @llvm.is.fpclass.f32(float %x, i32 924) ; ~fcZero & ~fcNan & fcAllFlags
280 define i1 @test_class_is_not_p0_n0_or_sub_or_nan_f32(float %x) {
281 ; CHECK-LABEL: @test_class_is_not_p0_n0_or_sub_or_nan_f32(
282 ; CHECK-NEXT: [[VAL:%.*]] = call i1 @llvm.is.fpclass.f32(float [[X:%.*]], i32 783)
283 ; CHECK-NEXT: ret i1 [[VAL]]
285 %val = call i1 @llvm.is.fpclass.f32(float %x, i32 783) ; ~(fcZero|fcSubnormal) | fcNan
289 define i1 @test_class_is_not_p0_n0_or_sub_or_nan_f32_daz(float %x) "denormal-fp-math-f32"="ieee,preserve-sign" {
290 ; CHECK-LABEL: @test_class_is_not_p0_n0_or_sub_or_nan_f32_daz(
291 ; CHECK-NEXT: [[VAL:%.*]] = fcmp une float [[X:%.*]], 0.000000e+00
292 ; CHECK-NEXT: ret i1 [[VAL]]
294 %val = call i1 @llvm.is.fpclass.f32(float %x, i32 783) ; ~(fcZero|fcSubnormal) | fcNan
298 define i1 @test_class_is_not_p0_n0_or_sub_and_not_nan_f32(float %x) {
299 ; CHECK-LABEL: @test_class_is_not_p0_n0_or_sub_and_not_nan_f32(
300 ; CHECK-NEXT: [[VAL:%.*]] = call i1 @llvm.is.fpclass.f32(float [[X:%.*]], i32 780)
301 ; CHECK-NEXT: ret i1 [[VAL]]
303 %val = call i1 @llvm.is.fpclass.f32(float %x, i32 780) ; ~(fcZero|fcSubnormal) & ~fcNan & fcAllFlags
307 define i1 @test_class_is_not_p0_n0_or_sub_and_not_nan_f32_daz(float %x) "denormal-fp-math-f32"="ieee,preserve-sign" {
308 ; CHECK-LABEL: @test_class_is_not_p0_n0_or_sub_and_not_nan_f32_daz(
309 ; CHECK-NEXT: [[VAL:%.*]] = fcmp one float [[X:%.*]], 0.000000e+00
310 ; CHECK-NEXT: ret i1 [[VAL]]
312 %val = call i1 @llvm.is.fpclass.f32(float %x, i32 780) ; ~(fcZero|fcSubonrmal) & ~fcNan & fcAllFlags
316 define i1 @test_class_is_not_p0_n0_f32(float %x) {
317 ; CHECK-LABEL: @test_class_is_not_p0_n0_f32(
318 ; CHECK-NEXT: [[VAL:%.*]] = fcmp une float [[X:%.*]], 0.000000e+00
319 ; CHECK-NEXT: ret i1 [[VAL]]
321 %val = call i1 @llvm.is.fpclass.f32(float %x, i32 927) ; ~fcZero & fcAllFlags
325 define <2 x i1> @test_class_is_not_p0_n0_v2f32(<2 x float> %x) {
326 ; CHECK-LABEL: @test_class_is_not_p0_n0_v2f32(
327 ; CHECK-NEXT: [[VAL:%.*]] = fcmp une <2 x float> [[X:%.*]], zeroinitializer
328 ; CHECK-NEXT: ret <2 x i1> [[VAL]]
330 %val = call <2 x i1> @llvm.is.fpclass.v2f32(<2 x float> %x, i32 927) ; ~fcZero & fcAllFlags
334 define i1 @test_class_is_not_p0_n0_f32_strict(float %x) strictfp {
335 ; CHECK-LABEL: @test_class_is_not_p0_n0_f32_strict(
336 ; CHECK-NEXT: [[VAL:%.*]] = call i1 @llvm.is.fpclass.f32(float [[X:%.*]], i32 927) #[[ATTR0]]
337 ; CHECK-NEXT: ret i1 [[VAL]]
339 %val = call i1 @llvm.is.fpclass.f32(float %x, i32 927) strictfp ; ~fcZero & fcAllFlags
343 define i1 @test_class_is_not_p0_n0_f32_daz(float %x) "denormal-fp-math"="ieee,preserve-sign" {
344 ; CHECK-LABEL: @test_class_is_not_p0_n0_f32_daz(
345 ; CHECK-NEXT: [[VAL:%.*]] = call i1 @llvm.is.fpclass.f32(float [[X:%.*]], i32 927)
346 ; CHECK-NEXT: ret i1 [[VAL]]
348 %val = call i1 @llvm.is.fpclass.f32(float %x, i32 927) ; ~fcZero & fcAllFlags
352 define i1 @test_class_is_not_p0_n0_f32_dynamic(float %x) "denormal-fp-math"="ieee,dynamic" {
353 ; CHECK-LABEL: @test_class_is_not_p0_n0_f32_dynamic(
354 ; CHECK-NEXT: [[VAL:%.*]] = call i1 @llvm.is.fpclass.f32(float [[X:%.*]], i32 927)
355 ; CHECK-NEXT: ret i1 [[VAL]]
357 %val = call i1 @llvm.is.fpclass.f32(float %x, i32 927) ; ~fcZero & fcAllFlags
361 define i1 @test_class_is_not_p0_n0_psub_nsub_f32_daz(float %x) "denormal-fp-math"="ieee,preserve-sign" {
362 ; CHECK-LABEL: @test_class_is_not_p0_n0_psub_nsub_f32_daz(
363 ; CHECK-NEXT: [[VAL:%.*]] = fcmp une float [[X:%.*]], 0.000000e+00
364 ; CHECK-NEXT: ret i1 [[VAL]]
366 %val = call i1 @llvm.is.fpclass.f32(float %x, i32 783) ; ~(fcZero|fcSubnormal) & fcAllFlags
370 define i1 @test_class_is_not_p0_n0_psub_nsub_f32_dapz(float %x) "denormal-fp-math"="ieee,positive-zero" {
371 ; CHECK-LABEL: @test_class_is_not_p0_n0_psub_nsub_f32_dapz(
372 ; CHECK-NEXT: [[VAL:%.*]] = fcmp une float [[X:%.*]], 0.000000e+00
373 ; CHECK-NEXT: ret i1 [[VAL]]
375 %val = call i1 @llvm.is.fpclass.f32(float %x, i32 783) ; ~(fcZero|fcSubnormal) & fcAllFlags
379 define i1 @test_class_is_not_p0_n0_psub_nsub_f32_dynamic(float %x) "denormal-fp-math"="ieee,dynamic" {
380 ; CHECK-LABEL: @test_class_is_not_p0_n0_psub_nsub_f32_dynamic(
381 ; CHECK-NEXT: [[VAL:%.*]] = call i1 @llvm.is.fpclass.f32(float [[X:%.*]], i32 783)
382 ; CHECK-NEXT: ret i1 [[VAL]]
384 %val = call i1 @llvm.is.fpclass.f32(float %x, i32 783) ; ~(fcZero|fcSubnormal) & fcAllFlags
388 define i1 @test_class_is_p0_n0_f32_strict(float %x) strictfp {
389 ; CHECK-LABEL: @test_class_is_p0_n0_f32_strict(
390 ; CHECK-NEXT: [[VAL:%.*]] = call i1 @llvm.is.fpclass.f32(float [[X:%.*]], i32 96) #[[ATTR0]]
391 ; CHECK-NEXT: ret i1 [[VAL]]
393 %val = call i1 @llvm.is.fpclass.f32(float %x, i32 96) strictfp
397 define i1 @test_class_is_p0_n0_f32_daz(float %x) "denormal-fp-math"="ieee,preserve-sign" {
398 ; CHECK-LABEL: @test_class_is_p0_n0_f32_daz(
399 ; CHECK-NEXT: [[VAL:%.*]] = call i1 @llvm.is.fpclass.f32(float [[X:%.*]], i32 96)
400 ; CHECK-NEXT: ret i1 [[VAL]]
402 %val = call i1 @llvm.is.fpclass.f32(float %x, i32 96) ; fcZero
406 define i1 @test_class_is_p0_n0_f32_dapz(float %x) "denormal-fp-math"="ieee,positive-zero" {
407 ; CHECK-LABEL: @test_class_is_p0_n0_f32_dapz(
408 ; CHECK-NEXT: [[VAL:%.*]] = call i1 @llvm.is.fpclass.f32(float [[X:%.*]], i32 96)
409 ; CHECK-NEXT: ret i1 [[VAL]]
411 %val = call i1 @llvm.is.fpclass.f32(float %x, i32 96) ; fcZero
415 define i1 @test_class_is_p0_n0_psub_nsub_f32(float %x) {
416 ; CHECK-LABEL: @test_class_is_p0_n0_psub_nsub_f32(
417 ; CHECK-NEXT: [[VAL:%.*]] = call i1 @llvm.is.fpclass.f32(float [[X:%.*]], i32 240)
418 ; CHECK-NEXT: ret i1 [[VAL]]
420 %val = call i1 @llvm.is.fpclass.f32(float %x, i32 240) ; fcZero | fcSubnormal
424 define i1 @test_class_is_p0_n0_psub_nsub_f32_daz(float %x) "denormal-fp-math"="ieee,preserve-sign" {
425 ; CHECK-LABEL: @test_class_is_p0_n0_psub_nsub_f32_daz(
426 ; CHECK-NEXT: [[VAL:%.*]] = fcmp oeq float [[X:%.*]], 0.000000e+00
427 ; CHECK-NEXT: ret i1 [[VAL]]
429 %val = call i1 @llvm.is.fpclass.f32(float %x, i32 240) ; fcZero | fcSubnormal
433 define i1 @test_class_is_p0_n0_psub_nsub_f32_dapz(float %x) "denormal-fp-math"="ieee,positive-zero" {
434 ; CHECK-LABEL: @test_class_is_p0_n0_psub_nsub_f32_dapz(
435 ; CHECK-NEXT: [[VAL:%.*]] = fcmp oeq float [[X:%.*]], 0.000000e+00
436 ; CHECK-NEXT: ret i1 [[VAL]]
438 %val = call i1 @llvm.is.fpclass.f32(float %x, i32 240) ; fcZero | fcSubnormal
442 define i1 @test_class_is_p0_n0_psub_nsub_f32_dynamic(float %x) "denormal-fp-math"="ieee,dynamic" {
443 ; CHECK-LABEL: @test_class_is_p0_n0_psub_nsub_f32_dynamic(
444 ; CHECK-NEXT: [[VAL:%.*]] = call i1 @llvm.is.fpclass.f32(float [[X:%.*]], i32 240)
445 ; CHECK-NEXT: ret i1 [[VAL]]
447 %val = call i1 @llvm.is.fpclass.f32(float %x, i32 240) ; fcZero | fcSubnormal
451 define <2 x i1> @test_class_is_p0_n0_psub_nsub_v2f32(<2 x float> %x) {
452 ; CHECK-LABEL: @test_class_is_p0_n0_psub_nsub_v2f32(
453 ; CHECK-NEXT: [[VAL:%.*]] = call <2 x i1> @llvm.is.fpclass.v2f32(<2 x float> [[X:%.*]], i32 240)
454 ; CHECK-NEXT: ret <2 x i1> [[VAL]]
456 %val = call <2 x i1> @llvm.is.fpclass.v2f32(<2 x float> %x, i32 240) ; fcZero | fcSubnormal
460 define <2 x i1> @test_class_is_p0_n0_psub_nsub_v2f32_daz(<2 x float> %x) "denormal-fp-math"="ieee,preserve-sign" {
461 ; CHECK-LABEL: @test_class_is_p0_n0_psub_nsub_v2f32_daz(
462 ; CHECK-NEXT: [[VAL:%.*]] = fcmp oeq <2 x float> [[X:%.*]], zeroinitializer
463 ; CHECK-NEXT: ret <2 x i1> [[VAL]]
465 %val = call <2 x i1> @llvm.is.fpclass.v2f32(<2 x float> %x, i32 240) ; fcZero | fcSubnormal
469 define <2 x i1> @test_class_is_p0_n0_psub_nsub_v2f32_dapz(<2 x float> %x) "denormal-fp-math"="ieee,positive-zero" {
470 ; CHECK-LABEL: @test_class_is_p0_n0_psub_nsub_v2f32_dapz(
471 ; CHECK-NEXT: [[VAL:%.*]] = fcmp oeq <2 x float> [[X:%.*]], zeroinitializer
472 ; CHECK-NEXT: ret <2 x i1> [[VAL]]
474 %val = call <2 x i1> @llvm.is.fpclass.v2f32(<2 x float> %x, i32 240) ; fcZero | fcSubnormal
478 define <2 x i1> @test_class_is_p0_n0_psub_nsub_v2f32_dynamic(<2 x float> %x) "denormal-fp-math"="ieee,dynamic" {
479 ; CHECK-LABEL: @test_class_is_p0_n0_psub_nsub_v2f32_dynamic(
480 ; CHECK-NEXT: [[VAL:%.*]] = call <2 x i1> @llvm.is.fpclass.v2f32(<2 x float> [[X:%.*]], i32 240)
481 ; CHECK-NEXT: ret <2 x i1> [[VAL]]
483 %val = call <2 x i1> @llvm.is.fpclass.v2f32(<2 x float> %x, i32 240) ; fcZero | fcSubnormal
487 define i1 @test_class_is_pinf_f32(float %x) {
488 ; CHECK-LABEL: @test_class_is_pinf_f32(
489 ; CHECK-NEXT: [[VAL:%.*]] = fcmp oeq float [[X:%.*]], 0x7FF0000000000000
490 ; CHECK-NEXT: ret i1 [[VAL]]
492 %val = call i1 @llvm.is.fpclass.f32(float %x, i32 512) ; fcPosInf
496 define i1 @test_class_is_pinf_or_nan_f32(float %x) {
497 ; CHECK-LABEL: @test_class_is_pinf_or_nan_f32(
498 ; CHECK-NEXT: [[VAL:%.*]] = fcmp ueq float [[X:%.*]], 0x7FF0000000000000
499 ; CHECK-NEXT: ret i1 [[VAL]]
501 %val = call i1 @llvm.is.fpclass.f32(float %x, i32 515) ; fcPosInf|fcNan
505 define <2 x i1> @test_class_is_pinf_v2f32(<2 x float> %x) {
506 ; CHECK-LABEL: @test_class_is_pinf_v2f32(
507 ; CHECK-NEXT: [[VAL:%.*]] = fcmp oeq <2 x float> [[X:%.*]], splat (float 0x7FF0000000000000)
508 ; CHECK-NEXT: ret <2 x i1> [[VAL]]
510 %val = call <2 x i1> @llvm.is.fpclass.v2f32(<2 x float> %x, i32 512) ; fcPosInf
514 define i1 @test_class_is_ninf_f32(float %x) {
515 ; CHECK-LABEL: @test_class_is_ninf_f32(
516 ; CHECK-NEXT: [[VAL:%.*]] = fcmp oeq float [[X:%.*]], 0xFFF0000000000000
517 ; CHECK-NEXT: ret i1 [[VAL]]
519 %val = call i1 @llvm.is.fpclass.f32(float %x, i32 4) ; fcNegInf
523 define i1 @test_class_is_ninf_or_nan_f32(float %x) {
524 ; CHECK-LABEL: @test_class_is_ninf_or_nan_f32(
525 ; CHECK-NEXT: [[VAL:%.*]] = fcmp ueq float [[X:%.*]], 0xFFF0000000000000
526 ; CHECK-NEXT: ret i1 [[VAL]]
528 %val = call i1 @llvm.is.fpclass.f32(float %x, i32 7) ; fcNegInf|fcNan
532 define <2 x i1> @test_class_is_ninf_v2f32(<2 x float> %x) {
533 ; CHECK-LABEL: @test_class_is_ninf_v2f32(
534 ; CHECK-NEXT: [[VAL:%.*]] = fcmp oeq <2 x float> [[X:%.*]], splat (float 0xFFF0000000000000)
535 ; CHECK-NEXT: ret <2 x i1> [[VAL]]
537 %val = call <2 x i1> @llvm.is.fpclass.v2f32(<2 x float> %x, i32 4) ; fcNegInf
541 define i1 @test_class_is_inf_f32(float %x) {
542 ; CHECK-LABEL: @test_class_is_inf_f32(
543 ; CHECK-NEXT: [[TMP1:%.*]] = call float @llvm.fabs.f32(float [[X:%.*]])
544 ; CHECK-NEXT: [[VAL:%.*]] = fcmp oeq float [[TMP1]], 0x7FF0000000000000
545 ; CHECK-NEXT: ret i1 [[VAL]]
547 %val = call i1 @llvm.is.fpclass.f32(float %x, i32 516) ; fcInf
551 define <2 x i1> @test_class_is_inf_v2f32(<2 x float> %x) {
552 ; CHECK-LABEL: @test_class_is_inf_v2f32(
553 ; CHECK-NEXT: [[TMP1:%.*]] = call <2 x float> @llvm.fabs.v2f32(<2 x float> [[X:%.*]])
554 ; CHECK-NEXT: [[VAL:%.*]] = fcmp oeq <2 x float> [[TMP1]], splat (float 0x7FF0000000000000)
555 ; CHECK-NEXT: ret <2 x i1> [[VAL]]
557 %val = call <2 x i1> @llvm.is.fpclass.v2f32(<2 x float> %x, i32 516) ; fcInf
561 define i1 @test_class_is_inf_or_nan_f32(float %x) {
562 ; CHECK-LABEL: @test_class_is_inf_or_nan_f32(
563 ; CHECK-NEXT: [[TMP1:%.*]] = call float @llvm.fabs.f32(float [[X:%.*]])
564 ; CHECK-NEXT: [[VAL:%.*]] = fcmp ueq float [[TMP1]], 0x7FF0000000000000
565 ; CHECK-NEXT: ret i1 [[VAL]]
567 %val = call i1 @llvm.is.fpclass.f32(float %x, i32 519) ; fcInf|fcNan
571 define i1 @test_class_is_pinf_f32_strict(float %x) strictfp {
572 ; CHECK-LABEL: @test_class_is_pinf_f32_strict(
573 ; CHECK-NEXT: [[VAL:%.*]] = call i1 @llvm.is.fpclass.f32(float [[X:%.*]], i32 512) #[[ATTR0]]
574 ; CHECK-NEXT: ret i1 [[VAL]]
576 %val = call i1 @llvm.is.fpclass.f32(float %x, i32 512) strictfp ; fcPosInf
580 define i1 @test_class_is_ninf_f32_strict(float %x) strictfp {
581 ; CHECK-LABEL: @test_class_is_ninf_f32_strict(
582 ; CHECK-NEXT: [[VAL:%.*]] = call i1 @llvm.is.fpclass.f32(float [[X:%.*]], i32 4) #[[ATTR0]]
583 ; CHECK-NEXT: ret i1 [[VAL]]
585 %val = call i1 @llvm.is.fpclass.f32(float %x, i32 4) strictfp ; fcNegInf
589 define i1 @test_class_is_inf_f32_strict(float %x) strictfp {
590 ; CHECK-LABEL: @test_class_is_inf_f32_strict(
591 ; CHECK-NEXT: [[VAL:%.*]] = call i1 @llvm.is.fpclass.f32(float [[X:%.*]], i32 516) #[[ATTR0]]
592 ; CHECK-NEXT: ret i1 [[VAL]]
594 %val = call i1 @llvm.is.fpclass.f32(float %x, i32 516) strictfp ; fcInf
598 define i1 @test_class_is_pinf_or_nan_f32_strict(float %x) strictfp {
599 ; CHECK-LABEL: @test_class_is_pinf_or_nan_f32_strict(
600 ; CHECK-NEXT: [[VAL:%.*]] = call i1 @llvm.is.fpclass.f32(float [[X:%.*]], i32 515) #[[ATTR0]]
601 ; CHECK-NEXT: ret i1 [[VAL]]
603 %val = call i1 @llvm.is.fpclass.f32(float %x, i32 515) strictfp ; fcPosInf|fcNan
607 define i1 @test_class_is_ninf_or_nan_f32_strict(float %x) strictfp {
608 ; CHECK-LABEL: @test_class_is_ninf_or_nan_f32_strict(
609 ; CHECK-NEXT: [[VAL:%.*]] = call i1 @llvm.is.fpclass.f32(float [[X:%.*]], i32 7) #[[ATTR0]]
610 ; CHECK-NEXT: ret i1 [[VAL]]
612 %val = call i1 @llvm.is.fpclass.f32(float %x, i32 7) strictfp ; fcNegInf|fcNan
616 define i1 @test_class_is_inf_or_nan_f32_strict(float %x) strictfp {
617 ; CHECK-LABEL: @test_class_is_inf_or_nan_f32_strict(
618 ; CHECK-NEXT: [[VAL:%.*]] = call i1 @llvm.is.fpclass.f32(float [[X:%.*]], i32 519) #[[ATTR0]]
619 ; CHECK-NEXT: ret i1 [[VAL]]
621 %val = call i1 @llvm.is.fpclass.f32(float %x, i32 519) strictfp ; fcInf|fcNan
625 define i1 @test_constant_class_snan_test_snan_f64() {
626 ; CHECK-LABEL: @test_constant_class_snan_test_snan_f64(
627 ; CHECK-NEXT: ret i1 true
629 %val = call i1 @llvm.is.fpclass.f64(double 0x7FF0000000000001, i32 1)
633 define i1 @test_constant_class_qnan_test_qnan_f64() {
634 ; CHECK-LABEL: @test_constant_class_qnan_test_qnan_f64(
635 ; CHECK-NEXT: ret i1 true
637 %val = call i1 @llvm.is.fpclass.f64(double 0x7FF8000000000000, i32 2)
641 define i1 @test_constant_class_qnan_test_snan_f64() {
642 ; CHECK-LABEL: @test_constant_class_qnan_test_snan_f64(
643 ; CHECK-NEXT: ret i1 false
645 %val = call i1 @llvm.is.fpclass.f64(double 0x7FF8000000000000, i32 1)
649 define i1 @test_constant_class_ninf_test_ninf_f64() {
650 ; CHECK-LABEL: @test_constant_class_ninf_test_ninf_f64(
651 ; CHECK-NEXT: ret i1 true
653 %val = call i1 @llvm.is.fpclass.f64(double 0xFFF0000000000000, i32 4)
657 define i1 @test_constant_class_pinf_test_ninf_f64() {
658 ; CHECK-LABEL: @test_constant_class_pinf_test_ninf_f64(
659 ; CHECK-NEXT: ret i1 false
661 %val = call i1 @llvm.is.fpclass.f64(double 0x7FF0000000000000, i32 4)
665 define i1 @test_constant_class_qnan_test_ninf_f64() {
666 ; CHECK-LABEL: @test_constant_class_qnan_test_ninf_f64(
667 ; CHECK-NEXT: ret i1 false
669 %val = call i1 @llvm.is.fpclass.f64(double 0x7FF8000000000000, i32 4)
673 define i1 @test_constant_class_snan_test_ninf_f64() {
674 ; CHECK-LABEL: @test_constant_class_snan_test_ninf_f64(
675 ; CHECK-NEXT: ret i1 false
677 %val = call i1 @llvm.is.fpclass.f64(double 0x7FF0000000000001, i32 4)
681 define i1 @test_constant_class_nnormal_test_nnormal_f64() {
682 ; CHECK-LABEL: @test_constant_class_nnormal_test_nnormal_f64(
683 ; CHECK-NEXT: ret i1 true
685 %val = call i1 @llvm.is.fpclass.f64(double -1.0, i32 8)
689 define i1 @test_constant_class_pnormal_test_nnormal_f64() {
690 ; CHECK-LABEL: @test_constant_class_pnormal_test_nnormal_f64(
691 ; CHECK-NEXT: ret i1 false
693 %val = call i1 @llvm.is.fpclass.f64(double 1.0, i32 8)
697 define i1 @test_constant_class_nsubnormal_test_nsubnormal_f64() {
698 ; CHECK-LABEL: @test_constant_class_nsubnormal_test_nsubnormal_f64(
699 ; CHECK-NEXT: ret i1 true
701 %val = call i1 @llvm.is.fpclass.f64(double 0x800fffffffffffff, i32 16)
705 define i1 @test_constant_class_psubnormal_test_nsubnormal_f64() {
706 ; CHECK-LABEL: @test_constant_class_psubnormal_test_nsubnormal_f64(
707 ; CHECK-NEXT: ret i1 false
709 %val = call i1 @llvm.is.fpclass.f64(double 0x000fffffffffffff, i32 16)
713 define i1 @test_constant_class_nzero_test_nzero_f64() {
714 ; CHECK-LABEL: @test_constant_class_nzero_test_nzero_f64(
715 ; CHECK-NEXT: ret i1 true
717 %val = call i1 @llvm.is.fpclass.f64(double -0.0, i32 32)
721 define i1 @test_constant_class_pzero_test_nzero_f64() {
722 ; CHECK-LABEL: @test_constant_class_pzero_test_nzero_f64(
723 ; CHECK-NEXT: ret i1 false
725 %val = call i1 @llvm.is.fpclass.f64(double 0.0, i32 32)
729 define i1 @test_constant_class_pzero_test_pzero_f64() {
730 ; CHECK-LABEL: @test_constant_class_pzero_test_pzero_f64(
731 ; CHECK-NEXT: ret i1 true
733 %val = call i1 @llvm.is.fpclass.f64(double 0.0, i32 64)
737 define i1 @test_constant_class_nzero_test_pzero_f64() {
738 ; CHECK-LABEL: @test_constant_class_nzero_test_pzero_f64(
739 ; CHECK-NEXT: ret i1 false
741 %val = call i1 @llvm.is.fpclass.f64(double -0.0, i32 64)
745 define i1 @test_constant_class_psubnormal_test_psubnormal_f64() {
746 ; CHECK-LABEL: @test_constant_class_psubnormal_test_psubnormal_f64(
747 ; CHECK-NEXT: ret i1 true
749 %val = call i1 @llvm.is.fpclass.f64(double 0x000fffffffffffff, i32 128)
753 define i1 @test_constant_class_nsubnormal_test_psubnormal_f64() {
754 ; CHECK-LABEL: @test_constant_class_nsubnormal_test_psubnormal_f64(
755 ; CHECK-NEXT: ret i1 false
757 %val = call i1 @llvm.is.fpclass.f64(double 0x800fffffffffffff, i32 128)
761 define i1 @test_constant_class_pnormal_test_pnormal_f64() {
762 ; CHECK-LABEL: @test_constant_class_pnormal_test_pnormal_f64(
763 ; CHECK-NEXT: ret i1 true
765 %val = call i1 @llvm.is.fpclass.f64(double 1.0, i32 256)
769 define i1 @test_constant_class_nnormal_test_pnormal_f64() {
770 ; CHECK-LABEL: @test_constant_class_nnormal_test_pnormal_f64(
771 ; CHECK-NEXT: ret i1 false
773 %val = call i1 @llvm.is.fpclass.f64(double -1.0, i32 256)
777 define i1 @test_constant_class_pinf_test_pinf_f64() {
778 ; CHECK-LABEL: @test_constant_class_pinf_test_pinf_f64(
779 ; CHECK-NEXT: ret i1 true
781 %val = call i1 @llvm.is.fpclass.f64(double 0x7FF0000000000000, i32 512)
785 define i1 @test_constant_class_ninf_test_pinf_f64() {
786 ; CHECK-LABEL: @test_constant_class_ninf_test_pinf_f64(
787 ; CHECK-NEXT: ret i1 false
789 %val = call i1 @llvm.is.fpclass.f64(double 0xFFF0000000000000, i32 512)
793 define i1 @test_constant_class_qnan_test_pinf_f64() {
794 ; CHECK-LABEL: @test_constant_class_qnan_test_pinf_f64(
795 ; CHECK-NEXT: ret i1 false
797 %val = call i1 @llvm.is.fpclass.f64(double 0x7FF8000000000000, i32 512)
801 define i1 @test_constant_class_snan_test_pinf_f64() {
802 ; CHECK-LABEL: @test_constant_class_snan_test_pinf_f64(
803 ; CHECK-NEXT: ret i1 false
805 %val = call i1 @llvm.is.fpclass.f64(double 0x7FF0000000000001, i32 512)
809 define i1 @test_class_is_snan_nnan_src(float %x) {
810 ; CHECK-LABEL: @test_class_is_snan_nnan_src(
811 ; CHECK-NEXT: ret i1 false
813 %nnan = fadd nnan float %x, 1.0
814 %class = call i1 @llvm.is.fpclass.f32(float %nnan, i32 1)
818 define i1 @test_class_is_qnan_nnan_src(float %x) {
819 ; CHECK-LABEL: @test_class_is_qnan_nnan_src(
820 ; CHECK-NEXT: ret i1 false
822 %nnan = fadd nnan float %x, 1.0
823 %class = call i1 @llvm.is.fpclass.f32(float %nnan, i32 2)
827 define i1 @test_class_is_nan_nnan_src(float %x) {
828 ; CHECK-LABEL: @test_class_is_nan_nnan_src(
829 ; CHECK-NEXT: ret i1 false
831 %nnan = fadd nnan float %x, 1.0
832 %class = call i1 @llvm.is.fpclass.f32(float %nnan, i32 3)
836 define i1 @test_class_is_nan_other_nnan_src(float %x) {
837 ; CHECK-LABEL: @test_class_is_nan_other_nnan_src(
838 ; CHECK-NEXT: [[NNAN:%.*]] = fadd nnan float [[X:%.*]], 1.000000e+00
839 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[NNAN]], i32 264)
840 ; CHECK-NEXT: ret i1 [[CLASS]]
842 %nnan = fadd nnan float %x, 1.0
843 %class = call i1 @llvm.is.fpclass.f32(float %nnan, i32 267)
847 ; Fold test of is not nan
848 define i1 @test_class_is_not_nan_nnan_src(float %x) {
849 ; CHECK-LABEL: @test_class_is_not_nan_nnan_src(
850 ; CHECK-NEXT: ret i1 true
852 %nnan = fadd nnan float %x, 1.0
853 %class = call i1 @llvm.is.fpclass.f32(float %nnan, i32 1020) ; ~fcNan & fcAllFlags
857 define i1 @test_class_is_not_nan_nnan_src_strict(float %x) strictfp {
858 ; CHECK-LABEL: @test_class_is_not_nan_nnan_src_strict(
859 ; CHECK-NEXT: ret i1 true
861 %nnan = fadd nnan float %x, 1.0
862 %class = call i1 @llvm.is.fpclass.f32(float %nnan, i32 1020) strictfp ; ~fcNan & fcAllFlags
866 ; --------------------------------------------------------------------
867 ; llvm.is.fpclass with ninf sources
868 ; --------------------------------------------------------------------
870 define i1 @test_class_is_ninf_pinf_ninf_src(float %x) {
871 ; CHECK-LABEL: @test_class_is_ninf_pinf_ninf_src(
872 ; CHECK-NEXT: ret i1 false
874 %ninf = fadd ninf float %x, 1.0
875 %class = call i1 @llvm.is.fpclass.f32(float %ninf, i32 516)
879 define i1 @test_class_is_ninf_ninf_src(float %x) {
880 ; CHECK-LABEL: @test_class_is_ninf_ninf_src(
881 ; CHECK-NEXT: ret i1 false
883 %ninf = fadd ninf float %x, 1.0
884 %class = call i1 @llvm.is.fpclass.f32(float %ninf, i32 4)
888 define i1 @test_class_is_pinf_ninf_src(float %x) {
889 ; CHECK-LABEL: @test_class_is_pinf_ninf_src(
890 ; CHECK-NEXT: ret i1 false
892 %ninf = fadd ninf float %x, 1.0
893 %class = call i1 @llvm.is.fpclass.f32(float %ninf, i32 512)
897 define i1 @test_class_is_ninf_pinf_pnormal_ninf_src(float %x) {
898 ; CHECK-LABEL: @test_class_is_ninf_pinf_pnormal_ninf_src(
899 ; CHECK-NEXT: [[NINF:%.*]] = fadd ninf float [[X:%.*]], 1.000000e+00
900 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[NINF]], i32 256)
901 ; CHECK-NEXT: ret i1 [[CLASS]]
903 %ninf = fadd ninf float %x, 1.0
904 %class = call i1 @llvm.is.fpclass.f32(float %ninf, i32 772)
908 define i1 @test_class_is_not_inf_ninf_src(float %x) {
909 ; CHECK-LABEL: @test_class_is_not_inf_ninf_src(
910 ; CHECK-NEXT: ret i1 true
912 %ninf = fadd ninf float %x, 1.0
913 %class = call i1 @llvm.is.fpclass.f32(float %ninf, i32 507) ; ~fcInf & fcAllFlags
917 define i1 @test_class_is_not_inf_ninf_src_strict(float %x) strictfp {
918 ; CHECK-LABEL: @test_class_is_not_inf_ninf_src_strict(
919 ; CHECK-NEXT: ret i1 true
921 %ninf = fadd ninf float %x, 1.0
922 %class = call i1 @llvm.is.fpclass.f32(float %ninf, i32 507) strictfp ; ~fcInf & fcAllFlags
926 ; --------------------------------------------------------------------
927 ; Negation of llvm.is.fpclass
928 ; --------------------------------------------------------------------
930 define i1 @test_class_not_is_nan(float %x) {
931 ; CHECK-LABEL: @test_class_not_is_nan(
932 ; CHECK-NEXT: [[CLASS:%.*]] = fcmp ord float [[X:%.*]], 0.000000e+00
933 ; CHECK-NEXT: ret i1 [[CLASS]]
935 %class = call i1 @llvm.is.fpclass.f32(float %x, i32 3)
936 %not = xor i1 %class, true
940 define i1 @test_class_not_is_nan_multi_use(float %x, ptr %ptr) {
941 ; CHECK-LABEL: @test_class_not_is_nan_multi_use(
942 ; CHECK-NEXT: [[CLASS:%.*]] = fcmp uno float [[X:%.*]], 0.000000e+00
943 ; CHECK-NEXT: store i1 [[CLASS]], ptr [[PTR:%.*]], align 1
944 ; CHECK-NEXT: [[NOT:%.*]] = xor i1 [[CLASS]], true
945 ; CHECK-NEXT: ret i1 [[NOT]]
947 %class = call i1 @llvm.is.fpclass.f32(float %x, i32 3)
948 store i1 %class, ptr %ptr
949 %not = xor i1 %class, true
953 define i1 @test_class_not_is_inf_nan(float %x) {
954 ; CHECK-LABEL: @test_class_not_is_inf_nan(
955 ; CHECK-NEXT: [[TMP1:%.*]] = call float @llvm.fabs.f32(float [[X:%.*]])
956 ; CHECK-NEXT: [[CLASS:%.*]] = fcmp one float [[TMP1]], 0x7FF0000000000000
957 ; CHECK-NEXT: ret i1 [[CLASS]]
959 %class = call i1 @llvm.is.fpclass.f32(float %x, i32 519)
960 %not = xor i1 %class, true
964 define i1 @test_class_not_is_normal(float %x) {
965 ; CHECK-LABEL: @test_class_not_is_normal(
966 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[X:%.*]], i32 759)
967 ; CHECK-NEXT: ret i1 [[CLASS]]
969 %class = call i1 @llvm.is.fpclass.f32(float %x, i32 264)
970 %not = xor i1 %class, true
974 define i1 @test_class_xor_false(float %x) {
975 ; CHECK-LABEL: @test_class_xor_false(
976 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[X:%.*]], i32 33)
977 ; CHECK-NEXT: ret i1 [[CLASS]]
979 %class = call i1 @llvm.is.fpclass.f32(float %x, i32 33)
980 %not = xor i1 %class, false
984 define <2 x i1> @test_class_not_vector(<2 x float> %x) {
985 ; CHECK-LABEL: @test_class_not_vector(
986 ; CHECK-NEXT: [[CLASS:%.*]] = call <2 x i1> @llvm.is.fpclass.v2f32(<2 x float> [[X:%.*]], i32 990)
987 ; CHECK-NEXT: ret <2 x i1> [[CLASS]]
989 %class = call <2 x i1> @llvm.is.fpclass.v2f32(<2 x float> %x, i32 33)
990 %not = xor <2 x i1> %class, <i1 true, i1 true>
994 define <2 x i1> @test_class_xor_vector(<2 x float> %x) {
995 ; CHECK-LABEL: @test_class_xor_vector(
996 ; CHECK-NEXT: [[CLASS:%.*]] = call <2 x i1> @llvm.is.fpclass.v2f32(<2 x float> [[X:%.*]], i32 33)
997 ; CHECK-NEXT: [[NOT:%.*]] = xor <2 x i1> [[CLASS]], <i1 true, i1 false>
998 ; CHECK-NEXT: ret <2 x i1> [[NOT]]
1000 %class = call <2 x i1> @llvm.is.fpclass.v2f32(<2 x float> %x, i32 33)
1001 %not = xor <2 x i1> %class, <i1 true, i1 false>
1005 ; --------------------------------------------------------------------
1006 ; or llvm.is.fpclass, llvm.is.fpclass
1007 ; --------------------------------------------------------------------
1009 define i1 @test_fold_or_class_f32_0(float %a) {
1010 ; CHECK-LABEL: @test_fold_or_class_f32_0(
1011 ; CHECK-NEXT: [[CLASS0:%.*]] = fcmp uno float [[A:%.*]], 0.000000e+00
1012 ; CHECK-NEXT: ret i1 [[CLASS0]]
1014 %class0 = call i1 @llvm.is.fpclass.f32(float %a, i32 1)
1015 %class1 = fcmp uno float %a, 0.000000e+00
1016 %or = or i1 %class0, %class1
1020 define i1 @test_fold_or3_class_f32_0(float %a) {
1021 ; CHECK-LABEL: @test_fold_or3_class_f32_0(
1022 ; CHECK-NEXT: [[OR_1:%.*]] = fcmp ueq float [[A:%.*]], 0xFFF0000000000000
1023 ; CHECK-NEXT: ret i1 [[OR_1]]
1025 %class0 = call i1 @llvm.is.fpclass.f32(float %a, i32 1)
1026 %class1 = call i1 @llvm.is.fpclass.f32(float %a, i32 2)
1027 %class2 = call i1 @llvm.is.fpclass.f32(float %a, i32 4)
1028 %or.0 = or i1 %class0, %class1
1029 %or.1 = or i1 %or.0, %class2
1033 define i1 @test_fold_or_all_tests_class_f32_0(float %a) {
1034 ; CHECK-LABEL: @test_fold_or_all_tests_class_f32_0(
1035 ; CHECK-NEXT: ret i1 true
1037 %class0 = call i1 @llvm.is.fpclass.f32(float %a, i32 1)
1038 %class1 = call i1 @llvm.is.fpclass.f32(float %a, i32 2)
1039 %class2 = call i1 @llvm.is.fpclass.f32(float %a, i32 4)
1040 %class3 = call i1 @llvm.is.fpclass.f32(float %a, i32 8)
1041 %class4 = call i1 @llvm.is.fpclass.f32(float %a, i32 16)
1042 %class5 = call i1 @llvm.is.fpclass.f32(float %a, i32 32)
1043 %class6 = call i1 @llvm.is.fpclass.f32(float %a, i32 64)
1044 %class7 = call i1 @llvm.is.fpclass.f32(float %a, i32 128)
1045 %class8 = call i1 @llvm.is.fpclass.f32(float %a, i32 256)
1046 %class9 = call i1 @llvm.is.fpclass.f32(float %a, i32 512)
1047 %or.0 = or i1 %class0, %class1
1048 %or.1 = or i1 %or.0, %class2
1049 %or.2 = or i1 %or.1, %class3
1050 %or.3 = or i1 %or.2, %class4
1051 %or.4 = or i1 %or.3, %class5
1052 %or.5 = or i1 %or.4, %class6
1053 %or.6 = or i1 %or.5, %class7
1054 %or.7 = or i1 %or.6, %class8
1055 %or.8 = or i1 %or.7, %class9
1059 define i1 @test_fold_or_class_f32_1(float %a) {
1060 ; CHECK-LABEL: @test_fold_or_class_f32_1(
1061 ; CHECK-NEXT: [[CLASS1:%.*]] = call i1 @llvm.is.fpclass.f32(float [[A:%.*]], i32 12)
1062 ; CHECK-NEXT: ret i1 [[CLASS1]]
1064 %class0 = call i1 @llvm.is.fpclass.f32(float %a, i32 4)
1065 %class1 = call i1 @llvm.is.fpclass.f32(float %a, i32 8)
1066 %or = or i1 %class0, %class1
1070 define i1 @test_no_fold_or_class_f32_multi_use0(float %a, ptr %ptr) {
1071 ; CHECK-LABEL: @test_no_fold_or_class_f32_multi_use0(
1072 ; CHECK-NEXT: [[CLASS0:%.*]] = fcmp oeq float [[A:%.*]], 0xFFF0000000000000
1073 ; CHECK-NEXT: store i1 [[CLASS0]], ptr [[PTR:%.*]], align 1
1074 ; CHECK-NEXT: [[CLASS1:%.*]] = call i1 @llvm.is.fpclass.f32(float [[A]], i32 8)
1075 ; CHECK-NEXT: [[OR:%.*]] = or i1 [[CLASS0]], [[CLASS1]]
1076 ; CHECK-NEXT: ret i1 [[OR]]
1078 %class0 = call i1 @llvm.is.fpclass.f32(float %a, i32 4)
1079 store i1 %class0, ptr %ptr
1080 %class1 = call i1 @llvm.is.fpclass.f32(float %a, i32 8)
1081 %or = or i1 %class0, %class1
1085 define i1 @test_no_fold_or_class_f32_multi_use1(float %a, ptr %ptr) {
1086 ; CHECK-LABEL: @test_no_fold_or_class_f32_multi_use1(
1087 ; CHECK-NEXT: [[CLASS0:%.*]] = fcmp oeq float [[A:%.*]], 0xFFF0000000000000
1088 ; CHECK-NEXT: [[CLASS1:%.*]] = call i1 @llvm.is.fpclass.f32(float [[A]], i32 8)
1089 ; CHECK-NEXT: store i1 [[CLASS1]], ptr [[PTR:%.*]], align 1
1090 ; CHECK-NEXT: [[OR:%.*]] = or i1 [[CLASS0]], [[CLASS1]]
1091 ; CHECK-NEXT: ret i1 [[OR]]
1093 %class0 = call i1 @llvm.is.fpclass.f32(float %a, i32 4)
1094 %class1 = call i1 @llvm.is.fpclass.f32(float %a, i32 8)
1095 store i1 %class1, ptr %ptr
1096 %or = or i1 %class0, %class1
1100 define i1 @test_fold_or_class_f32_2(float %a) {
1101 ; CHECK-LABEL: @test_fold_or_class_f32_2(
1102 ; CHECK-NEXT: [[OR:%.*]] = fcmp ueq float [[A:%.*]], 0xFFF0000000000000
1103 ; CHECK-NEXT: ret i1 [[OR]]
1105 %class0 = call i1 @llvm.is.fpclass.f32(float %a, i32 7)
1106 %class1 = call i1 @llvm.is.fpclass.f32(float %a, i32 7)
1107 %or = or i1 %class0, %class1
1111 define i1 @test_no_fold_or_class_f32_0(float %a, float %b) {
1112 ; CHECK-LABEL: @test_no_fold_or_class_f32_0(
1113 ; CHECK-NEXT: [[CLASS0:%.*]] = fcmp oeq float [[A:%.*]], 0xFFF0000000000000
1114 ; CHECK-NEXT: [[CLASS1:%.*]] = call i1 @llvm.is.fpclass.f32(float [[B:%.*]], i32 8)
1115 ; CHECK-NEXT: [[OR:%.*]] = or i1 [[CLASS0]], [[CLASS1]]
1116 ; CHECK-NEXT: ret i1 [[OR]]
1118 %class0 = call i1 @llvm.is.fpclass.f32(float %a, i32 4)
1119 %class1 = call i1 @llvm.is.fpclass.f32(float %b, i32 8)
1120 %or = or i1 %class0, %class1
1124 define <2 x i1> @test_fold_or_class_v2f32(<2 x float> %a) {
1125 ; CHECK-LABEL: @test_fold_or_class_v2f32(
1126 ; CHECK-NEXT: [[CLASS1:%.*]] = call <2 x i1> @llvm.is.fpclass.v2f32(<2 x float> [[A:%.*]], i32 12)
1127 ; CHECK-NEXT: ret <2 x i1> [[CLASS1]]
1129 %class0 = call <2 x i1> @llvm.is.fpclass.v2f32(<2 x float> %a, i32 4)
1130 %class1 = call <2 x i1> @llvm.is.fpclass.v2f32(<2 x float> %a, i32 8)
1131 %or = or <2 x i1> %class0, %class1
1135 ; --------------------------------------------------------------------
1136 ; and llvm.is.fpclass, llvm.is.fpclass
1137 ; --------------------------------------------------------------------
1139 define i1 @test_fold_and_class_f32_0(float %a) {
1140 ; CHECK-LABEL: @test_fold_and_class_f32_0(
1141 ; CHECK-NEXT: [[CLASS0:%.*]] = call i1 @llvm.is.fpclass.f32(float [[A:%.*]], i32 1)
1142 ; CHECK-NEXT: ret i1 [[CLASS0]]
1144 %class0 = call i1 @llvm.is.fpclass.f32(float %a, i32 1)
1145 %class1 = fcmp uno float %a, 0.000000e+00
1146 %and = and i1 %class0, %class1
1150 define i1 @test_fold_and3_class_f32_0(float %a) {
1151 ; CHECK-LABEL: @test_fold_and3_class_f32_0(
1152 ; CHECK-NEXT: [[CLASS1:%.*]] = call i1 @llvm.is.fpclass.f32(float [[A:%.*]], i32 2)
1153 ; CHECK-NEXT: ret i1 [[CLASS1]]
1155 %class0 = call i1 @llvm.is.fpclass.f32(float %a, i32 3)
1156 %class1 = call i1 @llvm.is.fpclass.f32(float %a, i32 2)
1157 %class2 = call i1 @llvm.is.fpclass.f32(float %a, i32 7)
1158 %and.0 = and i1 %class0, %class1
1159 %and.1 = and i1 %and.0, %class2
1163 define i1 @test_fold_and_all_tests_class_f32_0(float %a) {
1164 ; CHECK-LABEL: @test_fold_and_all_tests_class_f32_0(
1165 ; CHECK-NEXT: ret i1 false
1167 %class0 = call i1 @llvm.is.fpclass.f32(float %a, i32 1)
1168 %class1 = call i1 @llvm.is.fpclass.f32(float %a, i32 2)
1169 %class2 = call i1 @llvm.is.fpclass.f32(float %a, i32 4)
1170 %class3 = call i1 @llvm.is.fpclass.f32(float %a, i32 8)
1171 %class4 = call i1 @llvm.is.fpclass.f32(float %a, i32 16)
1172 %class5 = call i1 @llvm.is.fpclass.f32(float %a, i32 32)
1173 %class6 = call i1 @llvm.is.fpclass.f32(float %a, i32 64)
1174 %class7 = call i1 @llvm.is.fpclass.f32(float %a, i32 128)
1175 %class8 = call i1 @llvm.is.fpclass.f32(float %a, i32 256)
1176 %class9 = call i1 @llvm.is.fpclass.f32(float %a, i32 512)
1177 %and.0 = and i1 %class0, %class1
1178 %and.1 = and i1 %and.0, %class2
1179 %and.2 = and i1 %and.1, %class3
1180 %and.3 = and i1 %and.2, %class4
1181 %and.4 = and i1 %and.3, %class5
1182 %and.5 = and i1 %and.4, %class6
1183 %and.6 = and i1 %and.5, %class7
1184 %and.7 = and i1 %and.6, %class8
1185 %and.8 = and i1 %and.7, %class9
1189 define i1 @test_fold_and_not_all_tests_class_f32_0(float %a) {
1190 ; CHECK-LABEL: @test_fold_and_not_all_tests_class_f32_0(
1191 ; CHECK-NEXT: ret i1 false
1193 %class0 = call i1 @llvm.is.fpclass.f32(float %a, i32 1022)
1194 %class1 = call i1 @llvm.is.fpclass.f32(float %a, i32 1021)
1195 %class2 = call i1 @llvm.is.fpclass.f32(float %a, i32 1019)
1196 %class3 = call i1 @llvm.is.fpclass.f32(float %a, i32 1015)
1197 %class4 = call i1 @llvm.is.fpclass.f32(float %a, i32 1007)
1198 %class5 = call i1 @llvm.is.fpclass.f32(float %a, i32 991)
1199 %class6 = call i1 @llvm.is.fpclass.f32(float %a, i32 959)
1200 %class7 = call i1 @llvm.is.fpclass.f32(float %a, i32 895)
1201 %class8 = call i1 @llvm.is.fpclass.f32(float %a, i32 767)
1202 %class9 = call i1 @llvm.is.fpclass.f32(float %a, i32 511)
1203 %and.0 = and i1 %class0, %class1
1204 %and.1 = and i1 %and.0, %class2
1205 %and.2 = and i1 %and.1, %class3
1206 %and.3 = and i1 %and.2, %class4
1207 %and.4 = and i1 %and.3, %class5
1208 %and.5 = and i1 %and.4, %class6
1209 %and.6 = and i1 %and.5, %class7
1210 %and.7 = and i1 %and.6, %class8
1211 %and.8 = and i1 %and.7, %class9
1215 define i1 @test_fold_and_class_f32_1(float %a) {
1216 ; CHECK-LABEL: @test_fold_and_class_f32_1(
1217 ; CHECK-NEXT: ret i1 false
1219 %class0 = call i1 @llvm.is.fpclass.f32(float %a, i32 48)
1220 %class1 = call i1 @llvm.is.fpclass.f32(float %a, i32 11)
1221 %and = and i1 %class0, %class1
1225 define i1 @test_no_fold_and_class_f32_multi_use0(float %a, ptr %ptr) {
1226 ; CHECK-LABEL: @test_no_fold_and_class_f32_multi_use0(
1227 ; CHECK-NEXT: [[CLASS0:%.*]] = call i1 @llvm.is.fpclass.f32(float [[A:%.*]], i32 15)
1228 ; CHECK-NEXT: store i1 [[CLASS0]], ptr [[PTR:%.*]], align 1
1229 ; CHECK-NEXT: [[CLASS1:%.*]] = call i1 @llvm.is.fpclass.f32(float [[A]], i32 8)
1230 ; CHECK-NEXT: [[AND:%.*]] = and i1 [[CLASS0]], [[CLASS1]]
1231 ; CHECK-NEXT: ret i1 [[AND]]
1233 %class0 = call i1 @llvm.is.fpclass.f32(float %a, i32 15)
1234 store i1 %class0, ptr %ptr
1235 %class1 = call i1 @llvm.is.fpclass.f32(float %a, i32 8)
1236 %and = and i1 %class0, %class1
1240 define i1 @test_no_fold_and_class_f32_multi_use1(float %a, ptr %ptr) {
1241 ; CHECK-LABEL: @test_no_fold_and_class_f32_multi_use1(
1242 ; CHECK-NEXT: [[CLASS0:%.*]] = call i1 @llvm.is.fpclass.f32(float [[A:%.*]], i32 15)
1243 ; CHECK-NEXT: [[CLASS1:%.*]] = call i1 @llvm.is.fpclass.f32(float [[A]], i32 8)
1244 ; CHECK-NEXT: store i1 [[CLASS1]], ptr [[PTR:%.*]], align 1
1245 ; CHECK-NEXT: [[AND:%.*]] = and i1 [[CLASS0]], [[CLASS1]]
1246 ; CHECK-NEXT: ret i1 [[AND]]
1248 %class0 = call i1 @llvm.is.fpclass.f32(float %a, i32 15)
1249 %class1 = call i1 @llvm.is.fpclass.f32(float %a, i32 8)
1250 store i1 %class1, ptr %ptr
1251 %and = and i1 %class0, %class1
1255 define i1 @test_fold_and_class_f32_2(float %a) {
1256 ; CHECK-LABEL: @test_fold_and_class_f32_2(
1257 ; CHECK-NEXT: [[AND:%.*]] = fcmp ueq float [[A:%.*]], 0xFFF0000000000000
1258 ; CHECK-NEXT: ret i1 [[AND]]
1260 %class0 = call i1 @llvm.is.fpclass.f32(float %a, i32 7)
1261 %class1 = call i1 @llvm.is.fpclass.f32(float %a, i32 7)
1262 %and = and i1 %class0, %class1
1266 define i1 @test_fold_and_class_f32_3(float %a) {
1267 ; CHECK-LABEL: @test_fold_and_class_f32_3(
1268 ; CHECK-NEXT: [[CLASS0:%.*]] = call i1 @llvm.is.fpclass.f32(float [[A:%.*]], i32 1)
1269 ; CHECK-NEXT: ret i1 [[CLASS0]]
1271 %class0 = call i1 @llvm.is.fpclass.f32(float %a, i32 37)
1272 %class1 = call i1 @llvm.is.fpclass.f32(float %a, i32 393)
1273 %and = and i1 %class0, %class1
1277 define i1 @test_fold_and_class_f32_4(float %a) {
1278 ; CHECK-LABEL: @test_fold_and_class_f32_4(
1279 ; CHECK-NEXT: [[CLASS0:%.*]] = call i1 @llvm.is.fpclass.f32(float [[A:%.*]], i32 1)
1280 ; CHECK-NEXT: ret i1 [[CLASS0]]
1282 %class0 = call i1 @llvm.is.fpclass.f32(float %a, i32 393)
1283 %class1 = call i1 @llvm.is.fpclass.f32(float %a, i32 37)
1284 %and = and i1 %class0, %class1
1288 define i1 @test_no_fold_and_class_f32_0(float %a, float %b) {
1289 ; CHECK-LABEL: @test_no_fold_and_class_f32_0(
1290 ; CHECK-NEXT: [[CLASS0:%.*]] = fcmp ueq float [[A:%.*]], 0xFFF0000000000000
1291 ; CHECK-NEXT: [[CLASS1:%.*]] = call i1 @llvm.is.fpclass.f32(float [[B:%.*]], i32 15)
1292 ; CHECK-NEXT: [[AND:%.*]] = and i1 [[CLASS0]], [[CLASS1]]
1293 ; CHECK-NEXT: ret i1 [[AND]]
1295 %class0 = call i1 @llvm.is.fpclass.f32(float %a, i32 7)
1296 %class1 = call i1 @llvm.is.fpclass.f32(float %b, i32 15)
1297 %and = and i1 %class0, %class1
1301 define <2 x i1> @test_fold_and_class_v2f32(<2 x float> %a) {
1302 ; CHECK-LABEL: @test_fold_and_class_v2f32(
1303 ; CHECK-NEXT: [[CLASS1:%.*]] = fcmp ueq <2 x float> [[A:%.*]], splat (float 0xFFF0000000000000)
1304 ; CHECK-NEXT: ret <2 x i1> [[CLASS1]]
1306 %class0 = call <2 x i1> @llvm.is.fpclass.v2f32(<2 x float> %a, i32 7)
1307 %class1 = call <2 x i1> @llvm.is.fpclass.v2f32(<2 x float> %a, i32 15)
1308 %and = and <2 x i1> %class0, %class1
1312 ; --------------------------------------------------------------------
1313 ; xor llvm.is.fpclass, llvm.is.fpclass
1314 ; --------------------------------------------------------------------
1316 define i1 @test_fold_xor_class_f32_0(float %a) {
1317 ; CHECK-LABEL: @test_fold_xor_class_f32_0(
1318 ; CHECK-NEXT: [[CLASS0:%.*]] = call i1 @llvm.is.fpclass.f32(float [[A:%.*]], i32 2)
1319 ; CHECK-NEXT: ret i1 [[CLASS0]]
1321 %class0 = call i1 @llvm.is.fpclass.f32(float %a, i32 1)
1322 %class1 = fcmp uno float %a, 0.000000e+00
1323 %xor = xor i1 %class0, %class1
1327 define i1 @test_fold_xor3_class_f32_0(float %a) {
1328 ; CHECK-LABEL: @test_fold_xor3_class_f32_0(
1329 ; CHECK-NEXT: [[XOR_1:%.*]] = fcmp ueq float [[A:%.*]], 0xFFF0000000000000
1330 ; CHECK-NEXT: ret i1 [[XOR_1]]
1332 %class0 = call i1 @llvm.is.fpclass.f32(float %a, i32 1)
1333 %class1 = call i1 @llvm.is.fpclass.f32(float %a, i32 2)
1334 %class2 = call i1 @llvm.is.fpclass.f32(float %a, i32 4)
1335 %xor.0 = xor i1 %class0, %class1
1336 %xor.1 = xor i1 %xor.0, %class2
1340 define i1 @test_fold_xor_all_tests_class_f32_0(float %a) {
1341 ; CHECK-LABEL: @test_fold_xor_all_tests_class_f32_0(
1342 ; CHECK-NEXT: ret i1 true
1344 %class0 = call i1 @llvm.is.fpclass.f32(float %a, i32 1)
1345 %class1 = call i1 @llvm.is.fpclass.f32(float %a, i32 2)
1346 %class2 = call i1 @llvm.is.fpclass.f32(float %a, i32 4)
1347 %class3 = call i1 @llvm.is.fpclass.f32(float %a, i32 8)
1348 %class4 = call i1 @llvm.is.fpclass.f32(float %a, i32 16)
1349 %class5 = call i1 @llvm.is.fpclass.f32(float %a, i32 32)
1350 %class6 = call i1 @llvm.is.fpclass.f32(float %a, i32 64)
1351 %class7 = call i1 @llvm.is.fpclass.f32(float %a, i32 128)
1352 %class8 = call i1 @llvm.is.fpclass.f32(float %a, i32 256)
1353 %class9 = call i1 @llvm.is.fpclass.f32(float %a, i32 512)
1354 %xor.0 = xor i1 %class0, %class1
1355 %xor.1 = xor i1 %xor.0, %class2
1356 %xor.2 = xor i1 %xor.1, %class3
1357 %xor.3 = xor i1 %xor.2, %class4
1358 %xor.4 = xor i1 %xor.3, %class5
1359 %xor.5 = xor i1 %xor.4, %class6
1360 %xor.6 = xor i1 %xor.5, %class7
1361 %xor.7 = xor i1 %xor.6, %class8
1362 %xor.8 = xor i1 %xor.7, %class9
1366 define i1 @test_fold_xor_class_f32_1(float %a) {
1367 ; CHECK-LABEL: @test_fold_xor_class_f32_1(
1368 ; CHECK-NEXT: [[CLASS1:%.*]] = call i1 @llvm.is.fpclass.f32(float [[A:%.*]], i32 12)
1369 ; CHECK-NEXT: ret i1 [[CLASS1]]
1371 %class0 = call i1 @llvm.is.fpclass.f32(float %a, i32 4)
1372 %class1 = call i1 @llvm.is.fpclass.f32(float %a, i32 8)
1373 %xor = xor i1 %class0, %class1
1377 define i1 @test_no_fold_xor_class_f32_multi_use0(float %a, ptr %ptr) {
1378 ; CHECK-LABEL: @test_no_fold_xor_class_f32_multi_use0(
1379 ; CHECK-NEXT: [[CLASS0:%.*]] = fcmp oeq float [[A:%.*]], 0xFFF0000000000000
1380 ; CHECK-NEXT: store i1 [[CLASS0]], ptr [[PTR:%.*]], align 1
1381 ; CHECK-NEXT: [[CLASS1:%.*]] = call i1 @llvm.is.fpclass.f32(float [[A]], i32 8)
1382 ; CHECK-NEXT: [[XOR:%.*]] = xor i1 [[CLASS0]], [[CLASS1]]
1383 ; CHECK-NEXT: ret i1 [[XOR]]
1385 %class0 = call i1 @llvm.is.fpclass.f32(float %a, i32 4)
1386 store i1 %class0, ptr %ptr
1387 %class1 = call i1 @llvm.is.fpclass.f32(float %a, i32 8)
1388 %xor = xor i1 %class0, %class1
1392 define i1 @test_no_fold_xor_class_f32_multi_use1(float %a, ptr %ptr) {
1393 ; CHECK-LABEL: @test_no_fold_xor_class_f32_multi_use1(
1394 ; CHECK-NEXT: [[CLASS0:%.*]] = fcmp oeq float [[A:%.*]], 0xFFF0000000000000
1395 ; CHECK-NEXT: [[CLASS1:%.*]] = call i1 @llvm.is.fpclass.f32(float [[A]], i32 8)
1396 ; CHECK-NEXT: store i1 [[CLASS1]], ptr [[PTR:%.*]], align 1
1397 ; CHECK-NEXT: [[XOR:%.*]] = xor i1 [[CLASS0]], [[CLASS1]]
1398 ; CHECK-NEXT: ret i1 [[XOR]]
1400 %class0 = call i1 @llvm.is.fpclass.f32(float %a, i32 4)
1401 %class1 = call i1 @llvm.is.fpclass.f32(float %a, i32 8)
1402 store i1 %class1, ptr %ptr
1403 %xor = xor i1 %class0, %class1
1407 define i1 @test_fold_xor_class_f32_2(float %a) {
1408 ; CHECK-LABEL: @test_fold_xor_class_f32_2(
1409 ; CHECK-NEXT: ret i1 false
1411 %class0 = call i1 @llvm.is.fpclass.f32(float %a, i32 7)
1412 %class1 = call i1 @llvm.is.fpclass.f32(float %a, i32 7)
1413 %xor = xor i1 %class0, %class1
1417 define i1 @test_no_fold_xor_class_f32_0(float %a, float %b) {
1418 ; CHECK-LABEL: @test_no_fold_xor_class_f32_0(
1419 ; CHECK-NEXT: [[CLASS0:%.*]] = fcmp oeq float [[A:%.*]], 0xFFF0000000000000
1420 ; CHECK-NEXT: [[CLASS1:%.*]] = call i1 @llvm.is.fpclass.f32(float [[B:%.*]], i32 8)
1421 ; CHECK-NEXT: [[XOR:%.*]] = xor i1 [[CLASS0]], [[CLASS1]]
1422 ; CHECK-NEXT: ret i1 [[XOR]]
1424 %class0 = call i1 @llvm.is.fpclass.f32(float %a, i32 4)
1425 %class1 = call i1 @llvm.is.fpclass.f32(float %b, i32 8)
1426 %xor = xor i1 %class0, %class1
1430 define <2 x i1> @test_fold_xor_class_v2f32(<2 x float> %a) {
1431 ; CHECK-LABEL: @test_fold_xor_class_v2f32(
1432 ; CHECK-NEXT: [[CLASS1:%.*]] = call <2 x i1> @llvm.is.fpclass.v2f32(<2 x float> [[A:%.*]], i32 9)
1433 ; CHECK-NEXT: ret <2 x i1> [[CLASS1]]
1435 %class0 = call <2 x i1> @llvm.is.fpclass.v2f32(<2 x float> %a, i32 4)
1436 %class1 = call <2 x i1> @llvm.is.fpclass.v2f32(<2 x float> %a, i32 13)
1437 %xor = xor <2 x i1> %class0, %class1
1441 ; ---------------------------------------------------------------------
1443 ; ---------------------------------------------------------------------
1446 define i1 @test_class_fneg_none(float %arg) {
1447 ; CHECK-LABEL: @test_class_fneg_none(
1448 ; CHECK-NEXT: ret i1 false
1450 %fneg = fneg float %arg
1451 %class = call i1 @llvm.is.fpclass.f32(float %fneg, i32 0)
1456 define i1 @test_class_fneg_all(float %arg) {
1457 ; CHECK-LABEL: @test_class_fneg_all(
1458 ; CHECK-NEXT: ret i1 true
1460 %fneg = fneg float %arg
1461 %class = call i1 @llvm.is.fpclass.f32(float %fneg, i32 1023)
1466 define i1 @test_class_fneg_snan(float %arg) {
1467 ; CHECK-LABEL: @test_class_fneg_snan(
1468 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 1)
1469 ; CHECK-NEXT: ret i1 [[CLASS]]
1471 %fneg = fneg float %arg
1472 %class = call i1 @llvm.is.fpclass.f32(float %fneg, i32 1)
1477 define i1 @test_class_fneg_qnan(float %arg) {
1478 ; CHECK-LABEL: @test_class_fneg_qnan(
1479 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 2)
1480 ; CHECK-NEXT: ret i1 [[CLASS]]
1482 %fneg = fneg float %arg
1483 %class = call i1 @llvm.is.fpclass.f32(float %fneg, i32 2)
1488 define i1 @test_class_fneg_neginf(float %arg) {
1489 ; CHECK-LABEL: @test_class_fneg_neginf(
1490 ; CHECK-NEXT: [[CLASS:%.*]] = fcmp oeq float [[ARG:%.*]], 0x7FF0000000000000
1491 ; CHECK-NEXT: ret i1 [[CLASS]]
1493 %fneg = fneg float %arg
1494 %class = call i1 @llvm.is.fpclass.f32(float %fneg, i32 4)
1499 define i1 @test_class_fneg_negnormal(float %arg) {
1500 ; CHECK-LABEL: @test_class_fneg_negnormal(
1501 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 256)
1502 ; CHECK-NEXT: ret i1 [[CLASS]]
1504 %fneg = fneg float %arg
1505 %class = call i1 @llvm.is.fpclass.f32(float %fneg, i32 8)
1510 define i1 @test_class_fneg_negsubnormal(float %arg) {
1511 ; CHECK-LABEL: @test_class_fneg_negsubnormal(
1512 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 128)
1513 ; CHECK-NEXT: ret i1 [[CLASS]]
1515 %fneg = fneg float %arg
1516 %class = call i1 @llvm.is.fpclass.f32(float %fneg, i32 16)
1521 define i1 @test_class_fneg_negzero(float %arg) {
1522 ; CHECK-LABEL: @test_class_fneg_negzero(
1523 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 64)
1524 ; CHECK-NEXT: ret i1 [[CLASS]]
1526 %fneg = fneg float %arg
1527 %class = call i1 @llvm.is.fpclass.f32(float %fneg, i32 32)
1532 define i1 @test_class_fneg_poszero(float %arg) {
1533 ; CHECK-LABEL: @test_class_fneg_poszero(
1534 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 32)
1535 ; CHECK-NEXT: ret i1 [[CLASS]]
1537 %fneg = fneg float %arg
1538 %class = call i1 @llvm.is.fpclass.f32(float %fneg, i32 64)
1543 define i1 @test_class_fneg_possubnormal(float %arg) {
1544 ; CHECK-LABEL: @test_class_fneg_possubnormal(
1545 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 16)
1546 ; CHECK-NEXT: ret i1 [[CLASS]]
1548 %fneg = fneg float %arg
1549 %class = call i1 @llvm.is.fpclass.f32(float %fneg, i32 128)
1554 define i1 @test_class_fneg_posnormal(float %arg) {
1555 ; CHECK-LABEL: @test_class_fneg_posnormal(
1556 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 8)
1557 ; CHECK-NEXT: ret i1 [[CLASS]]
1559 %fneg = fneg float %arg
1560 %class = call i1 @llvm.is.fpclass.f32(float %fneg, i32 256)
1565 define i1 @test_class_fneg_posinf(float %arg) {
1566 ; CHECK-LABEL: @test_class_fneg_posinf(
1567 ; CHECK-NEXT: [[CLASS:%.*]] = fcmp oeq float [[ARG:%.*]], 0xFFF0000000000000
1568 ; CHECK-NEXT: ret i1 [[CLASS]]
1570 %fneg = fneg float %arg
1571 %class = call i1 @llvm.is.fpclass.f32(float %fneg, i32 512)
1576 define i1 @test_class_fneg_isnan(float %arg) {
1577 ; CHECK-LABEL: @test_class_fneg_isnan(
1578 ; CHECK-NEXT: [[CLASS:%.*]] = fcmp uno float [[ARG:%.*]], 0.000000e+00
1579 ; CHECK-NEXT: ret i1 [[CLASS]]
1581 %fneg = fneg float %arg
1582 %class = call i1 @llvm.is.fpclass.f32(float %fneg, i32 3)
1587 define i1 @test_class_fneg_nnan(float %arg) {
1588 ; CHECK-LABEL: @test_class_fneg_nnan(
1589 ; CHECK-NEXT: [[CLASS:%.*]] = fcmp ord float [[ARG:%.*]], 0.000000e+00
1590 ; CHECK-NEXT: ret i1 [[CLASS]]
1592 %fneg = fneg float %arg
1593 %class = call i1 @llvm.is.fpclass.f32(float %fneg, i32 1020)
1598 define i1 @test_class_fneg_normal(float %arg) {
1599 ; CHECK-LABEL: @test_class_fneg_normal(
1600 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 264)
1601 ; CHECK-NEXT: ret i1 [[CLASS]]
1603 %fneg = fneg float %arg
1604 %class = call i1 @llvm.is.fpclass.f32(float %fneg, i32 264)
1609 define i1 @test_class_fneg_zero(float %arg) {
1611 ; CHECK-LABEL: @test_class_fneg_zero(
1612 ; CHECK-NEXT: [[CLASS:%.*]] = fcmp oeq float [[ARG:%.*]], 0.000000e+00
1613 ; CHECK-NEXT: ret i1 [[CLASS]]
1615 %fneg = fneg float %arg
1616 %class = call i1 @llvm.is.fpclass.f32(float %fneg, i32 96)
1621 define i1 @test_class_fneg_subnormal(float %arg) {
1623 ; CHECK-LABEL: @test_class_fneg_subnormal(
1624 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 144)
1625 ; CHECK-NEXT: ret i1 [[CLASS]]
1627 %fneg = fneg float %arg
1628 %class = call i1 @llvm.is.fpclass.f32(float %fneg, i32 144)
1633 define i1 @test_class_fneg_normal_neginf(float %arg) {
1634 ; CHECK-LABEL: @test_class_fneg_normal_neginf(
1635 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 776)
1636 ; CHECK-NEXT: ret i1 [[CLASS]]
1638 %fneg = fneg float %arg
1639 %class = call i1 @llvm.is.fpclass.f32(float %fneg, i32 268)
1644 define i1 @test_class_fneg_normal_pinf(float %arg) {
1645 ; CHECK-LABEL: @test_class_fneg_normal_pinf(
1646 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 268)
1647 ; CHECK-NEXT: ret i1 [[CLASS]]
1649 %fneg = fneg float %arg
1650 %class = call i1 @llvm.is.fpclass.f32(float %fneg, i32 776)
1654 ; -> pinf|nnormal|pnormal|nzero
1655 define i1 @test_class_fneg_neginf_posnormal_negsubnormal_poszero(float %arg) {
1656 ; CHECK-LABEL: @test_class_fneg_neginf_posnormal_negsubnormal_poszero(
1657 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 680)
1658 ; CHECK-NEXT: ret i1 [[CLASS]]
1660 %fneg = fneg float %arg
1661 %class = call i1 @llvm.is.fpclass.f32(float %fneg, i32 340)
1665 ; -> pinf|nnormal|psubnormal|negzero|snan
1666 define i1 @test_class_fneg_neginf_posnormal_negsubnormal_poszero_snan(float %arg) {
1667 ; CHECK-LABEL: @test_class_fneg_neginf_posnormal_negsubnormal_poszero_snan(
1668 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 681)
1669 ; CHECK-NEXT: ret i1 [[CLASS]]
1671 %fneg = fneg float %arg
1672 %class = call i1 @llvm.is.fpclass.f32(float %fneg, i32 341)
1676 ; pinf|negnormal|psubnormal|negzero|qnan
1677 define i1 @test_class_fneg_neginf_posnormal_negsubnormal_poszero_qnan(float %arg) {
1678 ; CHECK-LABEL: @test_class_fneg_neginf_posnormal_negsubnormal_poszero_qnan(
1679 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 682)
1680 ; CHECK-NEXT: ret i1 [[CLASS]]
1682 %fneg = fneg float %arg
1683 %class = call i1 @llvm.is.fpclass.f32(float %fneg, i32 342)
1687 ; -> pinf | nnormal|psubnormal|nzero|nan
1688 define i1 @test_class_fneg_neginf_posnormal_negsubnormal_poszero_nan(float %arg) {
1689 ; CHECK-LABEL: @test_class_fneg_neginf_posnormal_negsubnormal_poszero_nan(
1690 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 683)
1691 ; CHECK-NEXT: ret i1 [[CLASS]]
1693 %fneg = fneg float %arg
1694 %class = call i1 @llvm.is.fpclass.f32(float %fneg, i32 343)
1698 ; -> ninf|pnormal|negsubnormal|pzero
1699 define i1 @test_class_fneg_posinf_negnormal_possubnormal_negzero(float %arg) {
1700 ; CHECK-LABEL: @test_class_fneg_posinf_negnormal_possubnormal_negzero(
1701 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 340)
1702 ; CHECK-NEXT: ret i1 [[CLASS]]
1704 %fneg = fneg float %arg
1705 %class = call i1 @llvm.is.fpclass.f32(float %fneg, i32 680)
1709 ; -> ninf|pnormal|negsubnormal|pzero|snan
1710 define i1 @test_class_fneg_posinf_negnormal_possubnormal_negzero_snan(float %arg) {
1711 ; CHECK-LABEL: @test_class_fneg_posinf_negnormal_possubnormal_negzero_snan(
1712 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 341)
1713 ; CHECK-NEXT: ret i1 [[CLASS]]
1715 %fneg = fneg float %arg
1716 %class = call i1 @llvm.is.fpclass.f32(float %fneg, i32 681)
1720 ; -> ninf|pnormal|negsubnormal|pzero|qnan
1721 define i1 @test_class_fneg_posinf_negnormal_possubnormal_negzero_qnan(float %arg) {
1722 ; CHECK-LABEL: @test_class_fneg_posinf_negnormal_possubnormal_negzero_qnan(
1723 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 342)
1724 ; CHECK-NEXT: ret i1 [[CLASS]]
1726 %fneg = fneg float %arg
1727 %class = call i1 @llvm.is.fpclass.f32(float %fneg, i32 682)
1731 ; -> ninf|pnormal|negsubnormal|pzero
1732 define i1 @test_class_fneg_posinf_negnormal_possubnormal_negzero_nan(float %arg) {
1733 ; CHECK-LABEL: @test_class_fneg_posinf_negnormal_possubnormal_negzero_nan(
1734 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 343)
1735 ; CHECK-NEXT: ret i1 [[CLASS]]
1737 %fneg = fneg float %arg
1738 %class = call i1 @llvm.is.fpclass.f32(float %fneg, i32 683)
1742 ; strictfp doesn't matter
1743 ; -> ninf|pnormal|negsubnormal|pzero|snan
1744 define i1 @test_class_fneg_posinf_negnormal_possubnormal_negzero_snan_strictfp(float %arg) strictfp {
1745 ; CHECK-LABEL: @test_class_fneg_posinf_negnormal_possubnormal_negzero_snan_strictfp(
1746 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 341) #[[ATTR0]]
1747 ; CHECK-NEXT: ret i1 [[CLASS]]
1749 %fneg = fneg float %arg
1750 %class = call i1 @llvm.is.fpclass.f32(float %fneg, i32 681) strictfp
1754 ; multiple uses don't matter
1755 define i1 @test_class_fneg_multiple_use_fneg(float %arg, ptr %ptr) {
1756 ; CHECK-LABEL: @test_class_fneg_multiple_use_fneg(
1757 ; CHECK-NEXT: [[FNEG:%.*]] = fneg float [[ARG:%.*]]
1758 ; CHECK-NEXT: store float [[FNEG]], ptr [[PTR:%.*]], align 4
1759 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG]], i32 342)
1760 ; CHECK-NEXT: ret i1 [[CLASS]]
1762 %fneg = fneg float %arg
1763 store float %fneg, ptr %ptr
1764 %class = call i1 @llvm.is.fpclass.f32(float %fneg, i32 682)
1768 define <2 x i1> @test_class_fneg_posinf_negnormal_possubnormal_negzero_nan_vector(<2 x float> %arg) {
1769 ; CHECK-LABEL: @test_class_fneg_posinf_negnormal_possubnormal_negzero_nan_vector(
1770 ; CHECK-NEXT: [[CLASS:%.*]] = call <2 x i1> @llvm.is.fpclass.v2f32(<2 x float> [[ARG:%.*]], i32 343)
1771 ; CHECK-NEXT: ret <2 x i1> [[CLASS]]
1773 %fneg = fneg <2 x float> %arg
1774 %class = call <2 x i1> @llvm.is.fpclass.v2f32(<2 x float> %fneg, i32 683)
1778 ; ---------------------------------------------------------------------
1780 ; ---------------------------------------------------------------------
1783 define i1 @test_class_fabs_none(float %arg) {
1784 ; CHECK-LABEL: @test_class_fabs_none(
1785 ; CHECK-NEXT: ret i1 false
1787 %fabs = call float @llvm.fabs.f32(float %arg)
1788 %class = call i1 @llvm.is.fpclass.f32(float %fabs, i32 0)
1793 define i1 @test_class_fabs_all(float %arg) {
1794 ; CHECK-LABEL: @test_class_fabs_all(
1795 ; CHECK-NEXT: ret i1 true
1797 %fabs = call float @llvm.fabs.f32(float %arg)
1798 %class = call i1 @llvm.is.fpclass.f32(float %fabs, i32 1023)
1803 define i1 @test_class_fabs_snan(float %arg) {
1804 ; CHECK-LABEL: @test_class_fabs_snan(
1805 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 1)
1806 ; CHECK-NEXT: ret i1 [[CLASS]]
1808 %fabs = call float @llvm.fabs.f32(float %arg)
1809 %class = call i1 @llvm.is.fpclass.f32(float %fabs, i32 1)
1814 define i1 @test_class_fabs_qnan(float %arg) {
1815 ; CHECK-LABEL: @test_class_fabs_qnan(
1816 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 2)
1817 ; CHECK-NEXT: ret i1 [[CLASS]]
1819 %fabs = call float @llvm.fabs.f32(float %arg)
1820 %class = call i1 @llvm.is.fpclass.f32(float %fabs, i32 2)
1825 define i1 @test_class_fabs_neginf(float %arg) {
1826 ; CHECK-LABEL: @test_class_fabs_neginf(
1827 ; CHECK-NEXT: ret i1 false
1829 %fabs = call float @llvm.fabs.f32(float %arg)
1830 %class = call i1 @llvm.is.fpclass.f32(float %fabs, i32 4)
1835 define i1 @test_class_fabs_negnormal(float %arg) {
1836 ; CHECK-LABEL: @test_class_fabs_negnormal(
1837 ; CHECK-NEXT: ret i1 false
1839 %fabs = call float @llvm.fabs.f32(float %arg)
1840 %class = call i1 @llvm.is.fpclass.f32(float %fabs, i32 8)
1845 define i1 @test_class_fabs_negsubnormal(float %arg) {
1846 ; CHECK-LABEL: @test_class_fabs_negsubnormal(
1847 ; CHECK-NEXT: ret i1 false
1849 %fabs = call float @llvm.fabs.f32(float %arg)
1850 %class = call i1 @llvm.is.fpclass.f32(float %fabs, i32 16)
1855 define i1 @test_class_fabs_negzero(float %arg) {
1856 ; CHECK-LABEL: @test_class_fabs_negzero(
1857 ; CHECK-NEXT: ret i1 false
1859 %fabs = call float @llvm.fabs.f32(float %arg)
1860 %class = call i1 @llvm.is.fpclass.f32(float %fabs, i32 32)
1865 define i1 @test_class_fabs_poszero(float %arg) {
1866 ; CHECK-LABEL: @test_class_fabs_poszero(
1867 ; CHECK-NEXT: [[CLASS:%.*]] = fcmp oeq float [[ARG:%.*]], 0.000000e+00
1868 ; CHECK-NEXT: ret i1 [[CLASS]]
1870 %fabs = call float @llvm.fabs.f32(float %arg)
1871 %class = call i1 @llvm.is.fpclass.f32(float %fabs, i32 64)
1876 define i1 @test_class_fabs_possubnormal(float %arg) {
1877 ; CHECK-LABEL: @test_class_fabs_possubnormal(
1878 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 144)
1879 ; CHECK-NEXT: ret i1 [[CLASS]]
1881 %fabs = call float @llvm.fabs.f32(float %arg)
1882 %class = call i1 @llvm.is.fpclass.f32(float %fabs, i32 128)
1887 define i1 @test_class_fabs_posnormal(float %arg) {
1888 ; CHECK-LABEL: @test_class_fabs_posnormal(
1889 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 264)
1890 ; CHECK-NEXT: ret i1 [[CLASS]]
1892 %fabs = call float @llvm.fabs.f32(float %arg)
1893 %class = call i1 @llvm.is.fpclass.f32(float %fabs, i32 256)
1898 define i1 @test_class_fabs_posinf(float %arg) {
1899 ; CHECK-LABEL: @test_class_fabs_posinf(
1900 ; CHECK-NEXT: [[TMP1:%.*]] = call float @llvm.fabs.f32(float [[ARG:%.*]])
1901 ; CHECK-NEXT: [[CLASS:%.*]] = fcmp oeq float [[TMP1]], 0x7FF0000000000000
1902 ; CHECK-NEXT: ret i1 [[CLASS]]
1904 %fabs = call float @llvm.fabs.f32(float %arg)
1905 %class = call i1 @llvm.is.fpclass.f32(float %fabs, i32 512)
1910 define i1 @test_class_fabs_isnan(float %arg) {
1911 ; CHECK-LABEL: @test_class_fabs_isnan(
1912 ; CHECK-NEXT: [[CLASS:%.*]] = fcmp uno float [[ARG:%.*]], 0.000000e+00
1913 ; CHECK-NEXT: ret i1 [[CLASS]]
1915 %fabs = call float @llvm.fabs.f32(float %arg)
1916 %class = call i1 @llvm.is.fpclass.f32(float %fabs, i32 3)
1921 define i1 @test_class_fabs_nnan(float %arg) {
1922 ; CHECK-LABEL: @test_class_fabs_nnan(
1923 ; CHECK-NEXT: [[CLASS:%.*]] = fcmp ord float [[ARG:%.*]], 0.000000e+00
1924 ; CHECK-NEXT: ret i1 [[CLASS]]
1926 %fabs = call float @llvm.fabs.f32(float %arg)
1927 %class = call i1 @llvm.is.fpclass.f32(float %fabs, i32 1020)
1932 define i1 @test_class_fabs_normal(float %arg) {
1933 ; CHECK-LABEL: @test_class_fabs_normal(
1934 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 264)
1935 ; CHECK-NEXT: ret i1 [[CLASS]]
1937 %fabs = call float @llvm.fabs.f32(float %arg)
1938 %class = call i1 @llvm.is.fpclass.f32(float %fabs, i32 264)
1943 define i1 @test_class_fabs_zero(float %arg) {
1944 ; CHECK-LABEL: @test_class_fabs_zero(
1945 ; CHECK-NEXT: [[CLASS:%.*]] = fcmp oeq float [[ARG:%.*]], 0.000000e+00
1946 ; CHECK-NEXT: ret i1 [[CLASS]]
1948 %fabs = call float @llvm.fabs.f32(float %arg)
1949 %class = call i1 @llvm.is.fpclass.f32(float %fabs, i32 96)
1954 define i1 @test_class_fabs_subnormal(float %arg) {
1955 ; CHECK-LABEL: @test_class_fabs_subnormal(
1956 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 144)
1957 ; CHECK-NEXT: ret i1 [[CLASS]]
1959 %fabs = call float @llvm.fabs.f32(float %arg)
1960 %class = call i1 @llvm.is.fpclass.f32(float %fabs, i32 144)
1965 define i1 @test_class_fabs_normal_neginf(float %arg) {
1966 ; CHECK-LABEL: @test_class_fabs_normal_neginf(
1967 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 264)
1968 ; CHECK-NEXT: ret i1 [[CLASS]]
1970 %fabs = call float @llvm.fabs.f32(float %arg)
1971 %class = call i1 @llvm.is.fpclass.f32(float %fabs, i32 268)
1976 define i1 @test_class_fabs_normal_pinf(float %arg) {
1977 ; CHECK-LABEL: @test_class_fabs_normal_pinf(
1978 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 780)
1979 ; CHECK-NEXT: ret i1 [[CLASS]]
1981 %fabs = call float @llvm.fabs.f32(float %arg)
1982 %class = call i1 @llvm.is.fpclass.f32(float %fabs, i32 776)
1987 define i1 @test_class_fabs_neginf_posnormal_negsubnormal_poszero(float %arg) {
1988 ; CHECK-LABEL: @test_class_fabs_neginf_posnormal_negsubnormal_poszero(
1989 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 360)
1990 ; CHECK-NEXT: ret i1 [[CLASS]]
1992 %fabs = call float @llvm.fabs.f32(float %arg)
1993 %class = call i1 @llvm.is.fpclass.f32(float %fabs, i32 340)
1997 ; -> pnormal|pzero|snan
1998 define i1 @test_class_fabs_neginf_posnormal_negsubnormal_poszero_snan(float %arg) {
1999 ; CHECK-LABEL: @test_class_fabs_neginf_posnormal_negsubnormal_poszero_snan(
2000 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 361)
2001 ; CHECK-NEXT: ret i1 [[CLASS]]
2003 %fabs = call float @llvm.fabs.f32(float %arg)
2004 %class = call i1 @llvm.is.fpclass.f32(float %fabs, i32 341)
2008 ; -> negnormal|pzero|qnan
2009 define i1 @test_class_fabs_neginf_posnormal_negsubnormal_poszero_qnan(float %arg) {
2010 ; CHECK-LABEL: @test_class_fabs_neginf_posnormal_negsubnormal_poszero_qnan(
2011 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 362)
2012 ; CHECK-NEXT: ret i1 [[CLASS]]
2014 %fabs = call float @llvm.fabs.f32(float %arg)
2015 %class = call i1 @llvm.is.fpclass.f32(float %fabs, i32 342)
2019 ; -> pnormal|pzero|nan
2020 define i1 @test_class_fabs_neginf_posnormal_negsubnormal_poszero_nan(float %arg) {
2021 ; CHECK-LABEL: @test_class_fabs_neginf_posnormal_negsubnormal_poszero_nan(
2022 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 363)
2023 ; CHECK-NEXT: ret i1 [[CLASS]]
2025 %fabs = call float @llvm.fabs.f32(float %arg)
2026 %class = call i1 @llvm.is.fpclass.f32(float %fabs, i32 343)
2030 ; -> ninf|pnormal|negsubnormal|pzero
2031 define i1 @test_class_fabs_posinf_negnormal_possubnormal_negzero(float %arg) {
2032 ; CHECK-LABEL: @test_class_fabs_posinf_negnormal_possubnormal_negzero(
2033 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 660)
2034 ; CHECK-NEXT: ret i1 [[CLASS]]
2036 %fabs = call float @llvm.fabs.f32(float %arg)
2037 %class = call i1 @llvm.is.fpclass.f32(float %fabs, i32 680)
2041 ; -> pinf|psubnormal|snan
2042 define i1 @test_class_fabs_posinf_negnormal_possubnormal_negzero_snan(float %arg) {
2043 ; CHECK-LABEL: @test_class_fabs_posinf_negnormal_possubnormal_negzero_snan(
2044 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 661)
2045 ; CHECK-NEXT: ret i1 [[CLASS]]
2047 %fabs = call float @llvm.fabs.f32(float %arg)
2048 %class = call i1 @llvm.is.fpclass.f32(float %fabs, i32 681)
2052 ; -> pinf|psubnormal|qnan
2053 define i1 @test_class_fabs_posinf_negnormal_possubnormal_negzero_qnan(float %arg) {
2054 ; CHECK-LABEL: @test_class_fabs_posinf_negnormal_possubnormal_negzero_qnan(
2055 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 662)
2056 ; CHECK-NEXT: ret i1 [[CLASS]]
2058 %fabs = call float @llvm.fabs.f32(float %arg)
2059 %class = call i1 @llvm.is.fpclass.f32(float %fabs, i32 682)
2063 ; -> pinf|psubnormal|nan
2064 define i1 @test_class_fabs_posinf_negnormal_possubnormal_negzero_nan(float %arg) {
2065 ; CHECK-LABEL: @test_class_fabs_posinf_negnormal_possubnormal_negzero_nan(
2066 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 663)
2067 ; CHECK-NEXT: ret i1 [[CLASS]]
2069 %fabs = call float @llvm.fabs.f32(float %arg)
2070 %class = call i1 @llvm.is.fpclass.f32(float %fabs, i32 683)
2074 ; strictfp doesn't matter
2075 ; -> pinf|psubnormal|snan
2076 define i1 @test_class_fabs_posinf_negnormal_possubnormal_negzero_snan_strictfp(float %arg) strictfp {
2077 ; CHECK-LABEL: @test_class_fabs_posinf_negnormal_possubnormal_negzero_snan_strictfp(
2078 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 661) #[[ATTR0]]
2079 ; CHECK-NEXT: ret i1 [[CLASS]]
2081 %fabs = call float @llvm.fabs.f32(float %arg) strictfp
2082 %class = call i1 @llvm.is.fpclass.f32(float %fabs, i32 681) strictfp
2086 ; multiple uses don't matter
2087 define i1 @test_class_fabs_multiple_use_fabs(float %arg, ptr %ptr) {
2088 ; CHECK-LABEL: @test_class_fabs_multiple_use_fabs(
2089 ; CHECK-NEXT: [[FABS:%.*]] = call float @llvm.fabs.f32(float [[ARG:%.*]])
2090 ; CHECK-NEXT: store float [[FABS]], ptr [[PTR:%.*]], align 4
2091 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG]], i32 662)
2092 ; CHECK-NEXT: ret i1 [[CLASS]]
2094 %fabs = call float @llvm.fabs.f32(float %arg)
2095 store float %fabs, ptr %ptr
2096 %class = call i1 @llvm.is.fpclass.f32(float %fabs, i32 682)
2100 define <2 x i1> @test_class_fabs_posinf_negnormal_possubnormal_negzero_nan_vector(<2 x float> %arg) {
2101 ; CHECK-LABEL: @test_class_fabs_posinf_negnormal_possubnormal_negzero_nan_vector(
2102 ; CHECK-NEXT: [[CLASS:%.*]] = call <2 x i1> @llvm.is.fpclass.v2f32(<2 x float> [[ARG:%.*]], i32 663)
2103 ; CHECK-NEXT: ret <2 x i1> [[CLASS]]
2105 %fabs = call <2 x float> @llvm.fabs.v2f32(<2 x float> %arg)
2106 %class = call <2 x i1> @llvm.is.fpclass.v2f32(<2 x float> %fabs, i32 683)
2110 ; ---------------------------------------------------------------------
2112 ; ---------------------------------------------------------------------
2114 define i1 @test_class_fneg_fabs_none(float %arg) {
2115 ; CHECK-LABEL: @test_class_fneg_fabs_none(
2116 ; CHECK-NEXT: ret i1 false
2118 %fabs = call float @llvm.fabs.f32(float %arg)
2119 %fneg.fabs = fneg float %fabs
2120 %class = call i1 @llvm.is.fpclass.f32(float %fneg.fabs, i32 0)
2124 define i1 @test_class_fneg_fabs_all(float %arg) {
2125 ; CHECK-LABEL: @test_class_fneg_fabs_all(
2126 ; CHECK-NEXT: ret i1 true
2128 %fabs = call float @llvm.fabs.f32(float %arg)
2129 %fneg.fabs = fneg float %fabs
2130 %class = call i1 @llvm.is.fpclass.f32(float %fneg.fabs, i32 1023)
2134 define i1 @test_class_fneg_fabs_snan(float %arg) {
2135 ; CHECK-LABEL: @test_class_fneg_fabs_snan(
2136 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 1)
2137 ; CHECK-NEXT: ret i1 [[CLASS]]
2139 %fabs = call float @llvm.fabs.f32(float %arg)
2140 %fneg.fabs = fneg float %fabs
2141 %class = call i1 @llvm.is.fpclass.f32(float %fneg.fabs, i32 1)
2145 define i1 @test_class_fneg_fabs_qnan(float %arg) {
2146 ; CHECK-LABEL: @test_class_fneg_fabs_qnan(
2147 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 2)
2148 ; CHECK-NEXT: ret i1 [[CLASS]]
2150 %fabs = call float @llvm.fabs.f32(float %arg)
2151 %fneg.fabs = fneg float %fabs
2152 %class = call i1 @llvm.is.fpclass.f32(float %fneg.fabs, i32 2)
2156 define i1 @test_class_fneg_fabs_neginf(float %arg) {
2157 ; CHECK-LABEL: @test_class_fneg_fabs_neginf(
2158 ; CHECK-NEXT: [[TMP1:%.*]] = call float @llvm.fabs.f32(float [[ARG:%.*]])
2159 ; CHECK-NEXT: [[CLASS:%.*]] = fcmp oeq float [[TMP1]], 0x7FF0000000000000
2160 ; CHECK-NEXT: ret i1 [[CLASS]]
2162 %fabs = call float @llvm.fabs.f32(float %arg)
2163 %fneg.fabs = fneg float %fabs
2164 %class = call i1 @llvm.is.fpclass.f32(float %fneg.fabs, i32 4)
2168 define i1 @test_class_fneg_fabs_negnormal(float %arg) {
2169 ; CHECK-LABEL: @test_class_fneg_fabs_negnormal(
2170 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 264)
2171 ; CHECK-NEXT: ret i1 [[CLASS]]
2173 %fabs = call float @llvm.fabs.f32(float %arg)
2174 %fneg.fabs = fneg float %fabs
2175 %class = call i1 @llvm.is.fpclass.f32(float %fneg.fabs, i32 8)
2179 define i1 @test_class_fneg_fabs_negsubnormal(float %arg) {
2180 ; CHECK-LABEL: @test_class_fneg_fabs_negsubnormal(
2181 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 144)
2182 ; CHECK-NEXT: ret i1 [[CLASS]]
2184 %fabs = call float @llvm.fabs.f32(float %arg)
2185 %fneg.fabs = fneg float %fabs
2186 %class = call i1 @llvm.is.fpclass.f32(float %fneg.fabs, i32 16)
2190 define i1 @test_class_fneg_fabs_negzero(float %arg) {
2191 ; CHECK-LABEL: @test_class_fneg_fabs_negzero(
2192 ; CHECK-NEXT: [[CLASS:%.*]] = fcmp oeq float [[ARG:%.*]], 0.000000e+00
2193 ; CHECK-NEXT: ret i1 [[CLASS]]
2195 %fabs = call float @llvm.fabs.f32(float %arg)
2196 %fneg.fabs = fneg float %fabs
2197 %class = call i1 @llvm.is.fpclass.f32(float %fneg.fabs, i32 32)
2201 define i1 @test_class_fneg_fabs_poszero(float %arg) {
2202 ; CHECK-LABEL: @test_class_fneg_fabs_poszero(
2203 ; CHECK-NEXT: ret i1 false
2205 %fabs = call float @llvm.fabs.f32(float %arg)
2206 %fneg.fabs = fneg float %fabs
2207 %class = call i1 @llvm.is.fpclass.f32(float %fneg.fabs, i32 64)
2211 define i1 @test_class_fneg_fabs_possubnormal(float %arg) {
2212 ; CHECK-LABEL: @test_class_fneg_fabs_possubnormal(
2213 ; CHECK-NEXT: ret i1 false
2215 %fabs = call float @llvm.fabs.f32(float %arg)
2216 %fneg.fabs = fneg float %fabs
2217 %class = call i1 @llvm.is.fpclass.f32(float %fneg.fabs, i32 128)
2221 define i1 @test_class_fneg_fabs_posnormal(float %arg) {
2222 ; CHECK-LABEL: @test_class_fneg_fabs_posnormal(
2223 ; CHECK-NEXT: ret i1 false
2225 %fabs = call float @llvm.fabs.f32(float %arg)
2226 %fneg.fabs = fneg float %fabs
2227 %class = call i1 @llvm.is.fpclass.f32(float %fneg.fabs, i32 256)
2231 define i1 @test_class_fneg_fabs_posinf(float %arg) {
2232 ; CHECK-LABEL: @test_class_fneg_fabs_posinf(
2233 ; CHECK-NEXT: ret i1 false
2235 %fabs = call float @llvm.fabs.f32(float %arg)
2236 %fneg.fabs = fneg float %fabs
2237 %class = call i1 @llvm.is.fpclass.f32(float %fneg.fabs, i32 512)
2241 define i1 @test_class_fneg_fabs_isnan(float %arg) {
2242 ; CHECK-LABEL: @test_class_fneg_fabs_isnan(
2243 ; CHECK-NEXT: [[CLASS:%.*]] = fcmp uno float [[ARG:%.*]], 0.000000e+00
2244 ; CHECK-NEXT: ret i1 [[CLASS]]
2246 %fabs = call float @llvm.fabs.f32(float %arg)
2247 %fneg.fabs = fneg float %fabs
2248 %class = call i1 @llvm.is.fpclass.f32(float %fneg.fabs, i32 3)
2252 define i1 @test_class_fneg_fabs_nnan(float %arg) {
2253 ; CHECK-LABEL: @test_class_fneg_fabs_nnan(
2254 ; CHECK-NEXT: [[CLASS:%.*]] = fcmp ord float [[ARG:%.*]], 0.000000e+00
2255 ; CHECK-NEXT: ret i1 [[CLASS]]
2257 %fabs = call float @llvm.fabs.f32(float %arg)
2258 %fneg.fabs = fneg float %fabs
2259 %class = call i1 @llvm.is.fpclass.f32(float %fneg.fabs, i32 1020)
2263 define i1 @test_class_fneg_fabs_normal(float %arg) {
2264 ; CHECK-LABEL: @test_class_fneg_fabs_normal(
2265 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 264)
2266 ; CHECK-NEXT: ret i1 [[CLASS]]
2268 %fabs = call float @llvm.fabs.f32(float %arg)
2269 %fneg.fabs = fneg float %fabs
2270 %class = call i1 @llvm.is.fpclass.f32(float %fneg.fabs, i32 264)
2274 define i1 @test_class_fneg_fabs_zero(float %arg) {
2275 ; CHECK-LABEL: @test_class_fneg_fabs_zero(
2276 ; CHECK-NEXT: [[CLASS:%.*]] = fcmp oeq float [[ARG:%.*]], 0.000000e+00
2277 ; CHECK-NEXT: ret i1 [[CLASS]]
2279 %fabs = call float @llvm.fabs.f32(float %arg)
2280 %fneg.fabs = fneg float %fabs
2281 %class = call i1 @llvm.is.fpclass.f32(float %fneg.fabs, i32 96)
2285 define i1 @test_class_fneg_fabs_subnormal(float %arg) {
2286 ; CHECK-LABEL: @test_class_fneg_fabs_subnormal(
2287 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 144)
2288 ; CHECK-NEXT: ret i1 [[CLASS]]
2290 %fabs = call float @llvm.fabs.f32(float %arg)
2291 %fneg.fabs = fneg float %fabs
2292 %class = call i1 @llvm.is.fpclass.f32(float %fneg.fabs, i32 144)
2296 define i1 @test_class_fneg_fabs_normal_neginf(float %arg) {
2297 ; CHECK-LABEL: @test_class_fneg_fabs_normal_neginf(
2298 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 780)
2299 ; CHECK-NEXT: ret i1 [[CLASS]]
2301 %fabs = call float @llvm.fabs.f32(float %arg)
2302 %fneg.fabs = fneg float %fabs
2303 %class = call i1 @llvm.is.fpclass.f32(float %fneg.fabs, i32 268)
2307 define i1 @test_class_fneg_fabs_normal_pinf(float %arg) {
2308 ; CHECK-LABEL: @test_class_fneg_fabs_normal_pinf(
2309 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 264)
2310 ; CHECK-NEXT: ret i1 [[CLASS]]
2312 %fabs = call float @llvm.fabs.f32(float %arg)
2313 %fneg.fabs = fneg float %fabs
2314 %class = call i1 @llvm.is.fpclass.f32(float %fneg.fabs, i32 776)
2318 define i1 @test_class_fneg_fabs_neginf_posnormal_negsubnormal_poszero(float %arg) {
2319 ; CHECK-LABEL: @test_class_fneg_fabs_neginf_posnormal_negsubnormal_poszero(
2320 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 660)
2321 ; CHECK-NEXT: ret i1 [[CLASS]]
2323 %fabs = call float @llvm.fabs.f32(float %arg)
2324 %fneg.fabs = fneg float %fabs
2325 %class = call i1 @llvm.is.fpclass.f32(float %fneg.fabs, i32 340)
2329 define i1 @test_class_fneg_fabs_neginf_posnormal_negsubnormal_poszero_snan(float %arg) {
2330 ; CHECK-LABEL: @test_class_fneg_fabs_neginf_posnormal_negsubnormal_poszero_snan(
2331 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 661)
2332 ; CHECK-NEXT: ret i1 [[CLASS]]
2334 %fabs = call float @llvm.fabs.f32(float %arg)
2335 %fneg.fabs = fneg float %fabs
2336 %class = call i1 @llvm.is.fpclass.f32(float %fneg.fabs, i32 341)
2340 define i1 @test_class_fneg_fabs_neginf_posnormal_negsubnormal_poszero_qnan(float %arg) {
2341 ; CHECK-LABEL: @test_class_fneg_fabs_neginf_posnormal_negsubnormal_poszero_qnan(
2342 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 662)
2343 ; CHECK-NEXT: ret i1 [[CLASS]]
2345 %fabs = call float @llvm.fabs.f32(float %arg)
2346 %fneg.fabs = fneg float %fabs
2347 %class = call i1 @llvm.is.fpclass.f32(float %fneg.fabs, i32 342)
2351 define i1 @test_class_fneg_fabs_neginf_posnormal_negsubnormal_poszero_nan(float %arg) {
2352 ; CHECK-LABEL: @test_class_fneg_fabs_neginf_posnormal_negsubnormal_poszero_nan(
2353 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 663)
2354 ; CHECK-NEXT: ret i1 [[CLASS]]
2356 %fabs = call float @llvm.fabs.f32(float %arg)
2357 %fneg.fabs = fneg float %fabs
2358 %class = call i1 @llvm.is.fpclass.f32(float %fneg.fabs, i32 343)
2362 define i1 @test_class_fneg_fabs_posinf_negnormal_possubnormal_negzero(float %arg) {
2363 ; CHECK-LABEL: @test_class_fneg_fabs_posinf_negnormal_possubnormal_negzero(
2364 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 360)
2365 ; CHECK-NEXT: ret i1 [[CLASS]]
2367 %fabs = call float @llvm.fabs.f32(float %arg)
2368 %fneg.fabs = fneg float %fabs
2369 %class = call i1 @llvm.is.fpclass.f32(float %fneg.fabs, i32 680)
2373 define i1 @test_class_fneg_fabs_posinf_negnormal_possubnormal_negzero_snan(float %arg) {
2374 ; CHECK-LABEL: @test_class_fneg_fabs_posinf_negnormal_possubnormal_negzero_snan(
2375 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 361)
2376 ; CHECK-NEXT: ret i1 [[CLASS]]
2378 %fabs = call float @llvm.fabs.f32(float %arg)
2379 %fneg.fabs = fneg float %fabs
2380 %class = call i1 @llvm.is.fpclass.f32(float %fneg.fabs, i32 681)
2384 define i1 @test_class_fneg_fabs_posinf_negnormal_possubnormal_negzero_qnan(float %arg) {
2385 ; CHECK-LABEL: @test_class_fneg_fabs_posinf_negnormal_possubnormal_negzero_qnan(
2386 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 362)
2387 ; CHECK-NEXT: ret i1 [[CLASS]]
2389 %fabs = call float @llvm.fabs.f32(float %arg)
2390 %fneg.fabs = fneg float %fabs
2391 %class = call i1 @llvm.is.fpclass.f32(float %fneg.fabs, i32 682)
2395 define i1 @test_class_fneg_fabs_posinf_negnormal_possubnormal_negzero_nan(float %arg) {
2396 ; CHECK-LABEL: @test_class_fneg_fabs_posinf_negnormal_possubnormal_negzero_nan(
2397 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 363)
2398 ; CHECK-NEXT: ret i1 [[CLASS]]
2400 %fabs = call float @llvm.fabs.f32(float %arg)
2401 %fneg.fabs = fneg float %fabs
2402 %class = call i1 @llvm.is.fpclass.f32(float %fneg.fabs, i32 683)
2406 ; strictfp doesn't matter
2407 define i1 @test_class_fneg_fabs_posinf_negnormal_possubnormal_negzero_snan_strictfp(float %arg) strictfp {
2408 ; CHECK-LABEL: @test_class_fneg_fabs_posinf_negnormal_possubnormal_negzero_snan_strictfp(
2409 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 361) #[[ATTR0]]
2410 ; CHECK-NEXT: ret i1 [[CLASS]]
2412 %fabs = call float @llvm.fabs.f32(float %arg) strictfp
2413 %fneg.fabs = fneg float %fabs
2414 %class = call i1 @llvm.is.fpclass.f32(float %fneg.fabs, i32 681) strictfp
2418 ; multiple uses don't matter
2419 define i1 @test_class_fneg_fabs_multiple_use_fabs(float %arg, ptr %ptr) {
2420 ; CHECK-LABEL: @test_class_fneg_fabs_multiple_use_fabs(
2421 ; CHECK-NEXT: [[FABS:%.*]] = call float @llvm.fabs.f32(float [[ARG:%.*]])
2422 ; CHECK-NEXT: [[FNEG_FABS:%.*]] = fneg float [[FABS]]
2423 ; CHECK-NEXT: store float [[FNEG_FABS]], ptr [[PTR:%.*]], align 4
2424 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG]], i32 362)
2425 ; CHECK-NEXT: ret i1 [[CLASS]]
2427 %fabs = call float @llvm.fabs.f32(float %arg)
2428 %fneg.fabs = fneg float %fabs
2429 store float %fneg.fabs, ptr %ptr
2430 %class = call i1 @llvm.is.fpclass.f32(float %fneg.fabs, i32 682)
2434 define <2 x i1> @test_class_fneg_fabs_posinf_negnormal_possubnormal_negzero_nan_vector(<2 x float> %arg) {
2435 ; CHECK-LABEL: @test_class_fneg_fabs_posinf_negnormal_possubnormal_negzero_nan_vector(
2436 ; CHECK-NEXT: [[CLASS:%.*]] = call <2 x i1> @llvm.is.fpclass.v2f32(<2 x float> [[ARG:%.*]], i32 663)
2437 ; CHECK-NEXT: ret <2 x i1> [[CLASS]]
2439 %fabs = call <2 x float> @llvm.fabs.v2f32(<2 x float> %arg)
2440 %fneg.fabs = fneg <2 x float> %fabs
2441 %class = call <2 x i1> @llvm.is.fpclass.v2f32(<2 x float> %fabs, i32 683)
2445 define i1 @test_class_is_zero_nozero_src(float nofpclass(zero) %arg) {
2446 ; CHECK-LABEL: @test_class_is_zero_nozero_src(
2447 ; CHECK-NEXT: ret i1 false
2449 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 96)
2453 define i1 @test_class_is_zero_noposzero_src(float nofpclass(pzero) %arg) {
2454 ; CHECK-LABEL: @test_class_is_zero_noposzero_src(
2455 ; CHECK-NEXT: [[CLASS:%.*]] = fcmp oeq float [[ARG:%.*]], 0.000000e+00
2456 ; CHECK-NEXT: ret i1 [[CLASS]]
2458 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 96)
2462 define i1 @test_class_is_zero_nonegzero_src(float nofpclass(nzero) %arg) {
2463 ; CHECK-LABEL: @test_class_is_zero_nonegzero_src(
2464 ; CHECK-NEXT: [[CLASS:%.*]] = fcmp oeq float [[ARG:%.*]], 0.000000e+00
2465 ; CHECK-NEXT: ret i1 [[CLASS]]
2467 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 96)
2471 define i1 @test_class_is_pzero_nozero_src(float nofpclass(zero) %arg) {
2472 ; CHECK-LABEL: @test_class_is_pzero_nozero_src(
2473 ; CHECK-NEXT: ret i1 false
2475 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 64)
2479 define i1 @test_class_is_pzero_nopzero_src(float nofpclass(pzero) %arg) {
2480 ; CHECK-LABEL: @test_class_is_pzero_nopzero_src(
2481 ; CHECK-NEXT: ret i1 false
2483 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 64)
2487 define i1 @test_class_is_pzero_nonzero_src(float nofpclass(nzero) %arg) {
2488 ; CHECK-LABEL: @test_class_is_pzero_nonzero_src(
2489 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 64)
2490 ; CHECK-NEXT: ret i1 [[CLASS]]
2492 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 64)
2496 define i1 @test_class_is_nzero_nozero_src(float nofpclass(zero) %arg) {
2497 ; CHECK-LABEL: @test_class_is_nzero_nozero_src(
2498 ; CHECK-NEXT: ret i1 false
2500 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 32)
2504 define i1 @test_class_is_nzero_nopzero_src(float nofpclass(pzero) %arg) {
2505 ; CHECK-LABEL: @test_class_is_nzero_nopzero_src(
2506 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 32)
2507 ; CHECK-NEXT: ret i1 [[CLASS]]
2509 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 32)
2513 define i1 @test_class_is_nzero_nonzero_src(float nofpclass(nzero) %arg) {
2514 ; CHECK-LABEL: @test_class_is_nzero_nonzero_src(
2515 ; CHECK-NEXT: ret i1 false
2517 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 32)
2521 define i1 @test_class_is_normal_or_zero_nozero_src(float nofpclass(zero) %arg) {
2522 ; CHECK-LABEL: @test_class_is_normal_or_zero_nozero_src(
2523 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 264)
2524 ; CHECK-NEXT: ret i1 [[CLASS]]
2526 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 360)
2530 define i1 @test_class_is_inf_or_nan_nozero_src(float nofpclass(zero) %arg) {
2531 ; CHECK-LABEL: @test_class_is_inf_or_nan_nozero_src(
2532 ; CHECK-NEXT: [[TMP1:%.*]] = call float @llvm.fabs.f32(float [[ARG:%.*]])
2533 ; CHECK-NEXT: [[CLASS:%.*]] = fcmp ueq float [[TMP1]], 0x7FF0000000000000
2534 ; CHECK-NEXT: ret i1 [[CLASS]]
2536 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 519)
2540 define i1 @test_class_is_inf_or_nan_noinf_src(float nofpclass(inf) %arg) {
2541 ; CHECK-LABEL: @test_class_is_inf_or_nan_noinf_src(
2542 ; CHECK-NEXT: [[TMP1:%.*]] = call float @llvm.fabs.f32(float [[ARG:%.*]])
2543 ; CHECK-NEXT: [[CLASS:%.*]] = fcmp ueq float [[TMP1]], 0x7FF0000000000000
2544 ; CHECK-NEXT: ret i1 [[CLASS]]
2546 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 519)
2550 define i1 @test_class_is_inf_or_nan_nonan_src(float nofpclass(nan) %arg) {
2551 ; CHECK-LABEL: @test_class_is_inf_or_nan_nonan_src(
2552 ; CHECK-NEXT: [[TMP1:%.*]] = call float @llvm.fabs.f32(float [[ARG:%.*]])
2553 ; CHECK-NEXT: [[CLASS:%.*]] = fcmp ueq float [[TMP1]], 0x7FF0000000000000
2554 ; CHECK-NEXT: ret i1 [[CLASS]]
2556 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 519)
2560 define i1 @test_class_is_normal_or_subnormal_noinf_src(float nofpclass(inf) %arg) {
2561 ; CHECK-LABEL: @test_class_is_normal_or_subnormal_noinf_src(
2562 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 408)
2563 ; CHECK-NEXT: ret i1 [[CLASS]]
2565 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 408)
2569 define i1 @test_class_is_neginf_or_nopinf_src(float nofpclass(pinf) %arg) {
2570 ; CHECK-LABEL: @test_class_is_neginf_or_nopinf_src(
2571 ; CHECK-NEXT: [[CLASS:%.*]] = fcmp oeq float [[ARG:%.*]], 0xFFF0000000000000
2572 ; CHECK-NEXT: ret i1 [[CLASS]]
2574 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 4)
2578 define i1 @test_class_is_neginf_noninf_src(float nofpclass(ninf) %arg) {
2579 ; CHECK-LABEL: @test_class_is_neginf_noninf_src(
2580 ; CHECK-NEXT: ret i1 false
2582 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 4)
2586 define i1 @test_class_is_neginf_noinf_src(float nofpclass(inf) %arg) {
2587 ; CHECK-LABEL: @test_class_is_neginf_noinf_src(
2588 ; CHECK-NEXT: ret i1 false
2590 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 4)
2594 define i1 @test_class_is_posinf_noninf_src(float nofpclass(ninf) %arg) {
2595 ; CHECK-LABEL: @test_class_is_posinf_noninf_src(
2596 ; CHECK-NEXT: [[CLASS:%.*]] = fcmp oeq float [[ARG:%.*]], 0x7FF0000000000000
2597 ; CHECK-NEXT: ret i1 [[CLASS]]
2599 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 512)
2603 define i1 @test_class_is_posinf_nopinf_src(float nofpclass(pinf) %arg) {
2604 ; CHECK-LABEL: @test_class_is_posinf_nopinf_src(
2605 ; CHECK-NEXT: ret i1 false
2607 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 512)
2611 define i1 @test_class_is_posinf_noinf_src(float nofpclass(inf) %arg) {
2612 ; CHECK-LABEL: @test_class_is_posinf_noinf_src(
2613 ; CHECK-NEXT: ret i1 false
2615 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 512)
2619 define i1 @test_class_is_subnormal_nosub_src(float nofpclass(sub) %arg) {
2620 ; CHECK-LABEL: @test_class_is_subnormal_nosub_src(
2621 ; CHECK-NEXT: ret i1 false
2623 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 144)
2627 define i1 @test_class_is_subnormal_nonsub_src(float nofpclass(nsub) %arg) {
2628 ; CHECK-LABEL: @test_class_is_subnormal_nonsub_src(
2629 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 128)
2630 ; CHECK-NEXT: ret i1 [[CLASS]]
2632 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 144)
2636 define i1 @test_class_is_not_subnormal_nosub_src(float nofpclass(sub) %arg) {
2637 ; CHECK-LABEL: @test_class_is_not_subnormal_nosub_src(
2638 ; CHECK-NEXT: ret i1 true
2640 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 879)
2644 define i1 @test_class_is_not_negsubnormal_nosub_src(float nofpclass(sub) %arg) {
2645 ; CHECK-LABEL: @test_class_is_not_negsubnormal_nosub_src(
2646 ; CHECK-NEXT: ret i1 true
2648 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 1007)
2652 define i1 @test_class_is_not_negsubnormal_nonegsub_src(float nofpclass(nsub) %arg) {
2653 ; CHECK-LABEL: @test_class_is_not_negsubnormal_nonegsub_src(
2654 ; CHECK-NEXT: ret i1 true
2656 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 1007)
2660 define i1 @test_class_is_nnormal_nonorm_src(float nofpclass(norm) %arg) {
2661 ; CHECK-LABEL: @test_class_is_nnormal_nonorm_src(
2662 ; CHECK-NEXT: ret i1 false
2664 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 264)
2668 define i1 @test_class_is_not_nnormal_nonorm_src(float nofpclass(norm) %arg) {
2669 ; CHECK-LABEL: @test_class_is_not_nnormal_nonorm_src(
2670 ; CHECK-NEXT: ret i1 true
2672 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 759)
2676 define i1 @test_class_is_not_nnormal_onlynorm_src(float nofpclass(nan inf zero sub) %arg) {
2677 ; CHECK-LABEL: @test_class_is_not_nnormal_onlynorm_src(
2678 ; CHECK-NEXT: ret i1 false
2680 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 759)
2684 define i1 @test_class_is_nnormal_onlynorm_src(float nofpclass(nan inf zero sub) %arg) {
2685 ; CHECK-LABEL: @test_class_is_nnormal_onlynorm_src(
2686 ; CHECK-NEXT: ret i1 true
2688 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 264)
2692 ; Make sure assume works
2693 define i1 @test_class_is_normal_assume_normal(float %x) {
2694 ; CHECK-LABEL: @test_class_is_normal_assume_normal(
2695 ; CHECK-NEXT: [[ASSUMED_IS_NORMAL:%.*]] = call i1 @llvm.is.fpclass.f32(float [[X:%.*]], i32 264)
2696 ; CHECK-NEXT: call void @llvm.assume(i1 [[ASSUMED_IS_NORMAL]])
2697 ; CHECK-NEXT: ret i1 true
2699 %assumed.is.normal = call i1 @llvm.is.fpclass.f32(float %x, i32 264)
2700 call void @llvm.assume(i1 %assumed.is.normal)
2701 %class = call i1 @llvm.is.fpclass.f32(float %x, i32 264)
2705 define i1 @test_class_is_normal_assume_not_normal(float %x) {
2706 ; CHECK-LABEL: @test_class_is_normal_assume_not_normal(
2707 ; CHECK-NEXT: [[ASSUMED_IS_NORMAL:%.*]] = call i1 @llvm.is.fpclass.f32(float [[X:%.*]], i32 264)
2708 ; CHECK-NEXT: call void @llvm.assume(i1 [[ASSUMED_IS_NORMAL]])
2709 ; CHECK-NEXT: ret i1 false
2711 %assumed.is.normal = call i1 @llvm.is.fpclass.f32(float %x, i32 264)
2712 call void @llvm.assume(i1 %assumed.is.normal)
2713 %class = call i1 @llvm.is.fpclass.f32(float %x, i32 759)
2717 define i1 @test_class_is_nan_assume_ord(float %x) {
2718 ; CHECK-LABEL: @test_class_is_nan_assume_ord(
2719 ; CHECK-NEXT: [[ORD:%.*]] = fcmp ord float [[X:%.*]], 0.000000e+00
2720 ; CHECK-NEXT: call void @llvm.assume(i1 [[ORD]])
2721 ; CHECK-NEXT: ret i1 false
2723 %ord = fcmp ord float %x, 0.0
2724 call void @llvm.assume(i1 %ord)
2725 %class = call i1 @llvm.is.fpclass.f32(float %x, i32 3)
2729 define i1 @test_class_is_nan_assume_uno(float %x) {
2730 ; CHECK-LABEL: @test_class_is_nan_assume_uno(
2731 ; CHECK-NEXT: [[ORD:%.*]] = fcmp uno float [[X:%.*]], 0.000000e+00
2732 ; CHECK-NEXT: call void @llvm.assume(i1 [[ORD]])
2733 ; CHECK-NEXT: ret i1 true
2735 %ord = fcmp uno float %x, 0.0
2736 call void @llvm.assume(i1 %ord)
2737 %class = call i1 @llvm.is.fpclass.f32(float %x, i32 3)
2741 define i1 @test_class_is_nan_assume_not_eq_pinf(float %x) {
2742 ; CHECK-LABEL: @test_class_is_nan_assume_not_eq_pinf(
2743 ; CHECK-NEXT: [[ORD:%.*]] = fcmp oeq float [[X:%.*]], 0x7FF0000000000000
2744 ; CHECK-NEXT: call void @llvm.assume(i1 [[ORD]])
2745 ; CHECK-NEXT: ret i1 false
2747 %ord = fcmp oeq float %x, 0x7FF0000000000000
2748 call void @llvm.assume(i1 %ord)
2749 %class = call i1 @llvm.is.fpclass.f32(float %x, i32 3)
2754 ; --------------------------------------------------------------------
2755 ; fcmp ogt/oge/olt/ole 0 ieee
2756 ; --------------------------------------------------------------------
2758 define i1 @test_class_is_pzero_psub_pnorm_pinf__ieee(float %arg) #0 {
2759 ; CHECK-LABEL: @test_class_is_pzero_psub_pnorm_pinf__ieee(
2760 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 960)
2761 ; CHECK-NEXT: ret i1 [[CLASS]]
2763 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 960)
2767 define i1 @test_class_is_pzero_psub_pnorm_pinf_snan__ieee(float %arg) #0 {
2768 ; CHECK-LABEL: @test_class_is_pzero_psub_pnorm_pinf_snan__ieee(
2769 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 961)
2770 ; CHECK-NEXT: ret i1 [[CLASS]]
2772 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 961)
2776 define i1 @test_class_is_pzero_psub_pnorm_pinf_qnan__ieee(float %arg) #0 {
2777 ; CHECK-LABEL: @test_class_is_pzero_psub_pnorm_pinf_qnan__ieee(
2778 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 962)
2779 ; CHECK-NEXT: ret i1 [[CLASS]]
2781 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 962)
2785 define i1 @test_class_is_pzero_psub_pnorm_pinf_nan__ieee(float %arg) #0 {
2786 ; CHECK-LABEL: @test_class_is_pzero_psub_pnorm_pinf_nan__ieee(
2787 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 963)
2788 ; CHECK-NEXT: ret i1 [[CLASS]]
2790 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 963)
2794 define i1 @test_class_is_psub_pnorm_pinf__ieee(float %arg) #0 {
2795 ; CHECK-LABEL: @test_class_is_psub_pnorm_pinf__ieee(
2796 ; CHECK-NEXT: [[CLASS:%.*]] = fcmp ogt float [[ARG:%.*]], 0.000000e+00
2797 ; CHECK-NEXT: ret i1 [[CLASS]]
2799 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 896)
2803 define i1 @test_class_is_psub_pnorm_pinf_snan__ieee(float %arg) #0 {
2804 ; CHECK-LABEL: @test_class_is_psub_pnorm_pinf_snan__ieee(
2805 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 897)
2806 ; CHECK-NEXT: ret i1 [[CLASS]]
2808 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 897)
2812 define i1 @test_class_is_psub_pnorm_pinf_qnan__ieee(float %arg) #0 {
2813 ; CHECK-LABEL: @test_class_is_psub_pnorm_pinf_qnan__ieee(
2814 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 898)
2815 ; CHECK-NEXT: ret i1 [[CLASS]]
2817 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 898)
2821 define i1 @test_class_is_psub_pnorm_pinf_nan__ieee(float %arg) #0 {
2822 ; CHECK-LABEL: @test_class_is_psub_pnorm_pinf_nan__ieee(
2823 ; CHECK-NEXT: [[CLASS:%.*]] = fcmp ugt float [[ARG:%.*]], 0.000000e+00
2824 ; CHECK-NEXT: ret i1 [[CLASS]]
2826 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 899)
2830 define i1 @test_class_is_pnorm_pinf__ieee(float %arg) #0 {
2831 ; CHECK-LABEL: @test_class_is_pnorm_pinf__ieee(
2832 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 768)
2833 ; CHECK-NEXT: ret i1 [[CLASS]]
2835 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 768)
2839 define i1 @test_class_is_pzero_pnorm_pinf__ieee(float %arg) #0 {
2840 ; CHECK-LABEL: @test_class_is_pzero_pnorm_pinf__ieee(
2841 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 704)
2842 ; CHECK-NEXT: ret i1 [[CLASS]]
2844 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 704)
2848 define i1 @test_class_is_pzero_pnorm_pinf_nan__ieee(float %arg) #0 {
2849 ; CHECK-LABEL: @test_class_is_pzero_pnorm_pinf_nan__ieee(
2850 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 707)
2851 ; CHECK-NEXT: ret i1 [[CLASS]]
2853 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 707)
2857 define i1 @test_class_is_nzero_pzero_psub_pnorm_pinf__ieee(float %arg) #0 {
2858 ; CHECK-LABEL: @test_class_is_nzero_pzero_psub_pnorm_pinf__ieee(
2859 ; CHECK-NEXT: [[CLASS:%.*]] = fcmp oge float [[ARG:%.*]], 0.000000e+00
2860 ; CHECK-NEXT: ret i1 [[CLASS]]
2862 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 992)
2866 define i1 @test_class_is_nzero_pzero_psub_pnorm_pinf_snan__ieee(float %arg) #0 {
2867 ; CHECK-LABEL: @test_class_is_nzero_pzero_psub_pnorm_pinf_snan__ieee(
2868 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 993)
2869 ; CHECK-NEXT: ret i1 [[CLASS]]
2871 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 993)
2875 define i1 @test_class_is_nzero_pzero_psub_pnorm_pinf_qnan__ieee(float %arg) #0 {
2876 ; CHECK-LABEL: @test_class_is_nzero_pzero_psub_pnorm_pinf_qnan__ieee(
2877 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 994)
2878 ; CHECK-NEXT: ret i1 [[CLASS]]
2880 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 994)
2884 define i1 @test_class_is_nzero_pzero_psub_pnorm_pinf_nan__ieee(float %arg) #0 {
2885 ; CHECK-LABEL: @test_class_is_nzero_pzero_psub_pnorm_pinf_nan__ieee(
2886 ; CHECK-NEXT: [[CLASS:%.*]] = fcmp uge float [[ARG:%.*]], 0.000000e+00
2887 ; CHECK-NEXT: ret i1 [[CLASS]]
2889 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 995)
2893 define i1 @test_class_is_nsub_nzero_pzero_psub_pnorm_pinf__ieee(float %arg) #0 {
2894 ; CHECK-LABEL: @test_class_is_nsub_nzero_pzero_psub_pnorm_pinf__ieee(
2895 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 1017)
2896 ; CHECK-NEXT: ret i1 [[CLASS]]
2898 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 1017)
2902 define i1 @test_class_is_nsub_nzero_pzero_psub_pnorm_pinf_snan__ieee(float %arg) #0 {
2903 ; CHECK-LABEL: @test_class_is_nsub_nzero_pzero_psub_pnorm_pinf_snan__ieee(
2904 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 1009)
2905 ; CHECK-NEXT: ret i1 [[CLASS]]
2907 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 1009)
2911 define i1 @test_class_is_nsub_nzero_pzero_psub_pnorm_pinf_qnan__ieee(float %arg) #0 {
2912 ; CHECK-LABEL: @test_class_is_nsub_nzero_pzero_psub_pnorm_pinf_qnan__ieee(
2913 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 1010)
2914 ; CHECK-NEXT: ret i1 [[CLASS]]
2916 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 1010)
2920 define i1 @test_class_is_nsub_nzero_pzero_psub_pnorm_pinf_nan__ieee(float %arg) #0 {
2921 ; CHECK-LABEL: @test_class_is_nsub_nzero_pzero_psub_pnorm_pinf_nan__ieee(
2922 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 1011)
2923 ; CHECK-NEXT: ret i1 [[CLASS]]
2925 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 1011)
2929 define i1 @test_class_is_nzero_psub_pnorm_pinf__ieee(float %arg) #0 {
2930 ; CHECK-LABEL: @test_class_is_nzero_psub_pnorm_pinf__ieee(
2931 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 928)
2932 ; CHECK-NEXT: ret i1 [[CLASS]]
2934 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 928)
2938 define i1 @test_class_is_nzero_nsub_pnorm_pinf__ieee(float %arg) #0 {
2939 ; CHECK-LABEL: @test_class_is_nzero_nsub_pnorm_pinf__ieee(
2940 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 816)
2941 ; CHECK-NEXT: ret i1 [[CLASS]]
2943 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 816)
2948 define i1 @test_class_is_not_pzero_psub_pnorm_pinf__ieee(float %arg) #0 {
2949 ; CHECK-LABEL: @test_class_is_not_pzero_psub_pnorm_pinf__ieee(
2950 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 63)
2951 ; CHECK-NEXT: ret i1 [[CLASS]]
2953 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 63)
2957 define i1 @test_class_is_not_pzero_psub_pnorm_pinf_snan__ieee(float %arg) #0 {
2958 ; CHECK-LABEL: @test_class_is_not_pzero_psub_pnorm_pinf_snan__ieee(
2959 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 62)
2960 ; CHECK-NEXT: ret i1 [[CLASS]]
2962 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 62)
2966 define i1 @test_class_is_not_pzero_psub_pnorm_pinf_qnan__ieee(float %arg) #0 {
2967 ; CHECK-LABEL: @test_class_is_not_pzero_psub_pnorm_pinf_qnan__ieee(
2968 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 61)
2969 ; CHECK-NEXT: ret i1 [[CLASS]]
2971 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 61)
2975 define i1 @test_class_is_not_pzero_psub_pnorm_pinf_nan__ieee(float %arg) #0 {
2976 ; CHECK-LABEL: @test_class_is_not_pzero_psub_pnorm_pinf_nan__ieee(
2977 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 960)
2978 ; CHECK-NEXT: ret i1 [[CLASS]]
2980 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 960)
2984 define i1 @test_class_is_not_psub_pnorm_pinf__ieee(float %arg) #0 {
2985 ; CHECK-LABEL: @test_class_is_not_psub_pnorm_pinf__ieee(
2986 ; CHECK-NEXT: [[CLASS:%.*]] = fcmp ule float [[ARG:%.*]], 0.000000e+00
2987 ; CHECK-NEXT: ret i1 [[CLASS]]
2989 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 127)
2993 define i1 @test_class_is_not_psub_pnorm_pinf_snan__ieee(float %arg) #0 {
2994 ; CHECK-LABEL: @test_class_is_not_psub_pnorm_pinf_snan__ieee(
2995 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 126)
2996 ; CHECK-NEXT: ret i1 [[CLASS]]
2998 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 126)
3002 define i1 @test_class_is_not_psub_pnorm_pinf_qnan__ieee(float %arg) #0 {
3003 ; CHECK-LABEL: @test_class_is_not_psub_pnorm_pinf_qnan__ieee(
3004 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 125)
3005 ; CHECK-NEXT: ret i1 [[CLASS]]
3007 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 125)
3011 define i1 @test_class_is_not_psub_pnorm_pinf_nan__ieee(float %arg) #0 {
3012 ; CHECK-LABEL: @test_class_is_not_psub_pnorm_pinf_nan__ieee(
3013 ; CHECK-NEXT: [[CLASS:%.*]] = fcmp ole float [[ARG:%.*]], 0.000000e+00
3014 ; CHECK-NEXT: ret i1 [[CLASS]]
3016 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 124)
3020 define i1 @test_class_is_not_pnorm_pinf__ieee(float %arg) #0 {
3021 ; CHECK-LABEL: @test_class_is_not_pnorm_pinf__ieee(
3022 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 255)
3023 ; CHECK-NEXT: ret i1 [[CLASS]]
3025 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 255)
3029 define i1 @test_class_is_not_pzero_pnorm_pinf__ieee(float %arg) #0 {
3030 ; CHECK-LABEL: @test_class_is_not_pzero_pnorm_pinf__ieee(
3031 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 319)
3032 ; CHECK-NEXT: ret i1 [[CLASS]]
3034 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 319)
3038 define i1 @test_class_is_not_pzero_pnorm_pinf_nan__ieee(float %arg) #0 {
3039 ; CHECK-LABEL: @test_class_is_not_pzero_pnorm_pinf_nan__ieee(
3040 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 316)
3041 ; CHECK-NEXT: ret i1 [[CLASS]]
3043 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 316)
3047 define i1 @test_class_is_not_nzero_pzero_psub_pnorm_pinf__ieee(float %arg) #0 {
3048 ; CHECK-LABEL: @test_class_is_not_nzero_pzero_psub_pnorm_pinf__ieee(
3049 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 22)
3050 ; CHECK-NEXT: ret i1 [[CLASS]]
3052 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 22)
3056 define i1 @test_class_is_not_nzero_pzero_psub_pnorm_pinf_snan__ieee(float %arg) #0 {
3057 ; CHECK-LABEL: @test_class_is_not_nzero_pzero_psub_pnorm_pinf_snan__ieee(
3058 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 30)
3059 ; CHECK-NEXT: ret i1 [[CLASS]]
3061 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 30)
3065 define i1 @test_class_is_not_nzero_pzero_psub_pnorm_pinf_qnan__ieee(float %arg) #0 {
3066 ; CHECK-LABEL: @test_class_is_not_nzero_pzero_psub_pnorm_pinf_qnan__ieee(
3067 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 29)
3068 ; CHECK-NEXT: ret i1 [[CLASS]]
3070 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 29)
3074 define i1 @test_class_is_not_nzero_pzero_psub_pnorm_pinf_nan__ieee(float %arg) #0 {
3075 ; CHECK-LABEL: @test_class_is_not_nzero_pzero_psub_pnorm_pinf_nan__ieee(
3076 ; CHECK-NEXT: [[CLASS:%.*]] = fcmp olt float [[ARG:%.*]], 0.000000e+00
3077 ; CHECK-NEXT: ret i1 [[CLASS]]
3079 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 28)
3083 define i1 @test_class_is_not_nsub_nzero_pzero_psub_pnorm_pinf__ieee(float %arg) #0 {
3084 ; CHECK-LABEL: @test_class_is_not_nsub_nzero_pzero_psub_pnorm_pinf__ieee(
3085 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 6)
3086 ; CHECK-NEXT: ret i1 [[CLASS]]
3088 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 6)
3092 define i1 @test_class_is_not_nsub_nzero_pzero_psub_pnorm_pinf_snan__ieee(float %arg) #0 {
3093 ; CHECK-LABEL: @test_class_is_not_nsub_nzero_pzero_psub_pnorm_pinf_snan__ieee(
3094 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 14)
3095 ; CHECK-NEXT: ret i1 [[CLASS]]
3097 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 14)
3101 define i1 @test_class_is_not_nsub_nzero_pzero_psub_pnorm_pinf_qnan__ieee(float %arg) #0 {
3102 ; CHECK-LABEL: @test_class_is_not_nsub_nzero_pzero_psub_pnorm_pinf_qnan__ieee(
3103 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 13)
3104 ; CHECK-NEXT: ret i1 [[CLASS]]
3106 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 13)
3110 define i1 @test_class_is_not_nsub_nzero_pzero_psub_pnorm_pinf_nan__ieee(float %arg) #0 {
3111 ; CHECK-LABEL: @test_class_is_not_nsub_nzero_pzero_psub_pnorm_pinf_nan__ieee(
3112 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 12)
3113 ; CHECK-NEXT: ret i1 [[CLASS]]
3115 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 12)
3119 define i1 @test_class_is_not_nzero_psub_pnorm_pinf__ieee(float %arg) #0 {
3120 ; CHECK-LABEL: @test_class_is_not_nzero_psub_pnorm_pinf__ieee(
3121 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 95)
3122 ; CHECK-NEXT: ret i1 [[CLASS]]
3124 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 95)
3128 define i1 @test_class_is_not_nzero_nsub_pnorm_pinf__ieee(float %arg) #0 {
3129 ; CHECK-LABEL: @test_class_is_not_nzero_nsub_pnorm_pinf__ieee(
3130 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 207)
3131 ; CHECK-NEXT: ret i1 [[CLASS]]
3133 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 207)
3137 ; --------------------------------------------------------------------
3138 ; fcmp ogt/oge/olt/ole 0 daz
3139 ; --------------------------------------------------------------------
3141 define i1 @test_class_is_pzero_psub_pnorm_pinf__daz(float %arg) #1 {
3142 ; CHECK-LABEL: @test_class_is_pzero_psub_pnorm_pinf__daz(
3143 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 960)
3144 ; CHECK-NEXT: ret i1 [[CLASS]]
3146 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 960)
3150 define i1 @test_class_is_pzero_psub_pnorm_pinf_snan__daz(float %arg) #1 {
3151 ; CHECK-LABEL: @test_class_is_pzero_psub_pnorm_pinf_snan__daz(
3152 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 961)
3153 ; CHECK-NEXT: ret i1 [[CLASS]]
3155 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 961)
3159 define i1 @test_class_is_pzero_psub_pnorm_pinf_qnan__daz(float %arg) #1 {
3160 ; CHECK-LABEL: @test_class_is_pzero_psub_pnorm_pinf_qnan__daz(
3161 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 962)
3162 ; CHECK-NEXT: ret i1 [[CLASS]]
3164 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 962)
3168 define i1 @test_class_is_pzero_psub_pnorm_pinf_nan__daz(float %arg) #1 {
3169 ; CHECK-LABEL: @test_class_is_pzero_psub_pnorm_pinf_nan__daz(
3170 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 963)
3171 ; CHECK-NEXT: ret i1 [[CLASS]]
3173 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 963)
3177 define i1 @test_class_is_psub_pnorm_pinf__daz(float %arg) #1 {
3178 ; CHECK-LABEL: @test_class_is_psub_pnorm_pinf__daz(
3179 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 896)
3180 ; CHECK-NEXT: ret i1 [[CLASS]]
3182 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 896)
3186 define i1 @test_class_is_psub_pnorm_pinf_snan__daz(float %arg) #1 {
3187 ; CHECK-LABEL: @test_class_is_psub_pnorm_pinf_snan__daz(
3188 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 897)
3189 ; CHECK-NEXT: ret i1 [[CLASS]]
3191 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 897)
3195 define i1 @test_class_is_psub_pnorm_pinf_qnan__daz(float %arg) #1 {
3196 ; CHECK-LABEL: @test_class_is_psub_pnorm_pinf_qnan__daz(
3197 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 898)
3198 ; CHECK-NEXT: ret i1 [[CLASS]]
3200 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 898)
3204 define i1 @test_class_is_psub_pnorm_pinf_nan__daz(float %arg) #1 {
3205 ; CHECK-LABEL: @test_class_is_psub_pnorm_pinf_nan__daz(
3206 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 899)
3207 ; CHECK-NEXT: ret i1 [[CLASS]]
3209 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 899)
3213 define i1 @test_class_is_pnorm_pinf__daz(float %arg) #1 {
3214 ; CHECK-LABEL: @test_class_is_pnorm_pinf__daz(
3215 ; CHECK-NEXT: [[CLASS:%.*]] = fcmp ogt float [[ARG:%.*]], 0.000000e+00
3216 ; CHECK-NEXT: ret i1 [[CLASS]]
3218 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 768)
3222 define i1 @test_class_is_pzero_pnorm_pinf__daz(float %arg) #1 {
3223 ; CHECK-LABEL: @test_class_is_pzero_pnorm_pinf__daz(
3224 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 704)
3225 ; CHECK-NEXT: ret i1 [[CLASS]]
3227 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 704)
3231 define i1 @test_class_is_pzero_pnorm_pinf_nan__daz(float %arg) #1 {
3232 ; CHECK-LABEL: @test_class_is_pzero_pnorm_pinf_nan__daz(
3233 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 707)
3234 ; CHECK-NEXT: ret i1 [[CLASS]]
3236 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 707)
3240 define i1 @test_class_is_nzero_pzero_psub_pnorm_pinf__daz(float %arg) #1 {
3241 ; CHECK-LABEL: @test_class_is_nzero_pzero_psub_pnorm_pinf__daz(
3242 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 992)
3243 ; CHECK-NEXT: ret i1 [[CLASS]]
3245 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 992)
3249 define i1 @test_class_is_nzero_pzero_psub_pnorm_pinf_snan__daz(float %arg) #1 {
3250 ; CHECK-LABEL: @test_class_is_nzero_pzero_psub_pnorm_pinf_snan__daz(
3251 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 993)
3252 ; CHECK-NEXT: ret i1 [[CLASS]]
3254 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 993)
3258 define i1 @test_class_is_nzero_pzero_psub_pnorm_pinf_qnan__daz(float %arg) #1 {
3259 ; CHECK-LABEL: @test_class_is_nzero_pzero_psub_pnorm_pinf_qnan__daz(
3260 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 994)
3261 ; CHECK-NEXT: ret i1 [[CLASS]]
3263 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 994)
3267 define i1 @test_class_is_nzero_pzero_psub_pnorm_pinf_nan__daz(float %arg) #1 {
3268 ; CHECK-LABEL: @test_class_is_nzero_pzero_psub_pnorm_pinf_nan__daz(
3269 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 995)
3270 ; CHECK-NEXT: ret i1 [[CLASS]]
3272 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 995)
3276 define i1 @test_class_is_nsub_nzero_pzero_psub_pnorm_pinf__daz(float %arg) #1 {
3277 ; CHECK-LABEL: @test_class_is_nsub_nzero_pzero_psub_pnorm_pinf__daz(
3278 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 1017)
3279 ; CHECK-NEXT: ret i1 [[CLASS]]
3281 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 1017)
3285 define i1 @test_class_is_nsub_nzero_pzero_psub_pnorm_pinf_snan__daz(float %arg) #1 {
3286 ; CHECK-LABEL: @test_class_is_nsub_nzero_pzero_psub_pnorm_pinf_snan__daz(
3287 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 1009)
3288 ; CHECK-NEXT: ret i1 [[CLASS]]
3290 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 1009)
3294 define i1 @test_class_is_nsub_nzero_pzero_psub_pnorm_pinf_qnan__daz(float %arg) #1 {
3295 ; CHECK-LABEL: @test_class_is_nsub_nzero_pzero_psub_pnorm_pinf_qnan__daz(
3296 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 1010)
3297 ; CHECK-NEXT: ret i1 [[CLASS]]
3299 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 1010)
3303 define i1 @test_class_is_nsub_nzero_pzero_psub_pnorm_pinf_nan__daz(float %arg) #1 {
3304 ; CHECK-LABEL: @test_class_is_nsub_nzero_pzero_psub_pnorm_pinf_nan__daz(
3305 ; CHECK-NEXT: [[CLASS:%.*]] = fcmp uge float [[ARG:%.*]], 0.000000e+00
3306 ; CHECK-NEXT: ret i1 [[CLASS]]
3308 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 1011)
3312 define i1 @test_class_is_nzero_psub_pnorm_pinf__daz(float %arg) #1 {
3313 ; CHECK-LABEL: @test_class_is_nzero_psub_pnorm_pinf__daz(
3314 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 928)
3315 ; CHECK-NEXT: ret i1 [[CLASS]]
3317 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 928)
3321 define i1 @test_class_is_nzero_nsub_pnorm_pinf__daz(float %arg) #1 {
3322 ; CHECK-LABEL: @test_class_is_nzero_nsub_pnorm_pinf__daz(
3323 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 816)
3324 ; CHECK-NEXT: ret i1 [[CLASS]]
3326 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 816)
3331 define i1 @test_class_is_not_pzero_psub_pnorm_pinf__daz(float %arg) #1 {
3332 ; CHECK-LABEL: @test_class_is_not_pzero_psub_pnorm_pinf__daz(
3333 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 63)
3334 ; CHECK-NEXT: ret i1 [[CLASS]]
3336 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 63)
3340 define i1 @test_class_is_not_pzero_psub_pnorm_pinf_snan__daz(float %arg) #1 {
3341 ; CHECK-LABEL: @test_class_is_not_pzero_psub_pnorm_pinf_snan__daz(
3342 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 62)
3343 ; CHECK-NEXT: ret i1 [[CLASS]]
3345 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 62)
3349 define i1 @test_class_is_not_pzero_psub_pnorm_pinf_qnan__daz(float %arg) #1 {
3350 ; CHECK-LABEL: @test_class_is_not_pzero_psub_pnorm_pinf_qnan__daz(
3351 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 61)
3352 ; CHECK-NEXT: ret i1 [[CLASS]]
3354 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 61)
3358 define i1 @test_class_is_not_pzero_psub_pnorm_pinf_nan__daz(float %arg) #1 {
3359 ; CHECK-LABEL: @test_class_is_not_pzero_psub_pnorm_pinf_nan__daz(
3360 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 960)
3361 ; CHECK-NEXT: ret i1 [[CLASS]]
3363 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 960)
3367 define i1 @test_class_is_not_psub_pnorm_pinf__daz(float %arg) #1 {
3368 ; CHECK-LABEL: @test_class_is_not_psub_pnorm_pinf__daz(
3369 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 127)
3370 ; CHECK-NEXT: ret i1 [[CLASS]]
3372 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 127)
3376 define i1 @test_class_is_not_psub_pnorm_pinf_snan__daz(float %arg) #1 {
3377 ; CHECK-LABEL: @test_class_is_not_psub_pnorm_pinf_snan__daz(
3378 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 126)
3379 ; CHECK-NEXT: ret i1 [[CLASS]]
3381 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 126)
3385 define i1 @test_class_is_not_psub_pnorm_pinf_qnan__daz(float %arg) #1 {
3386 ; CHECK-LABEL: @test_class_is_not_psub_pnorm_pinf_qnan__daz(
3387 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 125)
3388 ; CHECK-NEXT: ret i1 [[CLASS]]
3390 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 125)
3394 define i1 @test_class_is_not_psub_pnorm_pinf_nan__daz(float %arg) #1 {
3395 ; CHECK-LABEL: @test_class_is_not_psub_pnorm_pinf_nan__daz(
3396 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 124)
3397 ; CHECK-NEXT: ret i1 [[CLASS]]
3399 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 124)
3403 define i1 @test_class_is_not_pnorm_pinf__daz(float %arg) #1 {
3404 ; CHECK-LABEL: @test_class_is_not_pnorm_pinf__daz(
3405 ; CHECK-NEXT: [[CLASS:%.*]] = fcmp ule float [[ARG:%.*]], 0.000000e+00
3406 ; CHECK-NEXT: ret i1 [[CLASS]]
3408 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 255)
3412 define i1 @test_class_is_not_pzero_pnorm_pinf__daz(float %arg) #1 {
3413 ; CHECK-LABEL: @test_class_is_not_pzero_pnorm_pinf__daz(
3414 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 319)
3415 ; CHECK-NEXT: ret i1 [[CLASS]]
3417 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 319)
3421 define i1 @test_class_is_not_pzero_pnorm_pinf_nan__daz(float %arg) #1 {
3422 ; CHECK-LABEL: @test_class_is_not_pzero_pnorm_pinf_nan__daz(
3423 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 316)
3424 ; CHECK-NEXT: ret i1 [[CLASS]]
3426 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 316)
3430 define i1 @test_class_is_not_nzero_pzero_psub_pnorm_pinf__daz(float %arg) #1 {
3431 ; CHECK-LABEL: @test_class_is_not_nzero_pzero_psub_pnorm_pinf__daz(
3432 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 22)
3433 ; CHECK-NEXT: ret i1 [[CLASS]]
3435 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 22)
3439 define i1 @test_class_is_not_nzero_pzero_psub_pnorm_pinf_snan__daz(float %arg) #1 {
3440 ; CHECK-LABEL: @test_class_is_not_nzero_pzero_psub_pnorm_pinf_snan__daz(
3441 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 30)
3442 ; CHECK-NEXT: ret i1 [[CLASS]]
3444 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 30)
3448 define i1 @test_class_is_not_nzero_pzero_psub_pnorm_pinf_qnan__daz(float %arg) #1 {
3449 ; CHECK-LABEL: @test_class_is_not_nzero_pzero_psub_pnorm_pinf_qnan__daz(
3450 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 29)
3451 ; CHECK-NEXT: ret i1 [[CLASS]]
3453 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 29)
3457 define i1 @test_class_is_not_nzero_pzero_psub_pnorm_pinf_nan__daz(float %arg) #1 {
3458 ; CHECK-LABEL: @test_class_is_not_nzero_pzero_psub_pnorm_pinf_nan__daz(
3459 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 28)
3460 ; CHECK-NEXT: ret i1 [[CLASS]]
3462 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 28)
3466 define i1 @test_class_is_not_nsub_nzero_pzero_psub_pnorm_pinf__daz(float %arg) #1 {
3467 ; CHECK-LABEL: @test_class_is_not_nsub_nzero_pzero_psub_pnorm_pinf__daz(
3468 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 6)
3469 ; CHECK-NEXT: ret i1 [[CLASS]]
3471 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 6)
3475 define i1 @test_class_is_not_nsub_nzero_pzero_psub_pnorm_pinf_snan__daz(float %arg) #1 {
3476 ; CHECK-LABEL: @test_class_is_not_nsub_nzero_pzero_psub_pnorm_pinf_snan__daz(
3477 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 14)
3478 ; CHECK-NEXT: ret i1 [[CLASS]]
3480 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 14)
3484 define i1 @test_class_is_not_nsub_nzero_pzero_psub_pnorm_pinf_qnan__daz(float %arg) #1 {
3485 ; CHECK-LABEL: @test_class_is_not_nsub_nzero_pzero_psub_pnorm_pinf_qnan__daz(
3486 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 13)
3487 ; CHECK-NEXT: ret i1 [[CLASS]]
3489 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 13)
3493 define i1 @test_class_is_not_nsub_nzero_pzero_psub_pnorm_pinf_nan__daz(float %arg) #1 {
3494 ; CHECK-LABEL: @test_class_is_not_nsub_nzero_pzero_psub_pnorm_pinf_nan__daz(
3495 ; CHECK-NEXT: [[CLASS:%.*]] = fcmp olt float [[ARG:%.*]], 0.000000e+00
3496 ; CHECK-NEXT: ret i1 [[CLASS]]
3498 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 12)
3502 define i1 @test_class_is_not_nzero_psub_pnorm_pinf__daz(float %arg) #1 {
3503 ; CHECK-LABEL: @test_class_is_not_nzero_psub_pnorm_pinf__daz(
3504 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 95)
3505 ; CHECK-NEXT: ret i1 [[CLASS]]
3507 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 95)
3511 define i1 @test_class_is_not_nzero_nsub_pnorm_pinf__daz(float %arg) #1 {
3512 ; CHECK-LABEL: @test_class_is_not_nzero_nsub_pnorm_pinf__daz(
3513 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 207)
3514 ; CHECK-NEXT: ret i1 [[CLASS]]
3516 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 207)
3520 ; --------------------------------------------------------------------
3521 ; fcmp ogt/oge/olt/ole 0 dapz
3522 ; --------------------------------------------------------------------
3524 define i1 @test_class_is_pzero_psub_pnorm_pinf__dapz(float %arg) #2 {
3525 ; CHECK-LABEL: @test_class_is_pzero_psub_pnorm_pinf__dapz(
3526 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 960)
3527 ; CHECK-NEXT: ret i1 [[CLASS]]
3529 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 960)
3533 define i1 @test_class_is_pzero_psub_pnorm_pinf_snan__dapz(float %arg) #2 {
3534 ; CHECK-LABEL: @test_class_is_pzero_psub_pnorm_pinf_snan__dapz(
3535 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 961)
3536 ; CHECK-NEXT: ret i1 [[CLASS]]
3538 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 961)
3542 define i1 @test_class_is_pzero_psub_pnorm_pinf_qnan__dapz(float %arg) #2 {
3543 ; CHECK-LABEL: @test_class_is_pzero_psub_pnorm_pinf_qnan__dapz(
3544 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 962)
3545 ; CHECK-NEXT: ret i1 [[CLASS]]
3547 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 962)
3551 define i1 @test_class_is_pzero_psub_pnorm_pinf_nan__dapz(float %arg) #2 {
3552 ; CHECK-LABEL: @test_class_is_pzero_psub_pnorm_pinf_nan__dapz(
3553 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 963)
3554 ; CHECK-NEXT: ret i1 [[CLASS]]
3556 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 963)
3560 define i1 @test_class_is_psub_pnorm_pinf__dapz(float %arg) #2 {
3561 ; CHECK-LABEL: @test_class_is_psub_pnorm_pinf__dapz(
3562 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 896)
3563 ; CHECK-NEXT: ret i1 [[CLASS]]
3565 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 896)
3569 define i1 @test_class_is_psub_pnorm_pinf_snan__dapz(float %arg) #2 {
3570 ; CHECK-LABEL: @test_class_is_psub_pnorm_pinf_snan__dapz(
3571 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 897)
3572 ; CHECK-NEXT: ret i1 [[CLASS]]
3574 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 897)
3578 define i1 @test_class_is_psub_pnorm_pinf_qnan__dapz(float %arg) #2 {
3579 ; CHECK-LABEL: @test_class_is_psub_pnorm_pinf_qnan__dapz(
3580 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 898)
3581 ; CHECK-NEXT: ret i1 [[CLASS]]
3583 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 898)
3587 define i1 @test_class_is_psub_pnorm_pinf_nan__dapz(float %arg) #2 {
3588 ; CHECK-LABEL: @test_class_is_psub_pnorm_pinf_nan__dapz(
3589 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 899)
3590 ; CHECK-NEXT: ret i1 [[CLASS]]
3592 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 899)
3596 define i1 @test_class_is_pnorm_pinf__dapz(float %arg) #2 {
3597 ; CHECK-LABEL: @test_class_is_pnorm_pinf__dapz(
3598 ; CHECK-NEXT: [[CLASS:%.*]] = fcmp ogt float [[ARG:%.*]], 0.000000e+00
3599 ; CHECK-NEXT: ret i1 [[CLASS]]
3601 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 768)
3605 define i1 @test_class_is_pzero_pnorm_pinf__dapz(float %arg) #2 {
3606 ; CHECK-LABEL: @test_class_is_pzero_pnorm_pinf__dapz(
3607 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 704)
3608 ; CHECK-NEXT: ret i1 [[CLASS]]
3610 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 704)
3614 define i1 @test_class_is_pzero_pnorm_pinf_nan__dapz(float %arg) #2 {
3615 ; CHECK-LABEL: @test_class_is_pzero_pnorm_pinf_nan__dapz(
3616 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 707)
3617 ; CHECK-NEXT: ret i1 [[CLASS]]
3619 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 707)
3623 define i1 @test_class_is_nzero_pzero_psub_pnorm_pinf__dapz(float %arg) #2 {
3624 ; CHECK-LABEL: @test_class_is_nzero_pzero_psub_pnorm_pinf__dapz(
3625 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 992)
3626 ; CHECK-NEXT: ret i1 [[CLASS]]
3628 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 992)
3632 define i1 @test_class_is_nzero_pzero_psub_pnorm_pinf_snan__dapz(float %arg) #2 {
3633 ; CHECK-LABEL: @test_class_is_nzero_pzero_psub_pnorm_pinf_snan__dapz(
3634 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 993)
3635 ; CHECK-NEXT: ret i1 [[CLASS]]
3637 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 993)
3641 define i1 @test_class_is_nzero_pzero_psub_pnorm_pinf_qnan__dapz(float %arg) #2 {
3642 ; CHECK-LABEL: @test_class_is_nzero_pzero_psub_pnorm_pinf_qnan__dapz(
3643 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 994)
3644 ; CHECK-NEXT: ret i1 [[CLASS]]
3646 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 994)
3650 define i1 @test_class_is_nzero_pzero_psub_pnorm_pinf_nan__dapz(float %arg) #2 {
3651 ; CHECK-LABEL: @test_class_is_nzero_pzero_psub_pnorm_pinf_nan__dapz(
3652 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 995)
3653 ; CHECK-NEXT: ret i1 [[CLASS]]
3655 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 995)
3659 define i1 @test_class_is_nsub_nzero_pzero_psub_pnorm_pinf__dapz(float %arg) #2 {
3660 ; CHECK-LABEL: @test_class_is_nsub_nzero_pzero_psub_pnorm_pinf__dapz(
3661 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 1017)
3662 ; CHECK-NEXT: ret i1 [[CLASS]]
3664 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 1017)
3668 define i1 @test_class_is_nsub_nzero_pzero_psub_pnorm_pinf_snan__dapz(float %arg) #2 {
3669 ; CHECK-LABEL: @test_class_is_nsub_nzero_pzero_psub_pnorm_pinf_snan__dapz(
3670 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 1009)
3671 ; CHECK-NEXT: ret i1 [[CLASS]]
3673 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 1009)
3677 define i1 @test_class_is_nsub_nzero_pzero_psub_pnorm_pinf_qnan__dapz(float %arg) #2 {
3678 ; CHECK-LABEL: @test_class_is_nsub_nzero_pzero_psub_pnorm_pinf_qnan__dapz(
3679 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 1010)
3680 ; CHECK-NEXT: ret i1 [[CLASS]]
3682 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 1010)
3686 define i1 @test_class_is_nsub_nzero_pzero_psub_pnorm_pinf_nan__dapz(float %arg) #2 {
3687 ; CHECK-LABEL: @test_class_is_nsub_nzero_pzero_psub_pnorm_pinf_nan__dapz(
3688 ; CHECK-NEXT: [[CLASS:%.*]] = fcmp uge float [[ARG:%.*]], 0.000000e+00
3689 ; CHECK-NEXT: ret i1 [[CLASS]]
3691 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 1011)
3695 define i1 @test_class_is_nzero_psub_pnorm_pinf__dapz(float %arg) #2 {
3696 ; CHECK-LABEL: @test_class_is_nzero_psub_pnorm_pinf__dapz(
3697 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 928)
3698 ; CHECK-NEXT: ret i1 [[CLASS]]
3700 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 928)
3704 define i1 @test_class_is_nzero_nsub_pnorm_pinf__dapz(float %arg) #2 {
3705 ; CHECK-LABEL: @test_class_is_nzero_nsub_pnorm_pinf__dapz(
3706 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 816)
3707 ; CHECK-NEXT: ret i1 [[CLASS]]
3709 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 816)
3714 define i1 @test_class_is_not_pzero_psub_pnorm_pinf__dapz(float %arg) #2 {
3715 ; CHECK-LABEL: @test_class_is_not_pzero_psub_pnorm_pinf__dapz(
3716 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 63)
3717 ; CHECK-NEXT: ret i1 [[CLASS]]
3719 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 63)
3723 define i1 @test_class_is_not_pzero_psub_pnorm_pinf_snan__dapz(float %arg) #2 {
3724 ; CHECK-LABEL: @test_class_is_not_pzero_psub_pnorm_pinf_snan__dapz(
3725 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 62)
3726 ; CHECK-NEXT: ret i1 [[CLASS]]
3728 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 62)
3732 define i1 @test_class_is_not_pzero_psub_pnorm_pinf_qnan__dapz(float %arg) #2 {
3733 ; CHECK-LABEL: @test_class_is_not_pzero_psub_pnorm_pinf_qnan__dapz(
3734 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 61)
3735 ; CHECK-NEXT: ret i1 [[CLASS]]
3737 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 61)
3741 define i1 @test_class_is_not_pzero_psub_pnorm_pinf_nan__dapz(float %arg) #2 {
3742 ; CHECK-LABEL: @test_class_is_not_pzero_psub_pnorm_pinf_nan__dapz(
3743 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 960)
3744 ; CHECK-NEXT: ret i1 [[CLASS]]
3746 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 960)
3750 define i1 @test_class_is_not_psub_pnorm_pinf__dapz(float %arg) #2 {
3751 ; CHECK-LABEL: @test_class_is_not_psub_pnorm_pinf__dapz(
3752 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 127)
3753 ; CHECK-NEXT: ret i1 [[CLASS]]
3755 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 127)
3759 define i1 @test_class_is_not_psub_pnorm_pinf_snan__dapz(float %arg) #2 {
3760 ; CHECK-LABEL: @test_class_is_not_psub_pnorm_pinf_snan__dapz(
3761 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 126)
3762 ; CHECK-NEXT: ret i1 [[CLASS]]
3764 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 126)
3768 define i1 @test_class_is_not_psub_pnorm_pinf_qnan__dapz(float %arg) #2 {
3769 ; CHECK-LABEL: @test_class_is_not_psub_pnorm_pinf_qnan__dapz(
3770 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 125)
3771 ; CHECK-NEXT: ret i1 [[CLASS]]
3773 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 125)
3777 define i1 @test_class_is_not_psub_pnorm_pinf_nan__dapz(float %arg) #2 {
3778 ; CHECK-LABEL: @test_class_is_not_psub_pnorm_pinf_nan__dapz(
3779 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 124)
3780 ; CHECK-NEXT: ret i1 [[CLASS]]
3782 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 124)
3786 define i1 @test_class_is_not_pnorm_pinf__dapz(float %arg) #2 {
3787 ; CHECK-LABEL: @test_class_is_not_pnorm_pinf__dapz(
3788 ; CHECK-NEXT: [[CLASS:%.*]] = fcmp ule float [[ARG:%.*]], 0.000000e+00
3789 ; CHECK-NEXT: ret i1 [[CLASS]]
3791 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 255)
3795 define i1 @test_class_is_not_pzero_pnorm_pinf__dapz(float %arg) #2 {
3796 ; CHECK-LABEL: @test_class_is_not_pzero_pnorm_pinf__dapz(
3797 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 319)
3798 ; CHECK-NEXT: ret i1 [[CLASS]]
3800 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 319)
3804 define i1 @test_class_is_not_pzero_pnorm_pinf_nan__dapz(float %arg) #2 {
3805 ; CHECK-LABEL: @test_class_is_not_pzero_pnorm_pinf_nan__dapz(
3806 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 316)
3807 ; CHECK-NEXT: ret i1 [[CLASS]]
3809 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 316)
3813 define i1 @test_class_is_not_nzero_pzero_psub_pnorm_pinf__dapz(float %arg) #2 {
3814 ; CHECK-LABEL: @test_class_is_not_nzero_pzero_psub_pnorm_pinf__dapz(
3815 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 22)
3816 ; CHECK-NEXT: ret i1 [[CLASS]]
3818 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 22)
3822 define i1 @test_class_is_not_nzero_pzero_psub_pnorm_pinf_snan__dapz(float %arg) #2 {
3823 ; CHECK-LABEL: @test_class_is_not_nzero_pzero_psub_pnorm_pinf_snan__dapz(
3824 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 30)
3825 ; CHECK-NEXT: ret i1 [[CLASS]]
3827 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 30)
3831 define i1 @test_class_is_not_nzero_pzero_psub_pnorm_pinf_qnan__dapz(float %arg) #2 {
3832 ; CHECK-LABEL: @test_class_is_not_nzero_pzero_psub_pnorm_pinf_qnan__dapz(
3833 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 29)
3834 ; CHECK-NEXT: ret i1 [[CLASS]]
3836 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 29)
3840 define i1 @test_class_is_not_nzero_pzero_psub_pnorm_pinf_nan__dapz(float %arg) #2 {
3841 ; CHECK-LABEL: @test_class_is_not_nzero_pzero_psub_pnorm_pinf_nan__dapz(
3842 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 28)
3843 ; CHECK-NEXT: ret i1 [[CLASS]]
3845 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 28)
3849 define i1 @test_class_is_not_nsub_nzero_pzero_psub_pnorm_pinf__dapz(float %arg) #2 {
3850 ; CHECK-LABEL: @test_class_is_not_nsub_nzero_pzero_psub_pnorm_pinf__dapz(
3851 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 6)
3852 ; CHECK-NEXT: ret i1 [[CLASS]]
3854 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 6)
3858 define i1 @test_class_is_not_nsub_nzero_pzero_psub_pnorm_pinf_snan__dapz(float %arg) #2 {
3859 ; CHECK-LABEL: @test_class_is_not_nsub_nzero_pzero_psub_pnorm_pinf_snan__dapz(
3860 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 14)
3861 ; CHECK-NEXT: ret i1 [[CLASS]]
3863 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 14)
3867 define i1 @test_class_is_not_nsub_nzero_pzero_psub_pnorm_pinf_qnan__dapz(float %arg) #2 {
3868 ; CHECK-LABEL: @test_class_is_not_nsub_nzero_pzero_psub_pnorm_pinf_qnan__dapz(
3869 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 13)
3870 ; CHECK-NEXT: ret i1 [[CLASS]]
3872 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 13)
3876 define i1 @test_class_is_not_nsub_nzero_pzero_psub_pnorm_pinf_nan__dapz(float %arg) #2 {
3877 ; CHECK-LABEL: @test_class_is_not_nsub_nzero_pzero_psub_pnorm_pinf_nan__dapz(
3878 ; CHECK-NEXT: [[CLASS:%.*]] = fcmp olt float [[ARG:%.*]], 0.000000e+00
3879 ; CHECK-NEXT: ret i1 [[CLASS]]
3881 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 12)
3885 define i1 @test_class_is_not_nzero_psub_pnorm_pinf__dapz(float %arg) #2 {
3886 ; CHECK-LABEL: @test_class_is_not_nzero_psub_pnorm_pinf__dapz(
3887 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 95)
3888 ; CHECK-NEXT: ret i1 [[CLASS]]
3890 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 95)
3894 define i1 @test_class_is_not_nzero_nsub_pnorm_pinf__dapz(float %arg) #2 {
3895 ; CHECK-LABEL: @test_class_is_not_nzero_nsub_pnorm_pinf__dapz(
3896 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 207)
3897 ; CHECK-NEXT: ret i1 [[CLASS]]
3899 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 207)
3903 ; --------------------------------------------------------------------
3904 ; fcmp ogt/oge/olt/ole 0 dynamic
3905 ; --------------------------------------------------------------------
3907 define i1 @test_class_is_psub_pnorm_pinf__dynamic(float %arg) #3 {
3908 ; CHECK-LABEL: @test_class_is_psub_pnorm_pinf__dynamic(
3909 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 896)
3910 ; CHECK-NEXT: ret i1 [[CLASS]]
3912 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 896)
3916 define i1 @test_class_is_not_psub_pnorm_pinf__dynamic(float %arg) #3 {
3917 ; CHECK-LABEL: @test_class_is_not_psub_pnorm_pinf__dynamic(
3918 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f32(float [[ARG:%.*]], i32 127)
3919 ; CHECK-NEXT: ret i1 [[CLASS]]
3921 %class = call i1 @llvm.is.fpclass.f32(float %arg, i32 127)
3925 declare i1 @llvm.is.fpclass.f32(float, i32 immarg)
3926 declare i1 @llvm.is.fpclass.f64(double, i32 immarg)
3927 declare <2 x i1> @llvm.is.fpclass.v2f32(<2 x float>, i32 immarg)
3928 declare float @llvm.fabs.f32(float)
3929 declare <2 x float> @llvm.fabs.v2f32(<2 x float>)
3930 declare void @llvm.assume(i1 noundef)
3932 attributes #0 = { "denormal-fp-math"="dynamic,ieee" }
3933 attributes #1 = { "denormal-fp-math"="dynamic,preserve-sign" }
3934 attributes #2 = { "denormal-fp-math"="dynamic,positive-zero" }
3935 attributes #3 = { "denormal-fp-math"="dynamic,dynamic" }