[clang] [clang] Enable constexpr handling for __builtin_elementwise_fma (PR #152919)

Chaitanya Koparkar via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 11 10:37:01 PDT 2025


================
@@ -11,3 +11,55 @@ float V3 = func_01(1.0F, 2.0F);
 // CHECK: @V1 = {{.*}}global float 1.000000e+00, align 4
 // CHECK: @V2 = {{.*}}global float 1.000000e+00, align 4
 // CHECK: @V3 = {{.*}}global float 3.000000e+00, align 4
+
+void test_builtin_elementwise_fma_round_upward() {
+  #pragma STDC FENV_ACCESS ON
+  #pragma STDC FENV_ROUND FE_UPWARD
+
+  // CHECK: store float 0x4018000100000000, ptr %f1
+  // CHECK: store float 0x4018000100000000, ptr %f2
----------------
ckoparkar wrote:

I'm not sure if checking for a specific constant is a good idea. But I was using these to sanity check the result, so I put them here.

https://github.com/llvm/llvm-project/pull/152919


More information about the cfe-commits mailing list