[Bug target/102215] [GCN offloading] Missing '__atomic_compare_exchange_1' etc.

burnus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Sep 6 11:09:22 GMT 2021


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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |burnus at gcc dot gnu.org

--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #1)
> So what did it do for __sync_val_compare_and_exchange_1 ?
> Was that expanded inline, or do we have such entrypoint somewhere outside of
> libatomic, something else?

For nvptx, it became more exposed as libgomp.c-c++-common/reduction-16.c
required __sync_val_compare_and_swap_16 – but only on PowerPC – such that
config/nvptx/atomic.c was added, which in turn required
__atomic_compare_exchange_n.
Cf. (libgomp) r11-3182 and (libatomic + config/nvptx/nvptx.md) r11-3145 w/
PR96898 + PR96964.

GCN: It seems as everything required so far was handled inline. I did note that
one could create atomic testcases which are not handled and require __atomic_ /
the nonexisting libatomic library.

Regarding libatomic, it is currently disabled for gcn via
libatomic/configure.tgt:

  *)
        # Who are you?
        UNSUPPORTED=1
        ;;
esac

I don't know what's needed to support it, but for nvptx, it were only a few
lines, cf. r11-3145


More information about the Gcc-bugs mailing list