mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-01 16:31:13 +00:00
Let the combiner handle more cases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23641 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
829cb81806
commit
0558f61b0c
@ -854,6 +854,7 @@ SDOperand SelectionDAG::SimplifySetCC(MVT::ValueType VT, SDOperand N1,
|
|||||||
return getSetCC(VT, N2, N1, ISD::getSetCCSwappedOperands(Cond));
|
return getSetCC(VT, N2, N1, ISD::getSetCCSwappedOperands(Cond));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!CombinerEnabled) {
|
||||||
if (N1 == N2) {
|
if (N1 == N2) {
|
||||||
// We can always fold X == Y for integer setcc's.
|
// We can always fold X == Y for integer setcc's.
|
||||||
if (MVT::isInteger(N1.getValueType()))
|
if (MVT::isInteger(N1.getValueType()))
|
||||||
@ -979,7 +980,7 @@ SDOperand SelectionDAG::SimplifySetCC(MVT::ValueType VT, SDOperand N1,
|
|||||||
N1 = getNode(ISD::ZERO_EXTEND, VT, N1);
|
N1 = getNode(ISD::ZERO_EXTEND, VT, N1);
|
||||||
return N1;
|
return N1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// Could not fold it.
|
// Could not fold it.
|
||||||
return SDOperand();
|
return SDOperand();
|
||||||
}
|
}
|
||||||
@ -1807,6 +1808,7 @@ SDOperand SelectionDAG::getNode(unsigned Opcode, MVT::ValueType VT,
|
|||||||
|
|
||||||
if (N2 == N3) return N2; // select C, X, X -> X
|
if (N2 == N3) return N2; // select C, X, X -> X
|
||||||
|
|
||||||
|
if (!CombinerEnabled) {
|
||||||
if (VT == MVT::i1) { // Boolean SELECT
|
if (VT == MVT::i1) { // Boolean SELECT
|
||||||
if (N2C) {
|
if (N2C) {
|
||||||
if (N2C->getValue()) // select C, 1, X -> C | X
|
if (N2C->getValue()) // select C, 1, X -> C | X
|
||||||
@ -1834,6 +1836,7 @@ SDOperand SelectionDAG::getNode(unsigned Opcode, MVT::ValueType VT,
|
|||||||
N3, cast<CondCodeSDNode>(N1.getOperand(2))->get());
|
N3, cast<CondCodeSDNode>(N1.getOperand(2))->get());
|
||||||
if (Simp.Val) return Simp;
|
if (Simp.Val) return Simp;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case ISD::BRCOND:
|
case ISD::BRCOND:
|
||||||
if (N2C)
|
if (N2C)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user