On 9/2/20 1:48 PM, Tom de Vries wrote: > On 9/2/20 12:44 PM, Jakub Jelinek wrote: >> On Wed, Sep 02, 2020 at 12:22:28PM +0200, Tom de Vries wrote: >>> And test-case passes on x86_64 with this patch (obviously, in >>> combination with trigger patch above). >>> >>> Jakub, WDYT? >> >> I guess the normal answer would be use libatomic, but it isn't ported for >> nvptx. > > Ah, I was not aware of that one, filed > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96898 to look into that. > >> I guess at least temporarily this is ok, though I'm wondering why >> you need __sync_*_16 rather than __atomic_*_16, > > That's what omp-expand.c uses in expand_omp_atomic_pipeline: > BUILT_IN_SYNC_VAL_COMPARE_AND_SWAP_N . >
I've got an updated version of this patch. It: - no longer supplies the __atomic_load_16, since that's now handled by libatomic - the __sync_val_compare_and_swap now uses __atomic_compare_and_swap, which also falls back on libatomic. I'm currently retesting. Any comments? Otherwise, I'll commit on Monday. Thanks, - Tom