Use cast<> for unchecked use

llvm-svn: 208618
This commit is contained in:
Matt Arsenault 2014-05-12 19:26:38 +00:00
parent 4d64f96530
commit b3ee388594
1 changed files with 2 additions and 2 deletions

View File

@ -1822,8 +1822,8 @@ FoldOperand(SDNode *ParentNode, unsigned SrcIdx, SDValue &Src, SDValue &Neg,
if (RegisterSDNode *Reg =
dyn_cast<RegisterSDNode>(ParentNode->getOperand(OtherSrcIdx))) {
if (Reg->getReg() == AMDGPU::ALU_CONST) {
ConstantSDNode *Cst = dyn_cast<ConstantSDNode>(
ParentNode->getOperand(OtherSelIdx));
ConstantSDNode *Cst
= cast<ConstantSDNode>(ParentNode->getOperand(OtherSelIdx));
Consts.push_back(Cst->getZExtValue());
}
}