[MIR] Print the type of generic machine instructions.

llvm-svn: 262880
This commit is contained in:
Quentin Colombet 2016-03-08 00:29:15 +00:00
parent 851996778f
commit 12350a8e13
2 changed files with 5 additions and 1 deletions

View File

@ -552,6 +552,10 @@ void MIPrinter::print(const MachineInstr &MI) {
if (MI.getFlag(MachineInstr::FrameSetup))
OS << "frame-setup ";
OS << TII->getName(MI.getOpcode());
if (isPreISelGenericOpcode(MI.getOpcode())) {
assert(MI.getType() && "Generic instructions must have a type");
OS << ' ' << *MI.getType();
}
if (I < E)
OS << ' ';

View File

@ -13,6 +13,6 @@ registers:
body: |
bb.0.entry:
liveins: %edi
; CHECK: %0(32) = G_ADD %edi
; CHECK: %0(32) = G_ADD i32 %edi
%0(32) = G_ADD i32 %edi, %edi
...