================ @@ -0,0 +1,28 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 4 +// RUN: %clang_cc1 -triple x86_64-linux-gnu -O3 -emit-llvm -o - %s \ +// RUN: | FileCheck -check-prefix=CHECK %s + +// Reproducer for issue #87758 +// The testcase below verifies that the "fast" flag are set on the calls. + +float sqrtf(float x); +float powf(float x, float y); +float fmaf(float x, float y, float z); + +#pragma float_control(push) +#pragma float_control(precise, off) +// CHECK-LABEL: define dso_local float @fp_precise_libm_calls( +// CHECK-SAME: float noundef [[A:%.*]], float noundef [[B:%.*]], float noundef [[C:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] { +// CHECK-NEXT: entry: +// CHECK-NEXT: [[TMP0:%.*]] = tail call fast float @llvm.sqrt.f32(float [[A]]) +// CHECK-NEXT: [[TMP1:%.*]] = tail call fast float @llvm.pow.f32(float [[TMP0]], float [[B]]) +// CHECK-NEXT: [[TMP2:%.*]] = tail call fast float @llvm.fma.f32(float [[TMP1]], float [[B]], float [[C]]) +// CHECK-NEXT: ret float [[TMP2]] +// +float fp_precise_libm_calls(float a, float b, float c) { + a = sqrtf(a); + a = powf(a,b); + a = fmaf(a,b,c); + return a; +} +#pragma float_control(pop) ---------------- zahiraam wrote:
That's what I thought. Maybe you can keep this patch to fix the specific bug you are mentioning and someone or you may work on these other additional bugs. https://github.com/llvm/llvm-project/pull/90377 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits