From 90b5ed996bfa97beb9cb96e013913cc956540b95 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 30 Jan 2020 23:06:28 +0100 Subject: [PATCH] [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. --- llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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(BO->getOperand(1)); APInt ShortMask = CI->getValue().trunc(MulWidth); Value *ShortAnd = Builder.CreateAnd(Mul, ShortMask); - Instruction *Zext = - cast(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");