[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPC32ISelDAGToDAG.cpp

Chris Lattner lattner at cs.uiuc.edu
Mon Aug 29 17:59:27 PDT 2005



Changes in directory llvm/lib/Target/PowerPC:

PPC32ISelDAGToDAG.cpp updated: 1.55 -> 1.56
---
Log message:

The first operand to AND does not always have more than two operands. This
fixes MediaBench/toast with the dag selector


---
Diffs of the changes:  (+2 -1)

 PPC32ISelDAGToDAG.cpp |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)


Index: llvm/lib/Target/PowerPC/PPC32ISelDAGToDAG.cpp
diff -u llvm/lib/Target/PowerPC/PPC32ISelDAGToDAG.cpp:1.55 llvm/lib/Target/PowerPC/PPC32ISelDAGToDAG.cpp:1.56
--- llvm/lib/Target/PowerPC/PPC32ISelDAGToDAG.cpp:1.55	Mon Aug 29 19:30:43 2005
+++ llvm/lib/Target/PowerPC/PPC32ISelDAGToDAG.cpp	Mon Aug 29 19:59:16 2005
@@ -167,7 +167,8 @@
   unsigned Shift  = 32;
   unsigned Indeterminant = ~0;  // bit mask marking indeterminant results
   unsigned Opcode = N->getOpcode();
-  if (!isIntImmediate(N->getOperand(1).Val, Shift) || (Shift > 31))
+  if (N->getNumOperands() != 2 ||
+      !isIntImmediate(N->getOperand(1).Val, Shift) || (Shift > 31))
     return false;
   
   if (Opcode == ISD::SHL) {






More information about the llvm-commits mailing list