From 082d6b653694185d4049c3823eecc2a98c3aef58 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Tue, 20 Jul 2010 16:32:11 +0000 Subject: [PATCH] Minor code cleanups. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108848 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/ScalarEvolutionNormalization.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/Analysis/ScalarEvolutionNormalization.cpp b/lib/Analysis/ScalarEvolutionNormalization.cpp index 565b6f3507c..d9e909c9566 100644 --- a/lib/Analysis/ScalarEvolutionNormalization.cpp +++ b/lib/Analysis/ScalarEvolutionNormalization.cpp @@ -69,6 +69,7 @@ const SCEV *llvm::TransformForPostIncUse(TransformKind Kind, DominatorTree &DT) { if (isa(S) || isa(S)) return S; + if (const SCEVCastExpr *X = dyn_cast(S)) { const SCEV *O = X->getOperand(); const SCEV *N = TransformForPostIncUse(Kind, O, User, OperandValToReplace, @@ -82,9 +83,11 @@ const SCEV *llvm::TransformForPostIncUse(TransformKind Kind, } return S; } + if (const SCEVNAryExpr *X = dyn_cast(S)) { SmallVector Operands; bool Changed = false; + // Transform each operand. for (SCEVNAryExpr::op_iterator I = X->op_begin(), E = X->op_end(); I != E; ++I) { const SCEV *O = *I; @@ -134,6 +137,7 @@ const SCEV *llvm::TransformForPostIncUse(TransformKind Kind, } return S; } + if (const SCEVUDivExpr *X = dyn_cast(S)) { const SCEV *LO = X->getLHS(); const SCEV *RO = X->getRHS(); @@ -145,6 +149,7 @@ const SCEV *llvm::TransformForPostIncUse(TransformKind Kind, return SE.getUDivExpr(LN, RN); return S; } + llvm_unreachable("Unexpected SCEV kind!"); return 0; }