mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
Adjust to CopyFromReg changes, implement deletion of truncating/extending
stores/loads. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19562 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -220,6 +220,29 @@ void SelectionDAG::DeleteNodeIfDead(SDNode *N, void *NodeSet) {
|
||||
N->getOperand(1)),
|
||||
cast<SetCCSDNode>(N)->getCondition()));
|
||||
break;
|
||||
case ISD::TRUNCSTORE: {
|
||||
EVTStruct NN;
|
||||
NN.Opcode = ISD::TRUNCSTORE;
|
||||
NN.VT = N->getValueType(0);
|
||||
NN.EVT = cast<MVTSDNode>(N)->getExtraValueType();
|
||||
NN.Ops.push_back(N->getOperand(0));
|
||||
NN.Ops.push_back(N->getOperand(1));
|
||||
NN.Ops.push_back(N->getOperand(2));
|
||||
MVTSDNodes.erase(NN);
|
||||
break;
|
||||
}
|
||||
case ISD::EXTLOAD:
|
||||
case ISD::SEXTLOAD:
|
||||
case ISD::ZEXTLOAD: {
|
||||
EVTStruct NN;
|
||||
NN.Opcode = N->getOpcode();
|
||||
NN.VT = N->getValueType(0);
|
||||
NN.EVT = cast<MVTSDNode>(N)->getExtraValueType();
|
||||
NN.Ops.push_back(N->getOperand(0));
|
||||
NN.Ops.push_back(N->getOperand(1));
|
||||
MVTSDNodes.erase(NN);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
if (N->getNumOperands() == 1)
|
||||
UnaryOps.erase(std::make_pair(N->getOpcode(),
|
||||
@@ -861,7 +884,7 @@ SDOperand SelectionDAG::getNode(unsigned Opcode, MVT::ValueType VT,SDOperand N1,
|
||||
|
||||
SDNode *&N = MVTSDNodes[NN];
|
||||
if (N) return SDOperand(N, 0);
|
||||
N = new MVTSDNode(Opcode, VT, N1, N2, EVT);
|
||||
N = new MVTSDNode(Opcode, VT, MVT::Other, N1, N2, EVT);
|
||||
AllNodes.push_back(N);
|
||||
return SDOperand(N, 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user