]> granicus.if.org Git - llvm/commitdiff
[DAGCombiner] remove redundant fold for X*1.0; NFC
authorSanjay Patel <spatel@rotateright.com>
Fri, 9 Aug 2019 14:30:59 +0000 (14:30 +0000)
committerSanjay Patel <spatel@rotateright.com>
Fri, 9 Aug 2019 14:30:59 +0000 (14:30 +0000)
This is handled at node creation time (similar to X/1.0)
after:
rL357029
(no fast-math-flags needed)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368443 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/DAGCombiner.cpp

index 16b47780544a7e978a937bca93dd6866761efd4e..63431d5b7ecf6b0ed2136a2a34f06ec0a25730a9 100644 (file)
@@ -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;