File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
llvm/lib/Transforms/Vectorize Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -5813,10 +5813,11 @@ void LoopVectorizationCostModel::collectInstsToScalarize(ElementCount VF) {
58135813 for (Instruction &I : *BB)
58145814 if (isScalarWithPredication (&I, VF)) {
58155815 ScalarCostsTy ScalarCosts;
5816- // Do not apply discount if scalable, because that would lead to
5817- // invalid scalarization costs.
5818- // Do not apply discount logic if hacked cost is needed
5819- // for emulated masked memrefs.
5816+ // Do not apply discount logic for:
5817+ // 1. Scalars after vectorization, as there will only be a single copy
5818+ // of the instruction.
5819+ // 2. Scalable VF, as that would lead to invalid scalarization costs.
5820+ // 3. Emulated masked memrefs, if a hacked cost is needed.
58205821 if (!isScalarAfterVectorization (&I, VF) && !VF.isScalable () &&
58215822 !useEmulatedMaskMemRefHack (&I, VF) &&
58225823 computePredInstDiscount (&I, ScalarCosts, VF) >= 0 )
You can’t perform that action at this time.
0 commit comments