From: Dorit Nuzman Date: Tue, 23 Oct 2018 11:51:55 +0000 (+0000) Subject: Leftover bits from https://reviews.llvm.org/D53420 that were accidentally left X-Git-Tag: android-x86-9.0-r1~11561 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=e7a92994d433d5e0ce7823c63b174a6a1e5ce21b;p=android-x86%2Fexternal-llvm.git Leftover bits from https://reviews.llvm.org/D53420 that were accidentally left out of revision 344883 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345021 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Analysis/VectorUtils.h b/include/llvm/Analysis/VectorUtils.h index 2f562ec3d30..85d1a01e315 100644 --- a/include/llvm/Analysis/VectorUtils.h +++ b/include/llvm/Analysis/VectorUtils.h @@ -310,9 +310,9 @@ public: /// Returns true if this Group requires a scalar iteration to handle gaps. bool requiresScalarEpilogue() const { - // If Group has no gaps, or has gaps but the last member exists, then a - // scalar epilog is not needed for this group. - if (getNumMembers() == getFactor() || getMember(getFactor() - 1)) + // If the last member of the Group exists, then a scalar epilog is not + // needed for this group. + if (getMember(getFactor() - 1)) return false; // We have a group with gaps. It therefore cannot be a group of stores, diff --git a/lib/Transforms/Vectorize/LoopVectorize.cpp b/lib/Transforms/Vectorize/LoopVectorize.cpp index daaa1e27c8e..ab0e72960dd 100644 --- a/lib/Transforms/Vectorize/LoopVectorize.cpp +++ b/lib/Transforms/Vectorize/LoopVectorize.cpp @@ -4600,8 +4600,7 @@ Optional LoopVectorizationCostModel::computeMaxVF(bool OptForSize) { } // Record that scalar epilogue is not allowed. - LLVM_DEBUG(dbgs() << "LV: Not inserting scalar epilogue for access with gaps " - "due to -Os/-Oz.\n"); + LLVM_DEBUG(dbgs() << "LV: Not allowing scalar epilogue due to -Os/-Oz.\n"); // We don't create an epilogue when optimizing for size. // Invalidate interleave groups that require an epilogue.