summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/ScalarEvolutionExpander.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-06-30 06:09:46 +0000
committerDan Gohman <gohman@apple.com>2010-06-30 06:09:46 +0000
commit37f145c55ba229e3a4c58d0e80077e3dd4bb0ef8 (patch)
tree1256c4f474e4dfd64f3e887550e9f02adbe0d73b /llvm/lib/Analysis/ScalarEvolutionExpander.cpp
parent558ce124eb9787beae314effe12b3c17568625e1 (diff)
downloadbcm5719-llvm-37f145c55ba229e3a4c58d0e80077e3dd4bb0ef8.tar.gz
bcm5719-llvm-37f145c55ba229e3a4c58d0e80077e3dd4bb0ef8.zip
Simplify.
llvm-svn: 107248
Diffstat (limited to 'llvm/lib/Analysis/ScalarEvolutionExpander.cpp')
-rw-r--r--llvm/lib/Analysis/ScalarEvolutionExpander.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolutionExpander.cpp b/llvm/lib/Analysis/ScalarEvolutionExpander.cpp
index 2f7f73ed501..99b4a406dac 100644
--- a/llvm/lib/Analysis/ScalarEvolutionExpander.cpp
+++ b/llvm/lib/Analysis/ScalarEvolutionExpander.cpp
@@ -1101,8 +1101,7 @@ Value *SCEVExpander::visitAddRecExpr(const SCEVAddRecExpr *S) {
}
// {0,+,1} --> Insert a canonical induction variable into the loop!
- if (S->isAffine() &&
- S->getOperand(1) == SE.getConstant(Ty, 1)) {
+ if (S->isAffine() && S->getOperand(1)->isOne()) {
// If there's a canonical IV, just use it.
if (CanonicalIV) {
assert(Ty == SE.getEffectiveSCEVType(CanonicalIV->getType()) &&
OpenPOWER on IntegriCloud