[clang] [CIR] Add nofpclass for fast-math flags (PR #191455)
Andy Kaylor via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 10 15:11:10 PDT 2026
================
@@ -0,0 +1,22 @@
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -menable-no-infs -menable-no-nans -fclangir -emit-llvm %s -o %t-cir.ll
+// RUN: FileCheck --check-prefix=LLVM --input-file=%t-cir.ll %s
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -menable-no-infs -menable-no-nans -emit-llvm %s -o %t.ll
+// RUN: FileCheck --check-prefix=OGCG --input-file=%t.ll %s
+
+float identity(float x) { return x; }
+// LLVM: define {{.*}} nofpclass(nan inf) float @identity(float noundef nofpclass(nan inf) %{{.*}})
+// OGCG: define {{.*}} nofpclass(nan inf) float @identity(float noundef nofpclass(nan inf) %{{.*}})
----------------
andykaylor wrote:
Since these checks are identical, you can combine them into a single check and pass the same check-prefix to both RUN lines. We're trying to move in that direction for new tests.
https://github.com/llvm/llvm-project/pull/191455
More information about the cfe-commits
mailing list