diff options
Diffstat (limited to 'polly/lib/Support/SCEVValidator.cpp')
-rw-r--r-- | polly/lib/Support/SCEVValidator.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/polly/lib/Support/SCEVValidator.cpp b/polly/lib/Support/SCEVValidator.cpp index 1941875d0d5..3662424250c 100644 --- a/polly/lib/Support/SCEVValidator.cpp +++ b/polly/lib/Support/SCEVValidator.cpp @@ -320,11 +320,12 @@ public: ValidatorResult visitCallInstruction(Instruction *I, const SCEV *S) { assert(I->getOpcode() == Instruction::Call && "Call instruction expected"); - auto Call = cast<CallInst>(I); - - if (!isConstCall(Call)) - return ValidatorResult(SCEVType::INVALID, S); + if (R->contains(I)) { + auto Call = cast<CallInst>(I); + if (!isConstCall(Call)) + return ValidatorResult(SCEVType::INVALID, S); + } return ValidatorResult(SCEVType::PARAM, S); } |