[llvm] r245799 - Do not use dyn_cast<> after isa<>
Mehdi Amini via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 22 17:27:58 PDT 2015
Author: mehdi_amini
Date: Sat Aug 22 19:27:57 2015
New Revision: 245799
URL: http://llvm.org/viewvc/llvm-project?rev=245799&view=rev
Log:
Do not use dyn_cast<> after isa<>
Reported by coverity.
From: Mehdi Amini <mehdi.amini at apple.com>
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=245799&r1=245798&r2=245799&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Sat Aug 22 19:27:57 2015
@@ -12278,7 +12278,7 @@ static SDValue combineConcatVectorOfExtr
EVT ExtVT = ExtVec.getValueType();
if (!isa<ConstantSDNode>(Op.getOperand(1)))
return SDValue();
- int ExtIdx = dyn_cast<ConstantSDNode>(Op.getOperand(1))->getZExtValue();
+ int ExtIdx = cast<ConstantSDNode>(Op.getOperand(1))->getZExtValue();
// Ensure that we are extracting a subvector from a vector the same
// size as the result.
More information about the llvm-commits
mailing list