[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp

Chris Lattner lattner at cs.uiuc.edu
Sun Apr 17 21:11:35 PDT 2005



Changes in directory llvm/lib/CodeGen/SelectionDAG:

SelectionDAG.cpp updated: 1.85 -> 1.86
---
Log message:

Another simple xform


---
Diffs of the changes:  (+8 -0)

 SelectionDAG.cpp |    8 ++++++++
 1 files changed, 8 insertions(+)


Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.85 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.86
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.85	Sun Apr 17 22:59:53 2005
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp	Sun Apr 17 23:11:19 2005
@@ -964,6 +964,14 @@
             return getSetCC(Result, LHS->getValueType(0), LL, LR);
         }
       }
+
+    // and/or zext(a), zext(b) -> zext(and/or a, b)
+    if (N1.getOpcode() == ISD::ZERO_EXTEND &&
+        N2.getOpcode() == ISD::ZERO_EXTEND &&
+        N1.getOperand(0).getValueType() == N2.getOperand(0).getValueType())
+      return getNode(ISD::ZERO_EXTEND, VT,
+                     getNode(Opcode, N1.getOperand(0).getValueType(),
+                             N1.getOperand(0), N2.getOperand(0)));
     break;
   case ISD::XOR:
     if (N1 == N2) return getConstant(0, VT);  // xor X, Y -> 0






More information about the llvm-commits mailing list