[llvm] [TargetInstrInfo] enable foldMemoryOperand for InlineAsm (PR #70743)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 16 04:13:11 PST 2023
================
@@ -565,6 +565,64 @@ static MachineInstr *foldPatchpoint(MachineFunction &MF, MachineInstr &MI,
return NewMI;
}
+static void foldInlineAsmMemOperand(MachineInstr *MI, unsigned OpNo, int FI,
+ const TargetInstrInfo &TII) {
+ MachineOperand &MO = MI->getOperand(OpNo);
+ const VirtRegInfo &RI = AnalyzeVirtRegInBundle(*MI, MO.getReg());
+
+ // If the machine operand is tied, untie it first.
+ if (MO.isTied()) {
+ unsigned TiedTo = MI->findTiedOperandIdx(OpNo);
+ MI->untieRegOperand(OpNo);
----------------
qcolombet wrote:
> Correct, but for that case, I would say that the inline asm is invalid [...]
Thanks for the confirmation.
Agree on everything you said :).
(And already approved the PR)
https://github.com/llvm/llvm-project/pull/70743
More information about the llvm-commits
mailing list