[llvm] r368443 - [DAGCombiner] remove redundant fold for X*1.0; NFC

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 9 07:31:00 PDT 2019


Author: spatel
Date: Fri Aug  9 07:30:59 2019
New Revision: 368443

URL: http://llvm.org/viewvc/llvm-project?rev=368443&view=rev
Log:
[DAGCombiner] remove redundant fold for X*1.0; NFC

This is handled at node creation time (similar to X/1.0)
after:
rL357029
(no fast-math-flags needed)

Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=368443&r1=368442&r2=368443&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Fri Aug  9 07:30:59 2019
@@ -12043,10 +12043,6 @@ SDValue DAGCombiner::visitFMUL(SDNode *N
      !isConstantFPBuildVectorOrConstantFP(N1))
     return DAG.getNode(ISD::FMUL, DL, VT, N1, N0, Flags);
 
-  // fold (fmul A, 1.0) -> A
-  if (N1CFP && N1CFP->isExactlyValue(1.0))
-    return N0;
-
   if (SDValue NewSel = foldBinOpIntoSelect(N))
     return NewSel;
 




More information about the llvm-commits mailing list