[clang] Honor pragmas with -ffp-contract=fast, depecate fast-honor-pragmas (PR #105746)
Andy Kaylor via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 22 17:31:47 PDT 2024
andykaylor wrote:
> Is the backend actually ready for this? Looking quickly at the backend, it looks like target-independent code is fine, but some of the target-specific code doesn't respect the "contract" flag on instructions.
I didn't realize I wasn't building all targets in my local sandbox, so the fp-contract.cu test wasn't being run. After fixing my build configuration, that test failed on one of the NV-OPT-FAST checks. So, it does look like at least the NVPTX backend isn't ready for this.
There was a clang-to-backend-codegen test for AArch64 test that does pass after the change, and I know the x86 target works. I'll look at the other backends that are checking AllowFpOpFusion and see if I can bring them up-to-date with the "contract" flag. Several are also checking the "UnsafeFPMath" function attribute and enabling fusion if that's set, but I think clang sets that to "false" if contraction is disabled anywhere within a function, so that should be OK.
https://github.com/llvm/llvm-project/pull/105746
More information about the cfe-commits
mailing list