mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 06:25:18 +00:00
[LoopVectorizer] Fix bailing-out condition for OptForSize case.
With option OptForSize enabled, the Loop Vectorizer is not supposed to create tail loop. The condition checking that was invalid and was not matching to the comment above. Patch by Marianne Mailhot-Sarrasin. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240556 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -4642,10 +4642,9 @@ LoopVectorizationCostModel::selectVectorizationFactor(bool OptForSize) {
|
||||
|
||||
if (VF == 0)
|
||||
VF = MaxVectorSize;
|
||||
|
||||
// If the trip count that we found modulo the vectorization factor is not
|
||||
// zero then we require a tail.
|
||||
if (VF < 2) {
|
||||
else {
|
||||
// If the trip count that we found modulo the vectorization factor is not
|
||||
// zero then we require a tail.
|
||||
emitAnalysis(VectorizationReport() <<
|
||||
"cannot optimize for size and vectorize at the "
|
||||
"same time. Enable vectorization of this loop "
|
||||
|
Reference in New Issue
Block a user