aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Scalar
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2011-07-21 01:45:54 +0000
committerAndrew Trick <atrick@apple.com>2011-07-21 01:45:54 +0000
commitc205a094bd5019773c98adcfbdc21c07c9da1888 (patch)
tree69a018c4ff32b6edc0104566c493c1fa3ecef7dc /lib/Transforms/Scalar
parentc2c988e5e0b15408f790c96fd7ad2d86a6a93a08 (diff)
downloadexternal_llvm-c205a094bd5019773c98adcfbdc21c07c9da1888.zip
external_llvm-c205a094bd5019773c98adcfbdc21c07c9da1888.tar.gz
external_llvm-c205a094bd5019773c98adcfbdc21c07c9da1888.tar.bz2
LSR, correct fix for rdar://9786536. Silly casting bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135654 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar')
-rw-r--r--lib/Transforms/Scalar/LoopStrengthReduce.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/lib/Transforms/Scalar/LoopStrengthReduce.cpp
index 9286481..e790715 100644
--- a/lib/Transforms/Scalar/LoopStrengthReduce.cpp
+++ b/lib/Transforms/Scalar/LoopStrengthReduce.cpp
@@ -1480,8 +1480,8 @@ void LSRInstance::OptimizeShadowIV() {
ConstantInt *Init = dyn_cast<ConstantInt>(PH->getIncomingValue(Entry));
if (!Init) continue;
Constant *NewInit = ConstantFP::get(DestTy, IsSigned ?
- Init->getSExtValue() :
- Init->getZExtValue());
+ (double)Init->getSExtValue() :
+ (double)Init->getZExtValue());
BinaryOperator *Incr =
dyn_cast<BinaryOperator>(PH->getIncomingValue(Latch));