mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-25 10:27:04 +00:00
Implement cond ? -1 : 0 with sbb.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94490 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -3220,6 +3220,14 @@ SDValue DAGCombiner::visitSIGN_EXTEND(SDNode *N) {
|
||||
NegOne, DAG.getConstant(0, VT),
|
||||
cast<CondCodeSDNode>(N0.getOperand(2))->get(), true);
|
||||
if (SCC.getNode()) return SCC;
|
||||
if (!LegalOperations ||
|
||||
TLI.isOperationLegal(ISD::SETCC, TLI.getSetCCResultType(VT)))
|
||||
return DAG.getNode(ISD::SELECT, N->getDebugLoc(), VT,
|
||||
DAG.getSetCC(N->getDebugLoc(),
|
||||
TLI.getSetCCResultType(VT),
|
||||
N0.getOperand(0), N0.getOperand(1),
|
||||
cast<CondCodeSDNode>(N0.getOperand(2))->get()),
|
||||
NegOne, DAG.getConstant(0, VT));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user