Skip to content

Commit ff6491b

Browse files
committed
Use BinaryOperator::CreateMul instead of using Builder and replaceInstUsesWith
1 parent 8e2c2e5 commit ff6491b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3778,9 +3778,8 @@ Instruction *InstCombinerImpl::visitCallInst(CallInst &CI) {
37783778
if (ReducedVectorElementCount.isFixed()) {
37793779
unsigned VectorSize = ReducedVectorElementCount.getFixedValue();
37803780
Type *SplatType = Splat->getType();
3781-
Value *Res =
3782-
Builder.CreateMul(Splat, ConstantInt::get(SplatType, VectorSize));
3783-
return replaceInstUsesWith(CI, Res);
3781+
return BinaryOperator::CreateMul(
3782+
Splat, ConstantInt::get(SplatType, VectorSize));
37843783
}
37853784
}
37863785
}

0 commit comments

Comments
 (0)