File tree Expand file tree Collapse file tree 1 file changed +1
-11
lines changed
llvm/lib/Transforms/InstCombine Expand file tree Collapse file tree 1 file changed +1
-11
lines changed Original file line number Diff line number Diff line change @@ -3779,17 +3779,7 @@ Instruction *InstCombinerImpl::visitCallInst(CallInst &CI) {
37793779 unsigned VectorSize = ReducedVectorElementCount.getFixedValue ();
37803780 Type *SplatType = Splat->getType ();
37813781 unsigned SplatTypeWidth = SplatType->getIntegerBitWidth ();
3782- Value *Res;
3783- // Power of two is a special case. We can just use a left shif here.
3784- if (isPowerOf2_32 (VectorSize)) {
3785- unsigned Pow2 = Log2_32 (VectorSize);
3786- Res = Builder.CreateShl (
3787- Splat, Constant::getIntegerValue (SplatType,
3788- APInt (SplatTypeWidth, Pow2)));
3789- return replaceInstUsesWith (CI, Res);
3790- }
3791- // Otherwise just multiply.
3792- Res = Builder.CreateMul (
3782+ Value *Res = Builder.CreateMul (
37933783 Splat, Constant::getIntegerValue (
37943784 SplatType, APInt (SplatTypeWidth, VectorSize)));
37953785 return replaceInstUsesWith (CI, Res);
You can’t perform that action at this time.
0 commit comments