mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-25 16:24:23 +00:00
Fix a case that caused this to crash on 178.galgel
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22653 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -415,6 +415,12 @@ static SCEVHandle GetImmediateValues(SCEVHandle Val, bool isAddress, Loop *L) {
|
|||||||
return GetImmediateValues(SARE->getStart(), isAddress, 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());
|
return SCEVUnknown::getIntegerSCEV(0, Val->getType());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user