forked from OSchip/llvm-project
[InstCombine] Remove unnecessary worklist add; NFCI
The IRBuilder will automatically add instructions to the worklist. Adding it manually is unnecessary, but may mess up worklist order.
This commit is contained in:
parent
cad91074a6
commit
90b5ed996b
|
@ -4680,9 +4680,7 @@ static Instruction *processUMulZExtIdiom(ICmpInst &I, Value *MulVal,
|
|||
ConstantInt *CI = cast<ConstantInt>(BO->getOperand(1));
|
||||
APInt ShortMask = CI->getValue().trunc(MulWidth);
|
||||
Value *ShortAnd = Builder.CreateAnd(Mul, ShortMask);
|
||||
Instruction *Zext =
|
||||
cast<Instruction>(Builder.CreateZExt(ShortAnd, BO->getType()));
|
||||
IC.Worklist.Add(Zext);
|
||||
Value *Zext = Builder.CreateZExt(ShortAnd, BO->getType());
|
||||
IC.replaceInstUsesWith(*BO, Zext);
|
||||
} else {
|
||||
llvm_unreachable("Unexpected Binary operation");
|
||||
|
|
Loading…
Reference in New Issue