Closed llvmbot closed 4 years ago
Vedant wrote a verifier check, this is invalid MIR (but we didn't catch it before)
FWIW, I wrote this patch (https://reviews.llvm.org/D80602), to fix this bug (#46009 ) and that caused one of the tests in the suite to fail. I wonder if me setting the debug location to an empty one before splicing is wrong somehow.
Hmmm, in the bb.4.if.else block:
DBG_VALUE $rdx, $noreg, !69, !DIExpression()
As you say, there's no DebugLoc attachment on this DBG_VALUE. IMO, the DBG_VALUE there is illegal, as we can't get any inlining information out of it. A dbg.value intrinsic without a !dbg attachment is an IR verifier error. Whatever's producing this DBG_VALUE is wrong.
Just running llc from e2b134b01a6 over the embedded IR doesn't produce the same MIR for me though, I get the same block 4, but both instructions have DebugLocs.
Looks like the DebugLoc here is nullptr
frame #​3: 0x0000000102958934 llc`(anonymous namespace)::LiveDebugValues::accumulateFragmentMap(this=0x000000011432d110, MI=0x0000000115071280, SeenFragments=0x00007ffeefbfe008, OverlappingFragments=0x00007ffeefbfe078) at LiveDebugValues.cpp:1416:41
1413 VarToFragments &SeenFragments,
1414 OverlapMap &OverlappingFragments) {
1415 DebugVariable MIVar(MI.getDebugVariable(), MI.getDebugExpression(),
-> 1416 MI.getDebugLoc()->getInlinedAt());
1417 FragmentInfo ThisFragment = MIVar.getFragmentOrDefault();
1418
1419 // If this is the first sighting of this variable, then we are guaranteed
(lldb) p MI.getDebugLoc()
(const llvm::DebugLoc) $1 = {
Loc = {
Ref = {
MD = 0x0000000000000000
}
}
}
Extended Description
$ ./llc -run-pass=livedebugvalues foo.mir
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace. Stack dump: