[llvm] [ARM] Remove `UnsafeFPMath` uses (PR #151275)

David Green via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 25 11:28:18 PDT 2025


================
@@ -695,7 +704,9 @@ void ARMAsmPrinter::emitAttributes() {
                                              DenormalMode::getPositiveZero()))
     ATS.emitAttribute(ARMBuildAttrs::ABI_FP_denormal,
                       ARMBuildAttrs::PositiveZero);
-  else if (!TM.Options.UnsafeFPMath)
+  else if (checkDenormalAttributeInconsistency(*MMI->getModule()) ||
----------------
davemgreen wrote:

I don't think this is working very well, either before this patch or after it. Nothing we do will be perfect and the existing functions are already broken (I think they did better before 0ab5b5b8581d9f2951575f7245824e6e4fc57dec).

I would have expected -ffast-math to set denormal attributes, if it makes use of crtfastmath.o. But that is not what happens at the moment.

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


More information about the llvm-commits mailing list