Skip to content

Commit f0b3424

Browse files
committed
Simplify splat creation.
1 parent 89ce3d8 commit f0b3424

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2651,9 +2651,7 @@ static std::optional<Instruction *> instCombineSVEUxt(InstCombiner &IC,
26512651
if (isa<UndefValue>(Passthru) || isAllActivePredicate(Pg)) {
26522652
auto *Ty = cast<VectorType>(II.getType());
26532653
auto MaskValue = APInt::getLowBitsSet(Ty->getScalarSizeInBits(), NumBits);
2654-
auto *Mask = ConstantVector::getSplat(
2655-
Ty->getElementCount(),
2656-
ConstantInt::get(Ty->getElementType(), MaskValue));
2654+
auto *Mask = ConstantInt::get(Ty, MaskValue);
26572655
auto *And = IC.Builder.CreateIntrinsic(Intrinsic::aarch64_sve_and_u, {Ty},
26582656
{Pg, Op, Mask});
26592657
return IC.replaceInstUsesWith(II, And);

0 commit comments

Comments
 (0)