summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2009-05-05 20:49:46 +0000
committerBill Wendling <isanbard@gmail.com>2009-05-05 20:49:46 +0000
commit5e2ac0cd9cae23859a5ad548949d1c8d609eff22 (patch)
tree8f20092777e7643868beb561aa5e0ad9cc0471bf /llvm/lib/Transforms
parentd99feb8da41c9a731e4fb3b6bf7b1bed781d8d2f (diff)
downloadbcm5719-llvm-5e2ac0cd9cae23859a5ad548949d1c8d609eff22.tar.gz
bcm5719-llvm-5e2ac0cd9cae23859a5ad548949d1c8d609eff22.zip
Temporarily reverting r71008. It was causing this failure:
Running /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/test/ CodeGen/X86/dg.exp ... FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/test/ CodeGen/X86/change-compare-stride-1.ll Failed with exit(1) at line 2 while running: grep {cmpq $-478,} change-compare-stride-1.ll.tmp child process exited abnormally llvm-svn: 71013
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
index 23f75630b76..4365adc629f 100644
--- a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
@@ -2027,10 +2027,9 @@ ICmpInst *LoopStrengthReduce::ChangeCompareStride(Loop *L, ICmpInst *Cond,
Scale = SSInt / CmpSSInt;
int64_t NewCmpVal = CmpVal * Scale;
- APInt Mul = APInt(BitWidth*2, CmpVal);
- Mul = Mul * APInt(BitWidth*2, Scale);
+ APInt Mul = APInt(BitWidth, NewCmpVal);
// Check for overflow.
- if (!Mul.isSignedIntN(BitWidth))
+ if (Mul.getSExtValue() != NewCmpVal)
continue;
// Watch out for overflow.
OpenPOWER on IntegriCloud