summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-04-21 01:25:57 +0000
committerDan Gohman <gohman@apple.com>2009-04-21 01:25:57 +0000
commit4860db61be85b4fc7bfffe212cee5b3e2a9188f2 (patch)
tree372850da551a9d52e4ad4da399979d759d30f171 /llvm/lib/Transforms
parent9ebf9516af5f4be3acf29e2f7dda51219da90d6a (diff)
downloadbcm5719-llvm-4860db61be85b4fc7bfffe212cee5b3e2a9188f2.tar.gz
bcm5719-llvm-4860db61be85b4fc7bfffe212cee5b3e2a9188f2.zip
Factor out a common base class from SCEVTruncateExpr, SCEVZeroExtendExpr,
and SCEVSignExtendExpr. llvm-svn: 69649
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
index 78198b5e0bf..c436cec26ed 100644
--- a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
@@ -300,12 +300,8 @@ static bool containsAddRecFromDifferentLoop(SCEVHandle S, Loop *L) {
return containsAddRecFromDifferentLoop(DE->getLHS(), L) ||
containsAddRecFromDifferentLoop(DE->getRHS(), L);
#endif
- if (const SCEVTruncateExpr *TE = dyn_cast<SCEVTruncateExpr>(S))
- return containsAddRecFromDifferentLoop(TE->getOperand(), L);
- if (const SCEVZeroExtendExpr *ZE = dyn_cast<SCEVZeroExtendExpr>(S))
- return containsAddRecFromDifferentLoop(ZE->getOperand(), L);
- if (const SCEVSignExtendExpr *SE = dyn_cast<SCEVSignExtendExpr>(S))
- return containsAddRecFromDifferentLoop(SE->getOperand(), L);
+ if (const SCEVCastExpr *CE = dyn_cast<SCEVCastExpr>(S))
+ return containsAddRecFromDifferentLoop(CE->getOperand(), L);
return false;
}
OpenPOWER on IntegriCloud