[llvm] [ARM] Remove `NoInfsFPMath` and `NoNaNsFPMath` uses (PR #179935)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 5 05:23:24 PST 2026
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-arm
Author: None (paperchalice)
<details>
<summary>Changes</summary>
Remove these global flags uses, they are used in `TargetMachine::resetTargetOptions`, which makes `TargetMachine` thread unsafe.
---
Full diff: https://github.com/llvm/llvm-project/pull/179935.diff
1 Files Affected:
- (modified) llvm/lib/Target/ARM/ARMAsmPrinter.cpp (+2-6)
``````````diff
diff --git a/llvm/lib/Target/ARM/ARMAsmPrinter.cpp b/llvm/lib/Target/ARM/ARMAsmPrinter.cpp
index c77023aed437f..abc5c6dac900c 100644
--- a/llvm/lib/Target/ARM/ARMAsmPrinter.cpp
+++ b/llvm/lib/Target/ARM/ARMAsmPrinter.cpp
@@ -795,16 +795,12 @@ void ARMAsmPrinter::emitAttributes() {
ATS.emitAttribute(ARMBuildAttrs::ABI_FP_rounding, ARMBuildAttrs::Allowed);
}
- // TM.Options.NoInfsFPMath && TM.Options.NoNaNsFPMath is the
- // equivalent of GCC's -ffinite-math-only flag.
+ // Generate ABI tags from module flags.
if (auto *NumModel = mdconst::extract_or_null<ConstantInt>(
MMI->getModule()->getModuleFlag("arm-eabi-fp-number-model"))) {
if (unsigned TagVal = NumModel->getZExtValue())
ATS.emitAttribute(ARMBuildAttrs::ABI_FP_number_model, TagVal);
- } else if (TM.Options.NoInfsFPMath && TM.Options.NoNaNsFPMath)
- ATS.emitAttribute(ARMBuildAttrs::ABI_FP_number_model,
- ARMBuildAttrs::Allowed);
- else
+ } else
ATS.emitAttribute(ARMBuildAttrs::ABI_FP_number_model,
ARMBuildAttrs::AllowIEEE754);
``````````
</details>
https://github.com/llvm/llvm-project/pull/179935
More information about the llvm-commits
mailing list