[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Chris Lattner
lattner at cs.uiuc.edu
Mon Apr 25 18:18:50 PDT 2005
Changes in directory llvm/lib/CodeGen/SelectionDAG:
SelectionDAG.cpp updated: 1.94 -> 1.95
---
Log message:
Fold (X > -1) | (Y > -1) --> (X&Y > -1)
---
Diffs of the changes: (+3 -1)
SelectionDAG.cpp | 4 +++-
1 files changed, 3 insertions(+), 1 deletion(-)
Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.94 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.95
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.94 Mon Apr 25 16:20:28 2005
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Mon Apr 25 20:18:33 2005
@@ -1075,8 +1075,10 @@
if (cast<ConstantSDNode>(LR)->isAllOnesValue()) {
// (X == -1) & (Y == -1) -> (X&Y == -1)
// (X != -1) | (Y != -1) -> (X&Y != -1)
+ // (X > -1) | (Y > -1) -> (X&Y > -1)
if ((Opcode == ISD::AND && Op2 == ISD::SETEQ) ||
- (Opcode == ISD::OR && Op2 == ISD::SETNE))
+ (Opcode == ISD::OR && Op2 == ISD::SETNE) ||
+ (Opcode == ISD::OR && Op2 == ISD::SETGT))
return getSetCC(Op2, VT,
getNode(ISD::AND, LR.getValueType(), LL, RL), LR);
// (X > -1) & (Y > -1) -> (X|Y > -1)
More information about the llvm-commits
mailing list