[llvm-bugs] [Bug 27938] New: The scalarizer pass remove debugloc from call instruction

via llvm-bugs llvm-bugs at lists.llvm.org
Mon May 30 05:14:55 PDT 2016


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

            Bug ID: 27938
           Summary: The scalarizer pass remove debugloc from call
                    instruction
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Scalar Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: karl-johan.karlsson at ericsson.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 16437
  --> https://llvm.org/bugs/attachment.cgi?id=16437&action=edit
Reproducer:  opt -S -scalarizer -o - foo.ll

The scalarizer pass (-scalarizer) remove the debugloc from a call instruction.
The verifier pass later give the error message:

inlinable function call in a function with debug info must have a !dbg location
  %_tmp7 = tail call i16 @f1()
LLVM ERROR: Broken function found, compilation aborted!

The problem seems to be in the method Scalarizer::transferMetadata() that
always transfer the debugloc regardless of if the debugloc that is being
transfered is set or not. I'm also a bit unsure if it is a good idea to
overwrite the debugloc of an instruction that already got a perfectly fine
debugloc, why is it guaranteed that the new one is better?

Reproducer:

opt -S -scalarizer -o - foo.ll

-- 
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/20160530/b37ea468/attachment.html>


More information about the llvm-bugs mailing list