summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2013-03-08 16:58:37 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2013-03-08 16:58:37 +0000
commit37c2d65c5a438d8c8218b9c36e7b24e710d29d09 (patch)
treed611b5c204bdd2eca5d9d1c539b52d6c35728847 /llvm/lib
parent5e524897eda279971fa2e45003155f957975c922 (diff)
downloadbcm5719-llvm-37c2d65c5a438d8c8218b9c36e7b24e710d29d09.tar.gz
bcm5719-llvm-37c2d65c5a438d8c8218b9c36e7b24e710d29d09.zip
Insert the reduction start value into the first bypass block to preserve domination.
Fixes PR15344. llvm-svn: 176701
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/Vectorize/LoopVectorize.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index 0d113728084..11f4b022045 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -1643,7 +1643,7 @@ InnerLoopVectorizer::vectorizeLoop(LoopVectorizationLegality *Legal) {
// To do so, we need to generate the 'identity' vector and overide
// one of the elements with the incoming scalar reduction. We need
// to do it in the vector-loop preheader.
- Builder.SetInsertPoint(LoopBypassBlocks.back()->getTerminator());
+ Builder.SetInsertPoint(LoopBypassBlocks.front()->getTerminator());
// This is the vector-clone of the value that leaves the loop.
VectorParts &VectorExit = getVectorValue(RdxDesc.LoopExitInstr);
OpenPOWER on IntegriCloud