diff options
author | Dan Gohman <gohman@apple.com> | 2011-03-04 20:46:46 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2011-03-04 20:46:46 +0000 |
commit | aa036eedb85412edcb1c0c37c27227608c29cb9c (patch) | |
tree | c806091cf5cb61fc1e1e521ab862141e6e78845f /llvm/lib/Analysis/ScalarEvolutionExpander.cpp | |
parent | 8c2d3f424834f765b89ceb8cf5df0da57803fc24 (diff) | |
download | bcm5719-llvm-aa036eedb85412edcb1c0c37c27227608c29cb9c.tar.gz bcm5719-llvm-aa036eedb85412edcb1c0c37c27227608c29cb9c.zip |
When decling to reuse existing expressions that involve casts, ignore
bitcasts, which are really no-ops here. This fixes slowdowns on
MultiSource/Applications/aha and others.
llvm-svn: 127031
Diffstat (limited to 'llvm/lib/Analysis/ScalarEvolutionExpander.cpp')
-rw-r--r-- | llvm/lib/Analysis/ScalarEvolutionExpander.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolutionExpander.cpp b/llvm/lib/Analysis/ScalarEvolutionExpander.cpp index f2d23c4be70..76a94ea2746 100644 --- a/llvm/lib/Analysis/ScalarEvolutionExpander.cpp +++ b/llvm/lib/Analysis/ScalarEvolutionExpander.cpp @@ -859,7 +859,7 @@ SCEVExpander::getAddRecExprPHILiterally(const SCEVAddRecExpr *Normalized, // to be. do { if (IncV->getNumOperands() == 0 || isa<PHINode>(IncV) || - isa<CastInst>(IncV)) { + (isa<CastInst>(IncV) && !isa<BitCastInst>(IncV))) { IncV = 0; break; } |