aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2008-05-25 23:43:32 +0000
committerNick Lewycky <nicholas@mxc.ca>2008-05-25 23:43:32 +0000
commit04b35e8532d82b6777a667e09db153e9fb73e071 (patch)
tree639a4770a7e6192387b9ab0cf06ab96d0c11547d /lib/Analysis
parent3dfd7bf5110c47e99fd0fcce96122b90f699ca3a (diff)
downloadexternal_llvm-04b35e8532d82b6777a667e09db153e9fb73e071.zip
external_llvm-04b35e8532d82b6777a667e09db153e9fb73e071.tar.gz
external_llvm-04b35e8532d82b6777a667e09db153e9fb73e071.tar.bz2
Don't treat values as signed when looking at loop steppings in HowForToNonZero.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51560 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r--lib/Analysis/ScalarEvolution.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp
index 26010eb..e01cf51 100644
--- a/lib/Analysis/ScalarEvolution.cpp
+++ b/lib/Analysis/ScalarEvolution.cpp
@@ -2548,9 +2548,9 @@ SCEVHandle ScalarEvolutionsImpl::HowFarToZero(SCEV *V, const Loop *L) {
if (SCEVConstant *StartC = dyn_cast<SCEVConstant>(Start)) {
ConstantInt *StartCC = StartC->getValue();
Constant *StartNegC = ConstantExpr::getNeg(StartCC);
- Constant *Rem = ConstantExpr::getSRem(StartNegC, StepC->getValue());
+ Constant *Rem = ConstantExpr::getURem(StartNegC, StepC->getValue());
if (Rem->isNullValue()) {
- Constant *Result =ConstantExpr::getSDiv(StartNegC,StepC->getValue());
+ Constant *Result = ConstantExpr::getUDiv(StartNegC,StepC->getValue());
return SE.getUnknown(Result);
}
}