================
@@ -107,12 +107,34 @@ _Bool check_isfpclass_zero_f16(_Float16 x) {
}
// CIR: cir.func {{.*}}@check_isfpclass_zero_f16
-// CIR: cir.is_fp_class %{{.*}}, fcZero : (!cir.f16)
+// CIR: cir.is_fp_class %{{.*}}, "fcZero" : (!cir.f16)
// LLVM: @check_isfpclass_zero_f16
// LLVM: call i1 @llvm.is.fpclass.f16(half {{.*}}, i32 96)
// OGCG: @check_isfpclass_zero_f16
// OGCG: call i1 @llvm.is.fpclass.f16(half {{.*}}, i32 96)
+_Bool check_isfpclass_snan_neginf(double x) {
+ return __builtin_isfpclass(x, 5 /*fcSNan|fcNegInf*/);
+}
+
+// CIR: cir.func {{.*}}@check_isfpclass_snan_neginf
+// CIR: cir.is_fp_class %{{.*}}, "fcSNan|fcNegInf" : (!cir.double)
+// LLVM: @check_isfpclass_snan_neginf
+// LLVM: call i1 @llvm.is.fpclass.f64(double {{.*}}, i32 5)
+// OGCG: @check_isfpclass_snan_neginf
+// OGCG: call i1 @llvm.is.fpclass.f64(double {{.*}}, i32 5)
+
+_Bool check_isfpclass_multi(float x) {
+ return __builtin_isfpclass(x, 1022 /*all but fcSNan*/);
----------------
erichkeane wrote:
The comment here is wrong, 1022 is missing QNan as well (which is why it isnt
power-of-2-minus-1).
https://github.com/llvm/llvm-project/pull/205941
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits