Skip to content

Commit d00579b

Browse files
committed
Revert "[SLP]Reduce number of alternate instruction, where possible"
This reverts commit d5a7a48. That commit triggers failed asserts, see #123360 for details.
1 parent 5008277 commit d00579b

22 files changed

+854
-1326
lines changed

llvm/include/llvm/Analysis/TargetTransformInfo.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1759,10 +1759,6 @@ class TargetTransformInfo {
17591759
/// scalable version of the vectorized loop.
17601760
bool preferFixedOverScalableIfEqualCost() const;
17611761

1762-
/// \returns True if target prefers SLP vectorizer with altermate opcode
1763-
/// vectorization, false - otherwise.
1764-
bool preferAlternateOpcodeVectorization() const;
1765-
17661762
/// \returns True if the target prefers reductions in loop.
17671763
bool preferInLoopReduction(unsigned Opcode, Type *Ty,
17681764
ReductionFlags Flags) const;
@@ -2310,7 +2306,6 @@ class TargetTransformInfo::Concept {
23102306
unsigned ChainSizeInBytes,
23112307
VectorType *VecTy) const = 0;
23122308
virtual bool preferFixedOverScalableIfEqualCost() const = 0;
2313-
virtual bool preferAlternateOpcodeVectorization() const = 0;
23142309
virtual bool preferInLoopReduction(unsigned Opcode, Type *Ty,
23152310
ReductionFlags) const = 0;
23162311
virtual bool preferPredicatedReductionSelect(unsigned Opcode, Type *Ty,
@@ -3111,9 +3106,6 @@ class TargetTransformInfo::Model final : public TargetTransformInfo::Concept {
31113106
bool preferFixedOverScalableIfEqualCost() const override {
31123107
return Impl.preferFixedOverScalableIfEqualCost();
31133108
}
3114-
bool preferAlternateOpcodeVectorization() const override {
3115-
return Impl.preferAlternateOpcodeVectorization();
3116-
}
31173109
bool preferInLoopReduction(unsigned Opcode, Type *Ty,
31183110
ReductionFlags Flags) const override {
31193111
return Impl.preferInLoopReduction(Opcode, Ty, Flags);

llvm/include/llvm/Analysis/TargetTransformInfoImpl.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -989,8 +989,6 @@ class TargetTransformInfoImplBase {
989989

990990
bool preferFixedOverScalableIfEqualCost() const { return false; }
991991

992-
bool preferAlternateOpcodeVectorization() const { return true; }
993-
994992
bool preferInLoopReduction(unsigned Opcode, Type *Ty,
995993
TTI::ReductionFlags Flags) const {
996994
return false;

llvm/lib/Analysis/TargetTransformInfo.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1360,10 +1360,6 @@ bool TargetTransformInfo::preferFixedOverScalableIfEqualCost() const {
13601360
return TTIImpl->preferFixedOverScalableIfEqualCost();
13611361
}
13621362

1363-
bool TargetTransformInfo::preferAlternateOpcodeVectorization() const {
1364-
return TTIImpl->preferAlternateOpcodeVectorization();
1365-
}
1366-
13671363
bool TargetTransformInfo::preferInLoopReduction(unsigned Opcode, Type *Ty,
13681364
ReductionFlags Flags) const {
13691365
return TTIImpl->preferInLoopReduction(Opcode, Ty, Flags);

llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,6 @@ class RISCVTTIImpl : public BasicTTIImplBase<RISCVTTIImpl> {
111111

112112
unsigned getMaximumVF(unsigned ElemWidth, unsigned Opcode) const;
113113

114-
bool preferAlternateOpcodeVectorization() const { return false; }
115-
116114
bool preferEpilogueVectorization() const {
117115
// Epilogue vectorization is usually unprofitable - tail folding or
118116
// a smaller VF would have been better. This a blunt hammer - we

llvm/lib/Target/X86/X86TargetTransformInfo.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,6 @@ class X86TTIImpl : public BasicTTIImplBase<X86TTIImpl> {
292292

293293
TTI::MemCmpExpansionOptions enableMemCmpExpansion(bool OptSize,
294294
bool IsZeroCmp) const;
295-
bool preferAlternateOpcodeVectorization() const { return false; }
296295
bool prefersVectorizedAddressing() const;
297296
bool supportsEfficientVectorElementLoadStore() const;
298297
bool enableInterleavedAccessVectorization();

0 commit comments

Comments
 (0)