[llvm] [InlineAsm] Steal a bit to denote a register is foldable (PR #70738)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 1 22:23:15 PDT 2023


================
@@ -1792,6 +1792,12 @@ void MachineInstr::print(raw_ostream &OS, ModuleSlotTracker &MST,
       if (F.isUseOperandTiedToDef(TiedTo))
         OS << " tiedto:$" << TiedTo;
 
+      if ((F.isRegDefKind() || F.isRegDefEarlyClobberKind() ||
+           F.isRegUseKind()) &&
+          F.getRegMayBeFolded()) {
+        OS << " foldable";
----------------
arsenm wrote:

So right, it doesn't require MIR testing. This is one of the areas where the debug output and MIR are not identical but ideally would be. The magic number with comments in inline asm operands are a pain point for MIR test maintenance 

https://github.com/llvm/llvm-project/pull/70738


More information about the llvm-commits mailing list