summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/ScalarEvolutionExpander.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2011-03-04 20:46:46 +0000
committerDan Gohman <gohman@apple.com>2011-03-04 20:46:46 +0000
commitaa036eedb85412edcb1c0c37c27227608c29cb9c (patch)
treec806091cf5cb61fc1e1e521ab862141e6e78845f /llvm/lib/Analysis/ScalarEvolutionExpander.cpp
parent8c2d3f424834f765b89ceb8cf5df0da57803fc24 (diff)
downloadbcm5719-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.cpp2
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;
}
OpenPOWER on IntegriCloud