aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis/ScalarEvolutionExpander.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-06-18 16:23:07 +0000
committerDan Gohman <gohman@apple.com>2008-06-18 16:23:07 +0000
commit7b560c4218a3eac6af49b43d14003e30c9024b94 (patch)
treecce837286c2b0aac98e2442e475309248f7a24c4 /lib/Analysis/ScalarEvolutionExpander.cpp
parent7dabe38781d34c681ca6dff9a5df1de7e44308d5 (diff)
downloadexternal_llvm-7b560c4218a3eac6af49b43d14003e30c9024b94.zip
external_llvm-7b560c4218a3eac6af49b43d14003e30c9024b94.tar.gz
external_llvm-7b560c4218a3eac6af49b43d14003e30c9024b94.tar.bz2
Move LSR's private isZero function to a public SCEV member
function, and make use of it in several places. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52463 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/ScalarEvolutionExpander.cpp')
-rw-r--r--lib/Analysis/ScalarEvolutionExpander.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Analysis/ScalarEvolutionExpander.cpp b/lib/Analysis/ScalarEvolutionExpander.cpp
index 9872ced..e7bc3f2 100644
--- a/lib/Analysis/ScalarEvolutionExpander.cpp
+++ b/lib/Analysis/ScalarEvolutionExpander.cpp
@@ -126,8 +126,7 @@ Value *SCEVExpander::visitAddRecExpr(SCEVAddRecExpr *S) {
assert(Ty->isInteger() && "Cannot expand fp recurrences yet!");
// {X,+,F} --> X + {0,+,F}
- if (!isa<SCEVConstant>(S->getStart()) ||
- !cast<SCEVConstant>(S->getStart())->getValue()->isZero()) {
+ if (!S->getStart()->isZero()) {
Value *Start = expand(S->getStart());
std::vector<SCEVHandle> NewOps(S->op_begin(), S->op_end());
NewOps[0] = SE.getIntegerSCEV(0, Ty);