diff options
-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; |