[llvm-commits] [llvm] r59090 - /llvm/trunk/lib/Target/Alpha/AlphaInstrInfo.td

Andrew Lenharth alenhar2 at cs.uiuc.edu
Tue Nov 11 15:19:51 PST 2008


Author: alenhar2
Date: Tue Nov 11 17:19:51 2008
New Revision: 59090

URL: http://llvm.org/viewvc/llvm-project?rev=59090&view=rev
Log:
This shouldn't be necessary

Modified:
    llvm/trunk/lib/Target/Alpha/AlphaInstrInfo.td

Modified: llvm/trunk/lib/Target/Alpha/AlphaInstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Alpha/AlphaInstrInfo.td?rev=59090&r1=59089&r2=59090&view=diff

==============================================================================
--- llvm/trunk/lib/Target/Alpha/AlphaInstrInfo.td (original)
+++ llvm/trunk/lib/Target/Alpha/AlphaInstrInfo.td Tue Nov 11 17:19:51 2008
@@ -93,7 +93,8 @@
 }], SExt16>;
 
 def zappat : PatFrag<(ops node:$LHS), (and node:$LHS, imm:$L), [{
-  ConstantSDNode *RHS = cast<ConstantSDNode>(N->getOperand(1));
+  ConstantSDNode *RHS = dyn_cast<ConstantSDNode>(N->getOperand(1));
+  if (!RHS) return 0;
   uint64_t build = get_zapImm(N->getOperand(0), (uint64_t)RHS->getZExtValue());
   return build != 0;
 }]>;





More information about the llvm-commits mailing list