Skip to content

Commit 9f4c52d

Browse files
committed
[SLP][REVEC] Make GetMinMaxCost support FixedVectorType when REVEC is
enabled.
1 parent 46f323d commit 9f4c52d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10777,6 +10777,8 @@ BoUpSLP::getEntryCost(const TreeEntry *E, ArrayRef<Value *> VectorizedVals,
1077710777
// If the selects are the only uses of the compares, they will be
1077810778
// dead and we can adjust the cost by removing their cost.
1077910779
if (VI && SelectOnly) {
10780+
assert((!Ty->isVectorTy() || SLPReVec) &&
10781+
"Expected only for scalar type.");
1078010782
auto *CI = cast<CmpInst>(VI->getOperand(0));
1078110783
IntrinsicCost -= TTI->getCmpSelInstrCost(
1078210784
CI->getOpcode(), Ty, Builder.getInt1Ty(), CI->getPredicate(),

0 commit comments

Comments
 (0)