From: Sanjoy Das Date: Wed, 15 Jun 2016 06:53:51 +0000 (+0000) Subject: [SCEV] Use cast<> instead of dyn_cast; NFC X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2fbb228ebde164a5c725c642fd8f649c3909ef51;p=llvm [SCEV] Use cast<> instead of dyn_cast; NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272758 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp index d797d1a0f3f..d2157443b24 100644 --- a/lib/Analysis/ScalarEvolution.cpp +++ b/lib/Analysis/ScalarEvolution.cpp @@ -8674,8 +8674,7 @@ ScalarEvolution::howManyLessThans(const SCEV *LHS, const SCEV *RHS, // overflow, in which case if RHS - Start is a constant, we don't need to // do a max operation since we can just figure it out statically if (NoWrap && isa(Diff)) { - APInt D = dyn_cast(Diff)->getAPInt(); - if (D.isNegative()) + if (cast(Diff)->getAPInt().isNegative()) End = Start; } else End = IsSigned ? getSMaxExpr(RHS, Start) @@ -8761,8 +8760,7 @@ ScalarEvolution::howManyGreaterThans(const SCEV *LHS, const SCEV *RHS, // overflow, in which case if RHS - Start is a constant, we don't need to // do a max operation since we can just figure it out statically if (NoWrap && isa(Diff)) { - APInt D = dyn_cast(Diff)->getAPInt(); - if (!D.isNegative()) + if (!cast(Diff)->getAPInt().isNegative()) End = Start; } else End = IsSigned ? getSMinExpr(RHS, Start)