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: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected],
                    [email protected]

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.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to