Build domtree of new loops correctly

This fixes a bug introduced in r217525.

llvm-svn: 218581
This commit is contained in:
Tobias Grosser
2014-09-28 22:40:36 +00:00
parent 09c0778059
commit f8a678d2fd
2 changed files with 2 additions and 2 deletions

View File

@@ -127,7 +127,7 @@ Value *polly::createLoop(Value *LB, Value *UB, Value *Stride,
if (GuardBB)
DT.changeImmediateDominator(ExitBB, GuardBB);
else
DT.changeImmediateDominator(ExitBB, BeforeBB);
DT.changeImmediateDominator(ExitBB, HeaderBB);
// The loop body should be added here.
Builder.SetInsertPoint(HeaderBB->getFirstNonPHI());

View File

@@ -1,4 +1,4 @@
; RUN: opt %loadPolly -polly-codegen-isl -S < %s | FileCheck %s
; RUN: opt %loadPolly -polly-codegen-isl -S -verify-dom-info < %s | FileCheck %s
;
; CHECK-NOT: br i1 true, label %polly.{{.*}}, label %polly.{{.*}}
;