From: Mehdi Amini Date: Sun, 23 Aug 2015 00:27:57 +0000 (+0000) Subject: Do not use dyn_cast<> after isa<> X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=939b388b46f46ba2cb12cca94dfe1a87ac1b9a24 Do not use dyn_cast<> after isa<> Reported by coverity. From: Mehdi Amini git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245799 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 53d07b385e3..ab3a6631d33 100644 --- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -12278,7 +12278,7 @@ static SDValue combineConcatVectorOfExtracts(SDNode *N, SelectionDAG &DAG) { EVT ExtVT = ExtVec.getValueType(); if (!isa(Op.getOperand(1))) return SDValue(); - int ExtIdx = dyn_cast(Op.getOperand(1))->getZExtValue(); + int ExtIdx = cast(Op.getOperand(1))->getZExtValue(); // Ensure that we are extracting a subvector from a vector the same // size as the result.