From 939b388b46f46ba2cb12cca94dfe1a87ac1b9a24 Mon Sep 17 00:00:00 2001 From: Mehdi Amini Date: Sun, 23 Aug 2015 00:27:57 +0000 Subject: [PATCH] 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 --- lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. -- 2.34.1