summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/Vectorize/LoopVectorize.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index 4a51fc9a97d..c993d2a73c7 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -3200,6 +3200,11 @@ void InnerLoopVectorizer::createEmptyLoop() {
LoopVectorBody.push_back(VecBody);
LoopScalarBody = OldBasicBlock;
+ // Keep all loop hints from the original loop on the vector loop (we'll
+ // replace the vectorizer-specific hints below).
+ if (MDNode *LID = OrigLoop->getLoopID())
+ Lp->setLoopID(LID);
+
LoopVectorizeHints Hints(Lp, true);
Hints.setAlreadyVectorized();
}
OpenPOWER on IntegriCloud