aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Analysis/ScalarEvolutionExpressions.h
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-06-22 19:23:09 +0000
committerDan Gohman <gohman@apple.com>2008-06-22 19:23:09 +0000
commit17f1972c770dc18f5c7c3c95776b4d62ae9e121d (patch)
tree57ff8e11cc6f02c82e1595479f9bacd978a7075e /include/llvm/Analysis/ScalarEvolutionExpressions.h
parent09d3fdc254c0b922c38f7c2bcad27c02fa0904f3 (diff)
downloadexternal_llvm-17f1972c770dc18f5c7c3c95776b4d62ae9e121d.zip
external_llvm-17f1972c770dc18f5c7c3c95776b4d62ae9e121d.tar.gz
external_llvm-17f1972c770dc18f5c7c3c95776b4d62ae9e121d.tar.bz2
Use SCEVAddRecExpr::isAffine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52614 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/ScalarEvolutionExpressions.h')
-rw-r--r--include/llvm/Analysis/ScalarEvolutionExpressions.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/Analysis/ScalarEvolutionExpressions.h b/include/llvm/Analysis/ScalarEvolutionExpressions.h
index e077cfe..76f4b2c 100644
--- a/include/llvm/Analysis/ScalarEvolutionExpressions.h
+++ b/include/llvm/Analysis/ScalarEvolutionExpressions.h
@@ -407,7 +407,7 @@ namespace llvm {
/// indicating how much this expression steps by. If this is a polynomial
/// of degree N, it returns a chrec of degree N-1.
SCEVHandle getStepRecurrence(ScalarEvolution &SE) const {
- if (getNumOperands() == 2) return getOperand(1);
+ if (isAffine()) return getOperand(1);
return SE.getAddRecExpr(std::vector<SCEVHandle>(op_begin()+1,op_end()),
getLoop());
}