Use dyn_cast instead of checking opcode and cast.

llvm-svn: 155957
This commit is contained in:
Jakub Staszak 2012-05-01 23:06:00 +00:00
parent 339380286b
commit cd2353402d
1 changed files with 1 additions and 2 deletions

View File

@ -2246,8 +2246,7 @@ unsigned SelectionDAG::ComputeNumSignBits(SDValue Op, unsigned Depth) const{
}
// Handle LOADX separately here. EXTLOAD case will fallthrough.
if (Op.getOpcode() == ISD::LOAD) {
LoadSDNode *LD = cast<LoadSDNode>(Op);
if (LoadSDNode *LD = dyn_cast<LoadSDNode>(Op)) {
unsigned ExtType = LD->getExtensionType();
switch (ExtType) {
default: break;