summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MIRPrinter.cpp
diff options
context:
space:
mode:
authorAlex Lorenz <arphaman@gmail.com>2015-07-13 23:24:34 +0000
committerAlex Lorenz <arphaman@gmail.com>2015-07-13 23:24:34 +0000
commit2eacca86ef2c255bae8eff43056dfa6c57ae7092 (patch)
tree7cf5e2db8512f3ba90e733e02829b93793a19b7c /llvm/lib/CodeGen/MIRPrinter.cpp
parent8c1a9102e620e436b12df5b8c28d90e41aff17ce (diff)
downloadbcm5719-llvm-2eacca86ef2c255bae8eff43056dfa6c57ae7092.tar.gz
bcm5719-llvm-2eacca86ef2c255bae8eff43056dfa6c57ae7092.zip
MIR Serialization: Serialize the sub register indices.
This commit serializes the sub register indices from the register machine operands. Reviewers: Duncan P. N. Exon Smith llvm-svn: 242084
Diffstat (limited to 'llvm/lib/CodeGen/MIRPrinter.cpp')
-rw-r--r--llvm/lib/CodeGen/MIRPrinter.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MIRPrinter.cpp b/llvm/lib/CodeGen/MIRPrinter.cpp
index 9b3918f09c0..d9cd136f985 100644
--- a/llvm/lib/CodeGen/MIRPrinter.cpp
+++ b/llvm/lib/CodeGen/MIRPrinter.cpp
@@ -303,7 +303,9 @@ void MIPrinter::print(const MachineOperand &Op, const TargetRegisterInfo *TRI) {
if (Op.isUndef())
OS << "undef ";
printReg(Op.getReg(), OS, TRI);
- // TODO: Print sub register.
+ // Print the sub register.
+ if (Op.getSubReg() != 0)
+ OS << ':' << TRI->getSubRegIndexName(Op.getSubReg());
break;
case MachineOperand::MO_Immediate:
OS << Op.getImm();
OpenPOWER on IntegriCloud