[llvm] LoopVectorize: guard appending InstsToScalarize; fix bug (PR #88720)
Ramkumar Ramachandra via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 17 02:25:41 PDT 2024
================
@@ -5815,7 +5815,8 @@ void LoopVectorizationCostModel::collectInstsToScalarize(ElementCount VF) {
if (!blockNeedsPredicationForAnyReason(BB))
continue;
for (Instruction &I : *BB)
- if (isScalarWithPredication(&I, VF)) {
+ if (isScalarWithPredication(&I, VF) &&
+ !isScalarAfterVectorization(&I, VF)) {
----------------
artagnon wrote:
Thanks for catching this think-o! Fixed now.
https://github.com/llvm/llvm-project/pull/88720
More information about the llvm-commits
mailing list