IndependentBlocks: We can only reconstruct PHI nodes that are within the ScoP

In the classical (non -polly-codegen-scev) mode, we assume that we can always
recreate PHI nodes during code generation. This is not true. We can only
reconstruct them from the polyhedral information, in case the entire loop of the
PHI node is part of the SCoP and consequently the PHI node was translated in
the polyhedral description.

llvm-svn: 179674
This commit is contained in:
Tobias Grosser 2013-04-17 07:20:36 +00:00
parent b5f92892d1
commit e8df5bd92b
2 changed files with 1 additions and 3 deletions

View File

@ -58,7 +58,7 @@ bool polly::canSynthesize(const Instruction *I, const llvm::LoopInfo *LI,
}
Loop *L = LI->getLoopFor(I->getParent());
return L && I == L->getCanonicalInductionVariable();
return L && I == L->getCanonicalInductionVariable() && R->contains(L);
}
// Helper class to generate memory location.

View File

@ -1,6 +1,4 @@
; RUN: opt %loadPolly %defaultOpts -polly-codegen-isl %s
; -polly-indenpendent causes: Cannot generate independent blocks
; XFAIL:*
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
target triple = "x86_64-unknown-linux-gnu"