[llvm] e79bb87 - [InstCombine] Fixup commit 7253c6f (#123315)

via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 17 02:14:07 PST 2025


Author: Sushant Gokhale
Date: 2025-01-17T02:14:04-08:00
New Revision: e79bb8731ae9089f0635e5634883267a091e318d

URL: https://github.com/llvm/llvm-project/commit/e79bb8731ae9089f0635e5634883267a091e318d
DIFF: https://github.com/llvm/llvm-project/commit/e79bb8731ae9089f0635e5634883267a091e318d.diff

LOG: [InstCombine] Fixup commit 7253c6f (#123315)

This should fix the assert failure we were getting for the darwin OS.

Added: 
    

Modified: 
    llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp b/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
index b6acde9bdd1104..df5f9833a2ff92 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
@@ -2067,8 +2067,7 @@ convertFSqrtDivIntoFMul(CallInst *CI, Instruction *X,
   FMul->copyMetadata(*X);
   FMul->copyFastMathFlags(FastMathFlags::intersectRewrite(R1FMF, R2FMF) |
                           FastMathFlags::unionValue(R1FMF, R2FMF));
-  IC->replaceInstUsesWith(*X, FMul);
-  return IC->eraseInstFromFunction(*X);
+  return IC->replaceInstUsesWith(*X, FMul);
 }
 
 Instruction *InstCombinerImpl::visitFDiv(BinaryOperator &I) {


        


More information about the llvm-commits mailing list