On Tue, Jun 23, 2020 at 06:44:26PM +0200, Thomas Schwinge wrote:
> On 2020-06-15T21:28:12+0100, Kwok Cheung Yeung <k...@codesourcery.com> wrote:
> > This patch adds support on nvptx for __sync_val_compare_and_swap operations 
> > on
> > 1- and 2-byte values.
> 
> Is this a thorough review that these are the only functions missing, or
> did you just implement what you found missing for some test case you've
> been looking into?  Other architectures' similar libgcc files seem to be
> defining more of such related functions.
> It seems a bit unfortunate to have such a thing outlined in a separate
> function, given we're talking about performance-critical code here?  Even
> more so for GCN, where there's no JIT compiler that can inline it later,
> as it's the case for nvptx?

I think this should really be handled by the backend inline, like many other
targets do it when they only support 32-bit+ and not 8/16-bit atomics.
See e.g. sparc backend.

        Jakub

Reply via email to