mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Change TargetLowering::getCondCodeAction to take an MVT, instead of
EVT. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169842 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1185,7 +1185,7 @@ void SelectionDAGLegalize::LegalizeOp(SDNode *Node) {
|
||||
unsigned CCOperand = Node->getOpcode() == ISD::SELECT_CC ? 4 :
|
||||
Node->getOpcode() == ISD::SETCC ? 2 : 1;
|
||||
unsigned CompareOperand = Node->getOpcode() == ISD::BR_CC ? 2 : 0;
|
||||
EVT OpVT = Node->getOperand(CompareOperand).getValueType();
|
||||
MVT OpVT = Node->getOperand(CompareOperand).getSimpleValueType();
|
||||
ISD::CondCode CCCode =
|
||||
cast<CondCodeSDNode>(Node->getOperand(CCOperand))->get();
|
||||
Action = TLI.getCondCodeAction(CCCode, OpVT);
|
||||
@@ -1592,7 +1592,7 @@ void SelectionDAGLegalize::LegalizeSetCCCondCode(EVT VT,
|
||||
SDValue &LHS, SDValue &RHS,
|
||||
SDValue &CC,
|
||||
DebugLoc dl) {
|
||||
EVT OpVT = LHS.getValueType();
|
||||
MVT OpVT = LHS.getSimpleValueType();
|
||||
ISD::CondCode CCCode = cast<CondCodeSDNode>(CC)->get();
|
||||
switch (TLI.getCondCodeAction(CCCode, OpVT)) {
|
||||
default: llvm_unreachable("Unknown condition code action!");
|
||||
|
@@ -2107,7 +2107,7 @@ TargetLowering::SimplifySetCC(EVT VT, SDValue N0, SDValue N1,
|
||||
case ISD::SETUGE:
|
||||
case ISD::SETULT:
|
||||
case ISD::SETULE: {
|
||||
EVT newVT = N0.getOperand(0).getValueType();
|
||||
MVT newVT = N0.getOperand(0).getSimpleValueType();
|
||||
if (DCI.isBeforeLegalizeOps() ||
|
||||
(isOperationLegal(ISD::SETCC, newVT) &&
|
||||
getCondCodeAction(Cond, newVT)==Legal))
|
||||
@@ -2468,7 +2468,7 @@ TargetLowering::SimplifySetCC(EVT VT, SDValue N0, SDValue N1,
|
||||
// if it is not already.
|
||||
ISD::CondCode NewCond = UOF == 0 ? ISD::SETO : ISD::SETUO;
|
||||
if (NewCond != Cond && (DCI.isBeforeLegalizeOps() ||
|
||||
getCondCodeAction(NewCond, N0.getValueType()) == Legal))
|
||||
getCondCodeAction(NewCond, N0.getSimpleValueType()) == Legal))
|
||||
return DAG.getSetCC(dl, VT, N0, N1, NewCond);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user