mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-28 06:27:16 +00:00
Make LSR not crash if invoked without target lowering info, e.g. if invoked
from opt. llvm-svn: 96135
This commit is contained in:
parent
96f3c4222f
commit
5089836939
@ -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…
Reference in New Issue
Block a user