mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-23 20:29:30 +00:00
Make LSR not crash if invoked without target lowering info, e.g. if invoked
from opt. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96135 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
77ffe3b31e
commit
6d09ab8ba2
@ -1535,10 +1535,10 @@ LSRInstance::OptimizeLoopTermCond() {
|
||||
const Type *AccessTy = getAccessType(UI->getUser());
|
||||
TargetLowering::AddrMode AM;
|
||||
AM.Scale = D->getValue()->getSExtValue();
|
||||
if (TLI->isLegalAddressingMode(AM, AccessTy))
|
||||
if (TLI && TLI->isLegalAddressingMode(AM, AccessTy))
|
||||
goto decline_post_inc;
|
||||
AM.Scale = -AM.Scale;
|
||||
if (TLI->isLegalAddressingMode(AM, AccessTy))
|
||||
if (TLI && TLI->isLegalAddressingMode(AM, AccessTy))
|
||||
goto decline_post_inc;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user