forked from OSchip/llvm-project
Fix a case that caused this to crash on 178.galgel
llvm-svn: 22653
This commit is contained in:
parent
acc42c4df1
commit
0f7c0fa2a7
llvm/lib/Transforms/Scalar
|
@ -415,6 +415,12 @@ static SCEVHandle GetImmediateValues(SCEVHandle Val, bool isAddress, Loop *L) {
|
|||
return GetImmediateValues(SARE->getStart(), isAddress, L);
|
||||
}
|
||||
|
||||
if (!Val->isLoopInvariant(L)) {
|
||||
// If this is a loop-variant expression, it must stay in the immediate
|
||||
// field of the expression.
|
||||
return Val;
|
||||
}
|
||||
|
||||
return SCEVUnknown::getIntegerSCEV(0, Val->getType());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue