diff options
author | Jakub Staszak <kubastaszak@gmail.com> | 2012-05-01 23:06:00 +0000 |
---|---|---|
committer | Jakub Staszak <kubastaszak@gmail.com> | 2012-05-01 23:06:00 +0000 |
commit | ce00b440f5d754aaf7196255bc139ce64c260e00 (patch) | |
tree | d952b156541036f53d783511c4fdd93f71af9e61 | |
parent | bf1486057239895198b3e8fdfa994a6daedd3579 (diff) | |
download | external_llvm-ce00b440f5d754aaf7196255bc139ce64c260e00.zip external_llvm-ce00b440f5d754aaf7196255bc139ce64c260e00.tar.gz external_llvm-ce00b440f5d754aaf7196255bc139ce64c260e00.tar.bz2 |
Use dyn_cast instead of checking opcode and cast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155957 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 0f2a5df..d6b866f 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -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; |