[llvm-bugs] [Bug 34231] New: "inlinable function call in a function with debug info must have a !dbg location" after running -reassociate

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Aug 18 02:33:04 PDT 2017


https://bugs.llvm.org/show_bug.cgi?id=34231

            Bug ID: 34231
           Summary: "inlinable function call in a function with debug info
                    must have a !dbg location" after running -reassociate
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: david.stenberg at ericsson.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 19003
  --> https://bugs.llvm.org/attachment.cgi?id=19003&action=edit
Reduced reproducer.

When running the following command-line using opt from top-of-trunk (r311044):

    $ opt -S -reassociate -o /dev/null reproducer.ll

the following crash is seen when running the Reassociate pass:

    inlinable function call in a function with debug info must have a !dbg
location
      %inlinable_call = call i16 @fn1()
    opt: ../lib/IR/Verifier.cpp:4683: virtual bool (anonymous
namespace)::VerifierLegacyPass::doFinalization(llvm::Module &): Assertion
`!V->hasBrokenDebugInfo() && "Module contains invalid debug info"' failed.
    #0 0x00000000030cbb5c llvm::sys::PrintStackTrace(llvm::raw_ostream&)
/repo/llvm-master/build-all-Debug/../lib/Support/Unix/Signals.inc:398:5
    #1 0x00000000030cbd09 PrintStackTraceSignalHandler(void*)
/repo/llvm-master/build-all-Debug/../lib/Support/Unix/Signals.inc:462:1
    #2 0x00000000030ca303 llvm::sys::RunSignalHandlers()
/repo/llvm-master/build-all-Debug/../lib/Support/Signals.cpp:50:5
    #3 0x00000000030cc34e SignalHandler(int)
/repo/llvm-master/build-all-Debug/../lib/Support/Unix/Signals.inc:252:1
    #4 0x00007f08b1d46850 __restore_rt (/lib64/libpthread.so.0+0xf850)
    #5 0x00007f08b0ef1875 __GI_raise (/lib64/libc.so.6+0x32875)
    #6 0x00007f08b0ef2e51 __GI_abort (/lib64/libc.so.6+0x33e51)
    #7 0x00007f08b0eea740 __GI___assert_fail (/lib64/libc.so.6+0x2b740)
    #8 0x00000000029583da (anonymous
namespace)::VerifierLegacyPass::doFinalization(llvm::Module&)
/repo/llvm-master/build-all-Debug/../lib/IR/Verifier.cpp:4684:5
    #9 0x00000000028c975c llvm::FPPassManager::doFinalization(llvm::Module&)
/repo/llvm-master/build-all-Debug/../lib/IR/LegacyPassManager.cpp:1553:16
    #10 0x00000000028ca081 (anonymous
namespace)::MPPassManager::runOnModule(llvm::Module&)
/repo/llvm-master/build-all-Debug/../lib/IR/LegacyPassManager.cpp:1609:16
    #11 0x00000000028c98fb llvm::legacy::PassManagerImpl::run(llvm::Module&)
/repo/llvm-master/build-all-Debug/../lib/IR/LegacyPassManager.cpp:1694:16
    #12 0x00000000028ca341 llvm::legacy::PassManager::run(llvm::Module&)
/repo/llvm-master/build-all-Debug/../lib/IR/LegacyPassManager.cpp:1725:3
    #13 0x0000000000b3e77f main
/repo/llvm-master/build-all-Debug/../tools/opt/opt.cpp:756:3
    #14 0x00007f08b0eddc36 __libc_start_main (/lib64/libc.so.6+0x1ec36)
    #15 0x0000000000b13239 _start
/usr/src/packages/BUILD/glibc-2.11.3/csu/../sysdeps/x86_64/elf/start.S:116:0
    Stack dump:
    0.  Program arguments: /repo/llvm-master/build-all-Debug/./bin/opt -S
-reassociate -o /dev/null reproducer.ll

The

    %inlinable_call = call i16 @fn1(), !dbg !7

instruction's debug location is dropped when replacing it with the debug
location for

    %dbgless_instruction = or i16 %inlinable_call, 0

when running ReassociatePass::ReassociateExpression:

    2133     if (Instruction *VI = dyn_cast<Instruction>(V))
    2134       VI->setDebugLoc(I->getDebugLoc());

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170818/3d22a14d/attachment-0001.html>


More information about the llvm-bugs mailing list