From 84923602fdc2a81957e5dee178d5737ad8e72f55 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Tue, 21 Apr 2009 01:25:57 +0000 Subject: Factor out a common base class from SCEVTruncateExpr, SCEVZeroExtendExpr, and SCEVSignExtendExpr. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69649 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Scalar/LoopStrengthReduce.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'lib/Transforms/Scalar/LoopStrengthReduce.cpp') diff --git a/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/lib/Transforms/Scalar/LoopStrengthReduce.cpp index 78198b5e0b..c436cec26e 100644 --- a/lib/Transforms/Scalar/LoopStrengthReduce.cpp +++ b/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(S)) - return containsAddRecFromDifferentLoop(TE->getOperand(), L); - if (const SCEVZeroExtendExpr *ZE = dyn_cast(S)) - return containsAddRecFromDifferentLoop(ZE->getOperand(), L); - if (const SCEVSignExtendExpr *SE = dyn_cast(S)) - return containsAddRecFromDifferentLoop(SE->getOperand(), L); + if (const SCEVCastExpr *CE = dyn_cast(S)) + return containsAddRecFromDifferentLoop(CE->getOperand(), L); return false; } -- cgit v1.2.3-70-g09d2