Skip to content

Commit 5294793

Browse files
committed
Revert "[RISCV][TTI] Enable masked interleave access for scalable vector (#149981)"
This reverts commit ee3a771. Causes an assertion for the zvl1024b RISC-V build configuration. See comment with reproducer at <#149981 (comment)>
1 parent ae44418 commit 5294793

File tree

5 files changed

+193
-152
lines changed

5 files changed

+193
-152
lines changed

llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -979,12 +979,10 @@ InstructionCost RISCVTTIImpl::getInterleavedMemoryOpCost(
979979
Align Alignment, unsigned AddressSpace, TTI::TargetCostKind CostKind,
980980
bool UseMaskForCond, bool UseMaskForGaps) const {
981981

982-
// The interleaved memory access pass will lower (de)interleave ops combined
983-
// with an adjacent appropriate memory to vlseg/vsseg intrinsics. vlseg/vsseg
984-
// only support masking per-iteration (i.e. condition), not per-segment (i.e.
985-
// gap).
986-
// TODO: Support masked interleaved access for fixed length vector.
987-
if ((isa<ScalableVectorType>(VecTy) || !UseMaskForCond) && !UseMaskForGaps &&
982+
// The interleaved memory access pass will lower interleaved memory ops (i.e
983+
// a load and store followed by a specific shuffle) to vlseg/vsseg
984+
// intrinsics.
985+
if (!UseMaskForCond && !UseMaskForGaps &&
988986
Factor <= TLI->getMaxSupportedInterleaveFactor()) {
989987
auto *VTy = cast<VectorType>(VecTy);
990988
std::pair<InstructionCost, MVT> LT = getTypeLegalizationCost(VTy);

llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -398,10 +398,6 @@ class RISCVTTIImpl final : public BasicTTIImplBase<RISCVTTIImpl> {
398398

399399
bool enableInterleavedAccessVectorization() const override { return true; }
400400

401-
bool enableMaskedInterleavedAccessVectorization() const override {
402-
return ST->hasVInstructions();
403-
}
404-
405401
unsigned getMinTripCountTailFoldingThreshold() const override;
406402

407403
enum RISCVRegisterClass { GPRRC, FPRRC, VRRC };

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1359,9 +1359,7 @@ class LoopVectorizationCostModel {
13591359
return;
13601360
// Override EVL styles if needed.
13611361
// FIXME: Investigate opportunity for fixed vector factor.
1362-
// FIXME: Support interleave accesses.
13631362
bool EVLIsLegal = UserIC <= 1 && IsScalableVF &&
1364-
!InterleaveInfo.hasGroups() &&
13651363
TTI.hasActiveVectorLength() && !EnableVPlanNativePath;
13661364
if (EVLIsLegal)
13671365
return;

0 commit comments

Comments
 (0)