[Bug target/100181] New: hot-cold partitioned code doesn't assemble

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Apr 21 12:19:33 GMT 2021


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100181

            Bug ID: 100181
           Summary: hot-cold partitioned code doesn't assemble
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rguenth at gcc dot gnu.org
  Target Milestone: ---

I see lots of libgomp fails with offloading for amdgcn like

./pr93515.xamdgcn-amdhsa.mkoffload.2.s:634:2: error: undefined label '.L33'
        s_branch        .L33
        ^
mkoffload: fatal error: /usr/bin//x86_64-suse-linux-accel-amdgcn-amdhsa-gcc-11
returned 1 exit status

which is because we compile to

        s_branch        .L33
        .section        .text.unlikely
        .type   main._omp_fn.4.cold, @function
main._omp_fn.4.cold:
.L33:
        s_getpc_b64     s[2:3]
        s_add_u32       s2, s2, abort@rel32@lo+4
        s_addc_u32      s3, s3, abort@rel32@hi+4
        s_swappc_b64    s[18:19], s[2:3]
        .text

and thus have a section crossing jump using a local label.  The amdgcn
assembler
I'm using doesn't like this, it is

> amdgcn-amdhsa-as --version
LLVM (http://llvm.org/):
  LLVM version 11.0.1
  Optimized build.
  Default target: x86_64-unknown-linux-gnu
  Host CPU: znver2


More information about the Gcc-bugs mailing list