[llvm] 90b5ed9 - [InstCombine] Remove unnecessary worklist add; NFCI
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 30 14:14:35 PST 2020
Author: Nikita Popov
Date: 2020-01-30T23:06:28+01:00
New Revision: 90b5ed996bfa97beb9cb96e013913cc956540b95
URL: https://github.com/llvm/llvm-project/commit/90b5ed996bfa97beb9cb96e013913cc956540b95
DIFF: https://github.com/llvm/llvm-project/commit/90b5ed996bfa97beb9cb96e013913cc956540b95.diff
LOG: [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.
Added:
Modified:
llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
index de37b723ac1f..373be44f02b1 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
@@ -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");
More information about the llvm-commits
mailing list