[MIR] Add support for addrspace in MIR
Add support for printing / parsing the addrspace of a MachineMemOperand.
Fixes PR35970.
Differential Revision: https://reviews.llvm.org/D42502
llvm-svn: 323521
diff --git a/llvm/lib/CodeGen/MIRPrinter.cpp b/llvm/lib/CodeGen/MIRPrinter.cpp
index 0931617..658b596 100644
--- a/llvm/lib/CodeGen/MIRPrinter.cpp
+++ b/llvm/lib/CodeGen/MIRPrinter.cpp
@@ -892,6 +892,8 @@
OS << ", !range ";
Op.getRanges()->printAsOperand(OS, MST);
}
+ if (unsigned AS = Op.getAddrSpace())
+ OS << ", addrspace " << AS;
OS << ')';
}