[llvm] [InstCombine] Drop wrong ninf for `(-X / Y) + Z` (PR #228684)

Harrison Hao via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 3 08:04:35 PDT 2026


================
@@ -2167,7 +2167,9 @@ Instruction *InstCombinerImpl::visitFAdd(BinaryOperator &I) {
                          m_Value(Z))) ||
       match(&I, m_c_FAdd(m_OneUse(m_FDiv(m_Value(X), m_FNeg(m_Value(Y)))),
                          m_Value(Z)))) {
-    Value *XY = Builder.CreateFDivFMF(X, Y, &I);
+    Value *Div = I.getOperand(0);
----------------
harrisonGPU wrote:

Could you add an negative test?

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


More information about the llvm-commits mailing list