[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


================
@@ -629,6 +629,15 @@ static bool checkDenormalAttributeConsistency(const Module &M,
   });
 }
 
+// Returns true if all functions have different denormal modes.
+static bool checkDenormalAttributeInconsistency(const Module &M) {
+  if (M.functions().empty())
+    return false;
+  DenormalMode Value = M.functions().begin()->getDenormalModeRaw();
+  return any_of(
+      M, [&](const Function &F) { return F.getDenormalModeRaw() != Value; });
----------------
davemgreen wrote:

Exclude any declarations, as they will always not have attributes.

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


More information about the llvm-commits mailing list