[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
This commit is contained in:
Craig Topper 2018-07-26 22:40:22 +00:00
parent f26a94706b
commit fc4302504c

View File

@ -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