[LLVMbugs] [Bug 22417] New: ARM doesn't respect the DbgLoc of a comparison used in a branch

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Jan 30 15:03:48 PST 2015


http://llvm.org/bugs/show_bug.cgi?id=22417

            Bug ID: 22417
           Summary: ARM doesn't respect the DbgLoc of a comparison used in
                    a branch
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Keywords: wrong-debug
          Severity: normal
          Priority: P
         Component: Backend: ARM
          Assignee: unassignedbugs at nondot.org
          Reporter: dblaikie at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Code like:

  %tobool = icmp ..., !dbg !10
  br i1 %tobool, ..., !dbg !11
  ....
  !10 = !MDLocation(line: 2, ...
  !11 = !MDLocation(line: 3, ...

Generates 

  CMPri %vreg7<kill>, 0, pred:14, pred:%noreg, %CPSR<imp-def>; GPR:%vreg7
dbg:line.cpp:3
  Bcc <BB#2>, pred:0, pred:%CPSR; dbg:line.cpp:3

losing the correct location (line 2) in the comparison instruction.

This seems to be because br_cc is considered legal, so the brcond and
comparison is merged into a br_cc, then it's split out again (by a MorphNodeTo
call).

That's my /really vague/ understanding, anyway. Much of that analysis may be
hokum because I'm not very familiar with SelectionDAG, etc.

Test case test/DebugInfo/ARM/line.test is the authoritative demonstration of
the buggy behavior.

-- 
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/20150130/2069217b/attachment.html>


More information about the llvm-bugs mailing list