summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Zolotukhin <mzolotukhin@apple.com>2014-12-09 22:45:07 +0000
committerMichael Zolotukhin <mzolotukhin@apple.com>2014-12-09 22:45:07 +0000
commit4def395646d2af62498d74d7c4bab54ba6d6eb15 (patch)
tree7bb25cc57866d7c3f4354a4dc26e02962fdaed74
parentdf833a49186f7a7f7f632d35ca7a5ee757953f2d (diff)
downloadbcm5719-llvm-4def395646d2af62498d74d7c4bab54ba6d6eb15.tar.gz
bcm5719-llvm-4def395646d2af62498d74d7c4bab54ba6d6eb15.zip
Remove redundant variable.
Tested by adding assert(LoopVectorPreHeader == VecPreheader) on LLVM test suite and SPECs. llvm-svn: 223847
-rw-r--r--llvm/lib/Transforms/Vectorize/LoopVectorize.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index 3c543530a43..ef52da8e1a3 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -2833,9 +2833,6 @@ void InnerLoopVectorizer::vectorizeLoop() {
}
// Fix the vector-loop phi.
- // We created the induction variable so we know that the
- // preheader is the first entry.
- BasicBlock *VecPreheader = Induction->getIncomingBlock(0);
// Reductions do not have to start at zero. They can start with
// any loop invariant values.
@@ -2847,7 +2844,8 @@ void InnerLoopVectorizer::vectorizeLoop() {
// Make sure to add the reduction stat value only to the
// first unroll part.
Value *StartVal = (part == 0) ? VectorStart : Identity;
- cast<PHINode>(VecRdxPhi[part])->addIncoming(StartVal, VecPreheader);
+ cast<PHINode>(VecRdxPhi[part])->addIncoming(StartVal,
+ LoopVectorPreHeader);
cast<PHINode>(VecRdxPhi[part])->addIncoming(Val[part],
LoopVectorBody.back());
}
OpenPOWER on IntegriCloud