]> granicus.if.org Git - llvm/commitdiff
MachineInstr: Print name for subreg index in SUBREG_TO_REG
authorMatthias Braun <matze@braunis.de>
Mon, 9 Jan 2017 21:38:10 +0000 (21:38 +0000)
committerMatthias Braun <matze@braunis.de>
Mon, 9 Jan 2017 21:38:10 +0000 (21:38 +0000)
SUBREG_TO_REG takes a subregister index as 3rd operand, print the name
instead of a number. We already do the same for INSERT_SUBREG and
REG_SEQUENCE.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291481 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/MachineInstr.cpp

index d2ce001103df4bc420c9f8461a1760f7a6e7a49a..2f2e3b3d8e9f19462fef2324ea7c1ec5caff2b4a 100644 (file)
@@ -1840,7 +1840,8 @@ void MachineInstr::print(raw_ostream &OS, ModuleSlotTracker &MST,
         OS << "!\"" << DIV->getName() << '\"';
       else
         MO.print(OS, MST, TRI);
-    } else if (TRI && (isInsertSubreg() || isRegSequence()) && MO.isImm()) {
+    } else if (TRI && (isInsertSubreg() || isRegSequence() ||
+                       (isSubregToReg() && i == 3)) && MO.isImm()) {
       OS << TRI->getSubRegIndexName(MO.getImm());
     } else if (i == AsmDescOp && MO.isImm()) {
       // Pretty print the inline asm operand descriptor.