From 449e890f29a52973b318ab9f6ea7eaa8843844a5 Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Sat, 21 Oct 2017 05:37:10 +0000 Subject: [PATCH] [SelectionDAG] Use dyn_cast without cast. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316258 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 63f9198d594..b6e3efe60c2 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -2966,8 +2966,8 @@ unsigned SelectionDAG::ComputeNumSignBits(SDValue Op, const APInt &DemandedElts, unsigned Tmp, Tmp2; unsigned FirstAnswer = 1; - if (isa(Op)) { - const APInt &Val = cast(Op)->getAPIntValue(); + if (auto *C = dyn_cast(Op)) { + const APInt &Val = C->getAPIntValue(); return Val.getNumSignBits(); } -- 2.40.0