LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 7545 - X86MCInstLower DWARF exception in -O0 -g test
Summary: X86MCInstLower DWARF exception in -O0 -g test
Status: RESOLVED FIXED
Alias: None
Product: libraries
Classification: Unclassified
Component: Backend: X86 (show other bugs)
Version: trunk
Hardware: Macintosh MacOS X
: P normal
Assignee: Unassigned LLVM Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-01 12:19 PDT by Jakob Stoklund Olesen
Modified: 2010-07-06 13:19 PDT (History)
5 users (show)

See Also:
Fixed By Commit(s):


Attachments
failing bitcode (16.78 KB, application/octet-stream)
2010-07-01 12:20 PDT, Jakob Stoklund Olesen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jakob Stoklund Olesen 2010-07-01 12:19:16 PDT
The attached bitcode files are from the  Geryon-PIC-O0-g__llvm-gcc_PROD__x86_64 nightly tester running on trunk.

The crash llc with an Assertion failed: (MI->getOperand(0).isReg() && MI->getOperand(3).isImm()), function getDebugValueLocation, file lib/Target/X86/AsmPrinter/X86MCInstLower.cpp, line 520

llc -asm-verbose=false -O0 -relocation-model pic -disable-fp-elim Output/office-stringsearch.llvm.bc
Comment 1 Jakob Stoklund Olesen 2010-07-01 12:20:42 PDT
Created attachment 5155 [details]
failing bitcode
Comment 2 Jakob Stoklund Olesen 2010-07-01 12:23:48 PDT
Note I have two more tests with the same assertion, 186.crafty.llvm.bc and 464.h264ref.llvm.bc. They are pretty big, so I won't attach.

They both crash bugpoint, so I can't reduce them: UNREACHABLE executed at /d/g/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp:904!
Comment 3 Chris Lattner 2010-07-04 17:33:58 PDT
Devang/Dale, this is dying in:


MachineLocation 
X86AsmPrinter::getDebugValueLocation(const MachineInstr *MI) const {
  MachineLocation Location;
  assert (MI->getNumOperands() == 7 && "Invalid no. of machine operands!");
  // Frame address.  Currently handles register +- offset only.
  assert(MI->getOperand(0).isReg() && MI->getOperand(3).isImm());
  Location.set(MI->getOperand(0).getReg(), MI->getOperand(3).getImm());
  return Location;
}

The DBG_VALUE is actually:


(gdb) call MI->dump()
  DBG_VALUE %RIP, 1, %reg0, <ga:@C.9.2167>, %reg0, 0, !"find_strings"; dbg:pbmsrch.c:73

causing the crash.  Please investigate, I assume the assert just needs to be loosened up or something.
Comment 4 Devang Patel 2010-07-06 13:19:14 PDT
Fixed the crash. r107678.
File PR 7577 to track missing debug info.