summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineInstr.cpp
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2017-01-09 21:38:10 +0000
committerMatthias Braun <matze@braunis.de>2017-01-09 21:38:10 +0000
commita37430844cfbb1237847505232ccb476f7b5e7bd (patch)
tree2011df850914e0bb5e2328c14dc99e944cb2538d /llvm/lib/CodeGen/MachineInstr.cpp
parentf55ce36c029dd68577743179884ed43d76697937 (diff)
downloadbcm5719-llvm-a37430844cfbb1237847505232ccb476f7b5e7bd.tar.gz
bcm5719-llvm-a37430844cfbb1237847505232ccb476f7b5e7bd.zip
MachineInstr: Print name for subreg index in SUBREG_TO_REG
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. llvm-svn: 291481
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineInstr.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp
index d2ce001103d..2f2e3b3d8e9 100644
--- a/llvm/lib/CodeGen/MachineInstr.cpp
+++ b/llvm/lib/CodeGen/MachineInstr.cpp
@@ -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.
OpenPOWER on IntegriCloud