[PATCH] D99727: [NFC][LoopVectorize] Remove unnecessary VF.isScalable asserts
David Sherwood via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 15 01:41:12 PDT 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rG7120f89f7d83: [NFC][LoopVectorize] Remove unnecessary VF.isScalable asserts (authored by david-arm).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99727/new/
https://reviews.llvm.org/D99727
Files:
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
Index: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
===================================================================
--- llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -2675,8 +2675,6 @@
// pointer operand of the interleaved access is supposed to be uniform. For
// uniform instructions, we're only required to generate a value for the
// first vector lane in each unroll iteration.
- assert(!VF.isScalable() &&
- "scalable vector reverse operation is not implemented");
if (Group->isReverse())
Index += (VF.getKnownMinValue() - 1) * Group->getFactor();
@@ -2713,7 +2711,6 @@
Value *MaskForGaps = nullptr;
if (Group->requiresScalarEpilogue() && !Cost->isScalarEpilogueAllowed()) {
- assert(!VF.isScalable() && "scalable vectors not yet supported.");
MaskForGaps = createBitMaskForGaps(Builder, VF.getKnownMinValue(), *Group);
assert(MaskForGaps && "Mask for Gaps is required but it is null");
}
@@ -2730,7 +2727,6 @@
Value *GroupMask = MaskForGaps;
if (BlockInMask) {
Value *BlockInMaskPart = State.get(BlockInMask, Part);
- assert(!VF.isScalable() && "scalable vectors not yet supported.");
Value *ShuffledMask = Builder.CreateShuffleVector(
BlockInMaskPart,
createReplicatedMask(InterleaveFactor, VF.getKnownMinValue()),
@@ -2761,7 +2757,6 @@
if (!Member)
continue;
- assert(!VF.isScalable() && "scalable vectors not yet supported.");
auto StrideMask =
createStrideMask(I, InterleaveFactor, VF.getKnownMinValue());
for (unsigned Part = 0; Part < UF; Part++) {
@@ -2786,7 +2781,6 @@
}
// The sub vector type for current instruction.
- assert(!VF.isScalable() && "VF is assumed to be non scalable.");
auto *SubVT = VectorType::get(ScalarTy, VF);
// Vectorize the interleaved store group.
@@ -2814,7 +2808,6 @@
Value *WideVec = concatenateVectors(Builder, StoredVecs);
// Interleave the elements in the wide vector.
- assert(!VF.isScalable() && "scalable vectors not yet supported.");
Value *IVec = Builder.CreateShuffleVector(
WideVec, createInterleaveMask(VF.getKnownMinValue(), InterleaveFactor),
"interleaved.vec");
@@ -6778,7 +6771,9 @@
ElementCount VF) {
assert(VF.isVector() &&
"Scalarization cost of instruction implies vectorization.");
- assert(!VF.isScalable() && "scalable vectors not yet supported.");
+ if (VF.isScalable())
+ return InstructionCost::getInvalid();
+
Type *ValTy = getMemInstValueType(I);
auto SE = PSE.getSE();
@@ -7203,8 +7198,7 @@
: InstructionCost::getInvalid();
InstructionCost ScalarizationCost =
- !VF.isScalable() ? getMemInstScalarizationCost(&I, VF) * NumAccesses
- : InstructionCost::getInvalid();
+ getMemInstScalarizationCost(&I, VF) * NumAccesses;
// Choose better solution for the current VF,
// write down this decision and use it during vectorization.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99727.337662.patch
Type: text/x-patch
Size: 3160 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210415/af0fd2b4/attachment.bin>
More information about the llvm-commits
mailing list