diff options
author | Dan Gohman <gohman@apple.com> | 2008-08-20 15:24:22 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-08-20 15:24:22 +0000 |
commit | 67ca6be16ae434f3edab0b6927fa80d04ad0828e (patch) | |
tree | b83157cfd315814216d610b45230a55c9c071792 /lib/Target/Alpha/AlphaInstrInfo.td | |
parent | c53ec498857aa3e6d4fc17bd67dd282dcfc821da (diff) | |
download | external_llvm-67ca6be16ae434f3edab0b6927fa80d04ad0828e.zip external_llvm-67ca6be16ae434f3edab0b6927fa80d04ad0828e.tar.gz external_llvm-67ca6be16ae434f3edab0b6927fa80d04ad0828e.tar.bz2 |
Tablegen generated code already tests the opcode value, so it's not
necessary to use dyn_cast in these predicates.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55055 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Alpha/AlphaInstrInfo.td')
-rw-r--r-- | lib/Target/Alpha/AlphaInstrInfo.td | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/Target/Alpha/AlphaInstrInfo.td b/lib/Target/Alpha/AlphaInstrInfo.td index 5078893..2dc39eb 100644 --- a/lib/Target/Alpha/AlphaInstrInfo.td +++ b/lib/Target/Alpha/AlphaInstrInfo.td @@ -89,11 +89,9 @@ def immSExt16int : PatLeaf<(imm), [{ //(int)imm fits in a 16 bit sign extended }], SExt16>; def zappat : PatFrag<(ops node:$LHS), (and node:$LHS, imm:$L), [{ - if (ConstantSDNode *RHS = dyn_cast<ConstantSDNode>(N->getOperand(1))) { - uint64_t build = get_zapImm(N->getOperand(0), (uint64_t)RHS->getValue()); - return build != 0; - } - return false; + ConstantSDNode *RHS = cast<ConstantSDNode>(N->getOperand(1)); + uint64_t build = get_zapImm(N->getOperand(0), (uint64_t)RHS->getValue()); + return build != 0; }]>; def immFPZ : PatLeaf<(fpimm), [{ //the only fpconstant nodes are +/- 0.0 |