mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-10 02:36:06 +00:00
Fold (X > -1) | (Y > -1) --> (X&Y > -1)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21552 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
855adb1ac4
commit
d36f979085
@ -1075,8 +1075,10 @@ SDOperand SelectionDAG::getNode(unsigned Opcode, MVT::ValueType VT,
|
||||
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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user