Skip to content

Commit 92a3083

Browse files
committed
Replace SVEBitsPerBlock with plain 128
1 parent b020391 commit 92a3083

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5751,12 +5751,13 @@ AArch64TTIImpl::getShuffleCost(TTI::ShuffleKind Kind, VectorType *DstTy,
57515751
Kind = improveShuffleKindFromMask(Kind, Mask, SrcTy, Index, SubTp);
57525752
bool IsExtractSubvector = Kind == TTI::SK_ExtractSubvector;
57535753
// A subvector extract can be implemented with a NEON/SVE ext (or trivial
5754-
// extract, if from lane 0). This currently only handles low or high extracts
5755-
// to prevent SLP vectorizer regressions.
5754+
// extract, if from lane 0) for 128-bit NEON vectors or legal SVE vectors.
5755+
// This currently only handles low or high extracts to prevent SLP vectorizer
5756+
// regressions.
57565757
// Note that SVE's ext instruciton is destructive, but it can be fused with
57575758
// a movprfx to act like a constructive instruction.
57585759
if (IsExtractSubvector && LT.second.isFixedLengthVector()) {
5759-
if (LT.second.getFixedSizeInBits() >= AArch64::SVEBitsPerBlock &&
5760+
if (LT.second.getFixedSizeInBits() >= 128 &&
57605761
cast<FixedVectorType>(SubTp)->getNumElements() ==
57615762
LT.second.getVectorNumElements() / 2) {
57625763
if (Index == 0)

0 commit comments

Comments
 (0)