mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-29 10:25:12 +00:00
Lower add (mul a, b), c into MACCU / MACCS nodes which translate
directly to the maccu / maccs instructions. We handle this in ExpandADDSUB since after type legalisation it is messy to recognise these operations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98150 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -208,6 +208,18 @@ SDNode *XCoreDAGToDAGISel::Select(SDNode *N) {
|
||||
return CurDAG->getMachineNode(XCore::LSUB_l5r, dl, MVT::i32, MVT::i32,
|
||||
Ops, 3);
|
||||
}
|
||||
case XCoreISD::MACCU: {
|
||||
SDValue Ops[] = { N->getOperand(0), N->getOperand(1),
|
||||
N->getOperand(2), N->getOperand(3) };
|
||||
return CurDAG->getMachineNode(XCore::MACCU_l4r, dl, MVT::i32, MVT::i32,
|
||||
Ops, 4);
|
||||
}
|
||||
case XCoreISD::MACCS: {
|
||||
SDValue Ops[] = { N->getOperand(0), N->getOperand(1),
|
||||
N->getOperand(2), N->getOperand(3) };
|
||||
return CurDAG->getMachineNode(XCore::MACCS_l4r, dl, MVT::i32, MVT::i32,
|
||||
Ops, 4);
|
||||
}
|
||||
// Other cases are autogenerated.
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user