https://llvm.org/bugs/show_bug.cgi?id=24631
Bug ID: 24631 Summary: MI Serialization crashes on empty inlineasm Product: libraries Version: trunk Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: Common Code Generator Code Assignee: unassignedb...@nondot.org Reporter: hfin...@anl.gov CC: llvm-bugs@lists.llvm.org Classification: Unclassified Created attachment 14795 --> https://llvm.org/bugs/attachment.cgi?id=14795&action=edit reduced test case $ cat mirp.ll target datalayout = "E-m:e-i64:64-n32:64" target triple = "powerpc64-unknown-linux-gnu" define void @foo() #0 { entry: tail call void asm sideeffect "", "~{memory}"() #0 ret void } attributes #0 = { nounwind } $ llc -stop-after=if-converter < mirp.ll llc: /src/llvm/lib/IR/AsmWriter.cpp:346: void llvm::printLLVMNameWithoutPrefix(llvm::raw_ostream&, llvm::StringRef): Assertion `!Name.empty() && "Cannot get empty name!"' failed. The problem seems related to how llvm::MIPrinter::print handles external symbols, specifically: 789 case MachineOperand::MO_ExternalSymbol: 790 OS << '$'; 791 printLLVMNameWithoutPrefix(OS, Op.getSymbolName()); 792 printOffset(Op.getOffset()); 793 break; printLLVMNameWithoutPrefix cannot be called with an empty name string, but it is in this case because the inline asm string is empty: INLINEASM <es:> [sideeffect] [mayload] [maystore] [attdialect] -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs