summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2009-02-22 07:31:19 +0000
committerEvan Cheng <evan.cheng@apple.com>2009-02-22 07:31:19 +0000
commit69decbf0b2a5a6ae6b4dc3bd5730268e2c0296e5 (patch)
treed983a22105d6c91626a26f450cea8406c9f51878 /llvm/lib/Transforms
parent825fe7565eb8bb29fd9fee70f6c710272698415f (diff)
downloadbcm5719-llvm-69decbf0b2a5a6ae6b4dc3bd5730268e2c0296e5.tar.gz
bcm5719-llvm-69decbf0b2a5a6ae6b4dc3bd5730268e2c0296e5.zip
Only try to sink immediate when TLI is not null. It needs to check if immediate would fit in target addressing field.
llvm-svn: 65268
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
index 2099ceace51..1817e583747 100644
--- a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
+++ b/llvm/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);
OpenPOWER on IntegriCloud