mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-08 19:36:02 +00:00
Add additional check to ensure that iv is canonicalized.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55682 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a9348dc7ac
commit
e925ccc553
@ -1935,6 +1935,7 @@ void LoopStrengthReduce::OptimizeIVType(Loop *L) {
|
|||||||
|
|
||||||
ConstantInt *CInit = dyn_cast<ConstantInt>(PHI->getIncomingValue(Entry));
|
ConstantInt *CInit = dyn_cast<ConstantInt>(PHI->getIncomingValue(Entry));
|
||||||
if (!CInit) return;
|
if (!CInit) return;
|
||||||
|
if (!CInit->isZero()) return;
|
||||||
|
|
||||||
bool signedInit = CInit->getValue().isNegative();
|
bool signedInit = CInit->getValue().isNegative();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user