[llvm-bugs] [Bug 42547] New: asm goto should not emit debug info at -g0

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Jul 8 13:34:48 PDT 2019


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

            Bug ID: 42547
           Summary: asm goto should not emit debug info at -g0
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangbugs at nondot.org
          Reporter: ndesaulniers at google.com
                CC: craig.topper at gmail.com, llvm-bugs at lists.llvm.org,
                    neeilans at live.com, richard-llvm at metafoo.co.uk,
                    srhines at google.com

small bug, but:

void foo(void) {
    for (int j = 0; j < 3; ++j) {
        // looks like bar gets "unrolled" while baz does not
        asm goto(".quad %l0\n\t.quad %l1" :: "i"(&&baz) :: bar);
        bar:;
        baz:;
    }
}

generates:
  callbr void asm sideeffect ".quad ${0:l}\0A\09.quad ${1:l}",
"i,X,~{dirflag},~{fpsr},~{flags}"(i8* blockaddress(@foo, %8), i8*
blockaddress(@foo, %7)) #1
          to label %6 [label %7], !srcloc !2

I don't think the #1, or !srcloc !2 should be emitted at -g0.  I suspect
there's a missing check for this a flag set by g0?

-- 
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/20190708/c571fe59/attachment.html>


More information about the llvm-bugs mailing list