OSDN Git Service

Leftover bits from https://reviews.llvm.org/D53420 that were accidentally left
authorDorit Nuzman <dorit.nuzman@intel.com>
Tue, 23 Oct 2018 11:51:55 +0000 (11:51 +0000)
committerDorit Nuzman <dorit.nuzman@intel.com>
Tue, 23 Oct 2018 11:51:55 +0000 (11:51 +0000)
out of revision 344883

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345021 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Analysis/VectorUtils.h
lib/Transforms/Vectorize/LoopVectorize.cpp

index 2f562ec..85d1a01 100644 (file)
@@ -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,
index daaa1e2..ab0e729 100644 (file)
@@ -4600,8 +4600,7 @@ Optional<unsigned> 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.