diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp index 21fb9257826..80ecea3d6a9 100644 --- a/lib/VMCore/AsmWriter.cpp +++ b/lib/VMCore/AsmWriter.cpp @@ -1486,7 +1486,7 @@ void AssemblyWriter::printInfoComment(const Value &V) { printType(V.getType()); Out << '>'; - if (!V.hasName()) { + if (!V.hasName() && !isa(V)) { int SlotNum; if (const GlobalValue *GV = dyn_cast(&V)) SlotNum = Machine.getGlobalSlot(GV); @@ -1511,6 +1511,13 @@ void AssemblyWriter::printInstruction(const Instruction &I) { if (I.hasName()) { PrintLLVMName(Out, &I); Out << " = "; + } else if (I.getType() != Type::VoidTy) { + // Print out the def slot taken. + int SlotNum = Machine.getLocalSlot(&I); + if (SlotNum == -1) + Out << " = "; + else + Out << '%' << SlotNum << " = "; } // If this is a volatile load or store, print out the volatile marker.