1 ! RUN: bbc -emit-fir %s -o - | FileCheck %s
2 ! RUN: flang-new -fc1 -emit-fir %s -o - | FileCheck %s
4 ! CHECK-LABEL: ieee_is_normal_f16
5 subroutine ieee_is_normal_f16(r
)
9 ! CHECK: %[[test:.*]] = arith.constant 360 : i32
10 ! CHECK: %[[l:.*]] = "llvm.intr.is.fpclass"(%{{.*}}, %[[test]]) : (f16, i32) -> i1
11 ! CHECK: fir.convert %[[l]] : (i1) -> !fir.logical<4>
12 end subroutine ieee_is_normal_f16
14 ! CHECK-LABEL: ieee_is_normal_bf16
15 subroutine ieee_is_normal_bf16(r
)
19 ! CHECK: %[[test:.*]] = arith.constant 360 : i32
20 ! CHECK: %[[l:.*]] = "llvm.intr.is.fpclass"(%{{.*}}, %[[test]]) : (bf16, i32) -> i1
21 ! CHECK: fir.convert %[[l]] : (i1) -> !fir.logical<4>
22 end subroutine ieee_is_normal_bf16
26 ! CHECK-LABEL: ieee_is_normal_f32
27 subroutine ieee_is_normal_f32(r
)
31 ! CHECK: %[[test:.*]] = arith.constant 360 : i32
32 ! CHECK: %[[l:.*]] = "llvm.intr.is.fpclass"(%{{.*}}, %[[test]]) : (f32, i32) -> i1
33 ! CHECK: fir.convert %[[l]] : (i1) -> !fir.logical<4>
34 end subroutine ieee_is_normal_f32
36 ! CHECK-LABEL: ieee_is_normal_f64
37 subroutine ieee_is_normal_f64(r
)
41 ! CHECK: %[[test:.*]] = arith.constant 360 : i32
42 ! CHECK: %[[l:.*]] = "llvm.intr.is.fpclass"(%{{.*}}, %[[test]]) : (f64, i32) -> i1
43 ! CHECK: fir.convert %[[l]] : (i1) -> !fir.logical<4>
44 end subroutine ieee_is_normal_f64
46 ! CHECK-LABEL: ieee_is_normal_f80
47 subroutine ieee_is_normal_f80(r
)
51 ! CHECK: %[[test:.*]] = arith.constant 360 : i32
52 ! CHECK: %[[l:.*]] = "llvm.intr.is.fpclass"(%{{.*}}, %[[test]]) : (f80, i32) -> i1
53 ! CHECK: fir.convert %[[l]] : (i1) -> !fir.logical<4>
54 end subroutine ieee_is_normal_f80
56 ! CHECK-LABEL: ieee_is_normal_f128
57 subroutine ieee_is_normal_f128(r
)
61 ! CHECK: %[[test:.*]] = arith.constant 360 : i32
62 ! CHECK: %[[l:.*]] = "llvm.intr.is.fpclass"(%{{.*}}, %[[test]]) : (f128, i32) -> i1
63 ! CHECK: fir.convert %[[l]] : (i1) -> !fir.logical<4>
64 end subroutine ieee_is_normal_f128