mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-01 09:18:30 +00:00
Fix a crash. Make sure TLI is not null.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43384 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8d9d74eaa8
commit
f1fc54f951
@ -972,7 +972,7 @@ bool LoopStrengthReduce::ValidStride(bool HasBaseReg,
|
||||
AM.Scale = Scale;
|
||||
|
||||
// If load[imm+r*scale] is illegal, bail out.
|
||||
if (!TLI->isLegalAddressingMode(AM, AccessTy))
|
||||
if (TLI && !TLI->isLegalAddressingMode(AM, AccessTy))
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user