================
@@ -11053,6 +11127,40 @@ getBackchainAddress(SDValue SP, SelectionDAG &DAG)
const {
DAG.getIntPtrConstant(TFL->getBackchainOffset(MF), DL));
}
+// Turn MOVE_SG_DAG into MOVE_SG, adding
+// a dead def-reg that will be used as a scratch register
+// when this pseudo is expanded.
+MachineBasicBlock *
+SystemZTargetLowering::emitMSGPseudo(MachineInstr &MI,
+ MachineBasicBlock *MBB) const {
+ MachineRegisterInfo *MRI = &MBB->getParent()->getRegInfo();
+ const SystemZInstrInfo *TII = Subtarget.getInstrInfo();
+ DebugLoc DL = MI.getDebugLoc();
+ Register AddrReg = MRI->createVirtualRegister(&SystemZ::ADDR64BitRegClass);
+ BuildMI(*MBB, MI, DL, TII->get(SystemZ::MOVE_SG), AddrReg)
+ .addFrameIndex(MI.getOperand(0).getIndex())
+ .addImm(MI.getOperand(1).getImm());
+ MI.eraseFromParent();
+ return MBB;
+}
+
+// Turn COMPARE_SG_BRIDGE into COMPARE_SG, adding
+// a dead def-reg that will be used as a scratch register
+// when this pseudo is expanded.
+MachineBasicBlock *
+SystemZTargetLowering::emitCSGPseudo(MachineInstr &MI,
+ MachineBasicBlock *MBB) const {
----------------
uweigand wrote:
I think those two routines should also be merged, similar to what you did in
the AsmPrinter.
https://github.com/llvm/llvm-project/pull/169317
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits