Do not use dyn_cast<> after isa<>

Reported by coverity.

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 245799
This commit is contained in:
Mehdi Amini 2015-08-23 00:27:57 +00:00
parent ce536a596b
commit 5aa7bd7d62
1 changed files with 1 additions and 1 deletions

View File

@ -12278,7 +12278,7 @@ static SDValue combineConcatVectorOfExtracts(SDNode *N, SelectionDAG &DAG) {
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.