[llvm-branch-commits] [llvm] Prevent optimizations of math intrinsics in strictfp functions (PR #201433)

Serge Pavlov via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Jun 22 09:49:18 PDT 2026


================
@@ -6093,8 +6093,11 @@ static Value *simplifyFMAFMul(Value *Op0, Value *Op1, FastMathFlags FMF,
   // 3. Ignore -0.0 because sqrt(-0.0) == -0.0, but -0.0 * -0.0 == 0.0.
   Value *X;
   if (Op0 == Op1 && match(Op0, m_Sqrt(m_Value(X))) && FMF.allowReassoc() &&
-      FMF.noNaNs() && FMF.noSignedZeros())
+      FMF.noNaNs() && FMF.noSignedZeros()) {
+    if (Q.isStrictFP())
----------------
spavloff wrote:

PR with possible implementation of such class: [!205138](https://github.com/llvm/llvm-project/pull/205138).

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


More information about the llvm-branch-commits mailing list