[llvm] ed0dbfe - InstCombine: Remove dead fsub-as-fneg handling

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 2 07:43:01 PDT 2023


Author: Matt Arsenault
Date: 2023-08-02T10:42:56-04:00
New Revision: ed0dbfef7a99779ce0a6cd3c4678fd40e93f737b

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

LOG: InstCombine: Remove dead fsub-as-fneg handling

The above combine matching m_FNeg to produce a new fneg always would
hide this.

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp b/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
index 91ca44e0f11e87..b43ea523795231 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
@@ -2638,9 +2638,6 @@ Instruction *InstCombinerImpl::visitFSub(BinaryOperator &I) {
   if (Instruction *X = foldFNegIntoConstant(I, DL))
     return X;
 
-  if (Instruction *R = hoistFNegAboveFMulFDiv(I, Builder))
-    return R;
-
   Value *X, *Y;
   Constant *C;
 


        


More information about the llvm-commits mailing list