[flang-commits] [flang] 35bb2bb - [flang] Test update
V Donaldson via flang-commits
flang-commits at lists.llvm.org
Thu Jun 29 17:45:12 PDT 2023
Author: V Donaldson
Date: 2023-06-29T17:44:56-07:00
New Revision: 35bb2bb21c62065ff327023bd7d541d273f53c86
URL: https://github.com/llvm/llvm-project/commit/35bb2bb21c62065ff327023bd7d541d273f53c86
DIFF: https://github.com/llvm/llvm-project/commit/35bb2bb21c62065ff327023bd7d541d273f53c86.diff
LOG: [flang] Test update
Added:
Modified:
flang/test/Lower/Intrinsics/ieee_class_queries.f90
flang/test/Lower/Intrinsics/ieee_copy_sign.f90
Removed:
################################################################################
diff --git a/flang/test/Lower/Intrinsics/ieee_class_queries.f90 b/flang/test/Lower/Intrinsics/ieee_class_queries.f90
index ac5904c18174a..bb7787ea903e2 100644
--- a/flang/test/Lower/Intrinsics/ieee_class_queries.f90
+++ b/flang/test/Lower/Intrinsics/ieee_class_queries.f90
@@ -38,13 +38,6 @@
print*, ieee_is_finite(x8), ieee_is_negative(x8), ieee_is_normal(x8), &
ieee_is_nan(x8)
- ! CHECK: "llvm.intr.is.fpclass"(%{{.*}}) <{bit = 504 : i32}> : (f80) -> i1
- ! CHECK: "llvm.intr.is.fpclass"(%{{.*}}) <{bit = 60 : i32}> : (f80) -> i1
- ! CHECK: "llvm.intr.is.fpclass"(%{{.*}}) <{bit = 360 : i32}> : (f80) -> i1
- ! CHECK: "llvm.intr.is.fpclass"(%{{.*}}) <{bit = 3 : i32}> : (f80) -> i1
- print*, ieee_is_finite(x10), ieee_is_negative(x10), ieee_is_normal(x10), &
- ieee_is_nan(x10)
-
! CHECK: "llvm.intr.is.fpclass"(%{{.*}}) <{bit = 504 : i32}> : (f128) -> i1
! CHECK: "llvm.intr.is.fpclass"(%{{.*}}) <{bit = 60 : i32}> : (f128) -> i1
! CHECK: "llvm.intr.is.fpclass"(%{{.*}}) <{bit = 360 : i32}> : (f128) -> i1
diff --git a/flang/test/Lower/Intrinsics/ieee_copy_sign.f90 b/flang/test/Lower/Intrinsics/ieee_copy_sign.f90
index 61005f6a85858..61e7430afe56c 100644
--- a/flang/test/Lower/Intrinsics/ieee_copy_sign.f90
+++ b/flang/test/Lower/Intrinsics/ieee_copy_sign.f90
@@ -27,25 +27,24 @@ program cs
! CHECK: %[[V_24:[0-9]+]] = fir.field_index which, !fir.type<_QMieee_arithmeticTieee_class_type{which:i8}>
! CHECK: %[[V_25:[0-9]+]] = fir.coordinate_of %[[V_1]], %[[V_24]] : (!fir.ref<!fir.type<_QMieee_arithmeticTieee_class_type{which:i8}>>, !fir.field) -> !fir.ref<i8>
! CHECK: %[[V_26:[0-9]+]] = fir.load %[[V_25]] : !fir.ref<i8>
- ! CHECK: %[[V_27:[0-9]+]] = fir.address_of(@_FortranAIeeeValueTable_16) : !fir.ref<!fir.array<12xi64>>
+ ! CHECK: %[[V_27:[0-9]+]] = fir.address_of(@_FortranAIeeeValueTable_8) : !fir.ref<!fir.array<12xi64>>
! CHECK: %[[V_28:[0-9]+]] = fir.coordinate_of %[[V_27]], %[[V_26]] : (!fir.ref<!fir.array<12xi64>>, i8) -> !fir.ref<i64>
! CHECK: %[[V_29:[0-9]+]] = fir.load %[[V_28]] : !fir.ref<i64>
- ! CHECK: %[[V_30:[0-9]+]] = fir.convert %[[V_29]] : (i64) -> i128
- ! CHECK: %[[V_31:[0-9]+]] = arith.shli %[[V_30]], %c64{{.*}} : i128
- ! CHECK: %[[V_32:[0-9]+]] = arith.bitcast %[[V_31]] : i128 to f128
- ! CHECK: %[[V_33:[0-9]+]] = arith.negf %[[V_32]] {{.*}} : f128
- ! CHECK: %[[V_34:[0-9]+]] = arith.bitcast %[[V_16]] : f16 to i16
- ! CHECK: %[[V_35:[0-9]+]] = arith.bitcast %[[V_33]] : f128 to i128
- ! CHECK: %[[V_36:[0-9]+]] = arith.shrui %[[V_35]], %c127{{.*}} : i128
- ! CHECK: %[[V_37:[0-9]+]] = arith.shli %[[V_34]], %c1{{.*}} : i16
- ! CHECK: %[[V_38:[0-9]+]] = arith.shrui %[[V_37]], %c1{{.*}} : i16
- ! CHECK: %[[V_39:[0-9]+]] = arith.shli %c1{{.*}}, %c15{{.*}} : i16
- ! CHECK: %[[V_40:[0-9]+]] = arith.cmpi eq, %[[V_36]], %c0{{.*}} : i128
- ! CHECK: %[[V_41:[0-9]+]] = arith.select %[[V_40]], %c0{{.*}}, %[[V_39]] : i16
- ! CHECK: %[[V_42:[0-9]+]] = arith.ori %[[V_38]], %[[V_41]] : i16
- ! CHECK: %[[V_43:[0-9]+]] = arith.bitcast %[[V_42]] : i16 to f16
- ! CHECK: fir.store %[[V_43]] to %[[V_0]] : !fir.ref<f16>
- print*, ieee_copy_sign(x2, -ieee_value(0.0_16, ieee_quiet_nan))
+ ! CHECK: %[[V_30:[0-9]+]] = arith.bitcast %[[V_29]] : i64 to f64
+ ! CHECK: %[[V_31:[0-9]+]] = arith.negf %[[V_30]] fastmath<contract> : f64
+ ! CHECK: %[[V_32:[0-9]+]] = arith.bitcast %[[V_16]] : f16 to i16
+ ! CHECK: %[[V_33:[0-9]+]] = arith.bitcast %[[V_31]] : f64 to i64
+ ! CHECK: %[[V_34:[0-9]+]] = arith.shrui %[[V_33]], %c63{{.*}} : i64
+ ! CHECK: %[[V_35:[0-9]+]] = arith.shli %[[V_32]], %c1{{.*}} : i16
+ ! CHECK: %[[V_36:[0-9]+]] = arith.shrui %[[V_35]], %c1{{.*}} : i16
+ ! CHECK: %[[V_37:[0-9]+]] = arith.shli %c1{{.*}}, %c15{{.*}} : i16
+ ! CHECK: %[[V_38:[0-9]+]] = arith.cmpi eq, %[[V_34]], %c0{{.*}} : i64
+ ! CHECK: %[[V_39:[0-9]+]] = arith.select %[[V_38]], %c0{{.*}}, %[[V_37]] : i16
+ ! CHECK: %[[V_40:[0-9]+]] = arith.ori %[[V_36]], %[[V_39]] : i16
+ ! CHECK: %[[V_41:[0-9]+]] = arith.bitcast %[[V_40]] : i16 to f16
+ ! CHECK: fir.store %[[V_41]] to %[[V_0]] : !fir.ref<f16>
+ print*, ieee_copy_sign(x2, -ieee_value(0.0_8, ieee_quiet_nan))
end
-! CHECK: fir.global linkonce @_FortranAIeeeValueTable_16(dense<[0, 9223160930622242816, 9223231299366420480, -281474976710656, -4611967493404098560, -9223336852482686976, -9223372036854775808, 0, 35184372088832, 4611404543450677248, 9223090561878065152, 0]> : tensor<12xi64>) constant : !fir.array<12xi64>
+! CHECK: fir.global linkonce @_FortranAIeeeValueTable_8(dense<[0, 9219994337134247936, 9221120237041090560, -4503599627370496, -4616189618054758400, -9221120237041090560, -9223372036854775808, 0, 2251799813685248, 4607182418800017408, 9218868437227405312, 0]> : tensor<12xi64>) constant : !fir.array<12xi64>
+
More information about the flang-commits
mailing list