From fc4302504cc52698dc4098c175662836e10cf332 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Thu, 26 Jul 2018 22:40:22 +0000 Subject: [PATCH] [DAGCombiner] Remove some calls to AddToWorklist that should be unnecessary. The DAGCombiner has a system for ensuring all nodes are visited. It doesn't require an AddToWorkList for every node that is created by a combine. llvm-svn: 338079 --- lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index c1a15b39130..3fdea2d0d8d 100644 --- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -2856,11 +2856,8 @@ SDValue DAGCombiner::visitMUL(SDNode *N) { (!VT.isVector() || Level <= AfterLegalizeVectorOps)) { SDLoc DL(N); SDValue LogBase2 = BuildLogBase2(N1, DL); - AddToWorklist(LogBase2.getNode()); - EVT ShiftVT = getShiftAmountTy(N0.getValueType()); SDValue Trunc = DAG.getZExtOrTrunc(LogBase2, DL, ShiftVT); - AddToWorklist(Trunc.getNode()); return DAG.getNode(ISD::SHL, DL, VT, N0, Trunc); } // fold (mul x, -(1 << c)) -> -(x << c) or (-x) << c