summaryrefslogtreecommitdiffstats
path: root/polly/lib/CodeGen/LoopGenerators.cpp
diff options
context:
space:
mode:
authorTobias Grosser <tobias@grosser.es>2014-11-25 17:09:21 +0000
committerTobias Grosser <tobias@grosser.es>2014-11-25 17:09:21 +0000
commit154d9469f4533dc7d6af48a0e3c52d030d1b7447 (patch)
tree2003d29e1bded2666b630d53cb4b47716eeca041 /polly/lib/CodeGen/LoopGenerators.cpp
parentd3aa1f4a630249026fab3513e3ad3b418a5d50ac (diff)
downloadbcm5719-llvm-154d9469f4533dc7d6af48a0e3c52d030d1b7447.tar.gz
bcm5719-llvm-154d9469f4533dc7d6af48a0e3c52d030d1b7447.zip
Add PreHeader always to OuterLoop
This fixes a bug introduce in r217525. llvm-svn: 222766
Diffstat (limited to 'polly/lib/CodeGen/LoopGenerators.cpp')
-rw-r--r--polly/lib/CodeGen/LoopGenerators.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/polly/lib/CodeGen/LoopGenerators.cpp b/polly/lib/CodeGen/LoopGenerators.cpp
index 09945ecd943..af0413749d6 100644
--- a/polly/lib/CodeGen/LoopGenerators.cpp
+++ b/polly/lib/CodeGen/LoopGenerators.cpp
@@ -78,10 +78,11 @@ Value *polly::createLoop(Value *LB, Value *UB, Value *Stride,
else
LI.addTopLevelLoop(NewLoop);
- if (OuterLoop && GuardBB)
- OuterLoop->addBasicBlockToLoop(GuardBB, LI.getBase());
- else if (OuterLoop)
+ if (OuterLoop) {
+ if (GuardBB)
+ OuterLoop->addBasicBlockToLoop(GuardBB, LI.getBase());
OuterLoop->addBasicBlockToLoop(PreHeaderBB, LI.getBase());
+ }
NewLoop->addBasicBlockToLoop(HeaderBB, LI.getBase());
OpenPOWER on IntegriCloud