diff options
author | Evan Cheng <evan.cheng@apple.com> | 2009-02-22 07:31:19 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2009-02-22 07:31:19 +0000 |
commit | 3cd389de398e95b1633d310fc9c4af5b9f84b7af (patch) | |
tree | 4704c15d51b46d0ea92b2a47d05a51b73974c2cb /lib/Transforms/Scalar/LoopStrengthReduce.cpp | |
parent | bdf0d7cfc14c144b3168db7acc7cacf72209812a (diff) |
Only try to sink immediate when TLI is not null. It needs to check if immediate would fit in target addressing field.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65268 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/LoopStrengthReduce.cpp')
-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 2099ceace5..1817e58374 100644 --- a/lib/Transforms/Scalar/LoopStrengthReduce.cpp +++ b/lib/Transforms/Scalar/LoopStrengthReduce.cpp @@ -1828,7 +1828,7 @@ void LoopStrengthReduce::StrengthReduceStridedIVUsers(const SCEVHandle &Stride, // If all uses are addresses, consider sinking the immediate part of the // common expression back into uses if they can fit in the immediate fields. - if (HaveCommonExprs && AllUsesAreAddresses) { + if (TLI && HaveCommonExprs && AllUsesAreAddresses) { SCEVHandle NewCommon = CommonExprs; SCEVHandle Imm = SE->getIntegerSCEV(0, ReplacedTy); MoveImmediateValues(TLI, ReplacedTy, NewCommon, Imm, true, L, SE); |