aboutsummaryrefslogtreecommitdiff
path: root/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
commita48941087bc5c176556d5f24e255e58936a0e14c (patch)
treebdb95a8060887016ff563f0e9715c703bc4fe992 /lib/Transforms
parentd26795a034aef970392e789d782333528b128006 (diff)
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71013 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/Scalar/LoopStrengthReduce.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/lib/Transforms/Scalar/LoopStrengthReduce.cpp
index 23f75630b7..4365adc629 100644
--- a/lib/Transforms/Scalar/LoopStrengthReduce.cpp
+++ b/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.