diff options
author | Evan Cheng <evan.cheng@apple.com> | 2007-10-26 17:24:46 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2007-10-26 17:24:46 +0000 |
commit | a2cd98bc1986e396dab0292d9e25e17773764c69 (patch) | |
tree | 0245f60c37347e6be261f2de75df59740b4c747a /lib/Transforms | |
parent | 9cb6d49c66fb0831ff0f84e72b5d74a66df70567 (diff) | |
download | external_llvm-a2cd98bc1986e396dab0292d9e25e17773764c69.zip external_llvm-a2cd98bc1986e396dab0292d9e25e17773764c69.tar.gz external_llvm-a2cd98bc1986e396dab0292d9e25e17773764c69.tar.bz2 |
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
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/Scalar/LoopStrengthReduce.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/lib/Transforms/Scalar/LoopStrengthReduce.cpp index d81ea2b..c5fdc09 100644 --- a/lib/Transforms/Scalar/LoopStrengthReduce.cpp +++ b/lib/Transforms/Scalar/LoopStrengthReduce.cpp @@ -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; |