[nvptx] Use atom.and.b64 instead of atom.b64.and
authorTom de Vries <tdevries@suse.de>
Mon, 7 Mar 2022 13:59:02 +0000 (14:59 +0100)
committerTom de Vries <tdevries@suse.de>
Thu, 10 Mar 2022 11:19:47 +0000 (12:19 +0100)
commit248bbcb2c3212bcb9f2a485b591dd37371133402
tree71896f069b060d7ab00aae3183239173b82a492f
parent975e7ade35095839b4dd2cc0f2b303bd63950db9
[nvptx] Use atom.and.b64 instead of atom.b64.and

The ptx manual prescribes the instruction format atom{.space}.op.type but the
compiler currently emits:
...
  atom.b64.and %r31, [%r30], %r32;
...
which uses the instruction format atom{.space}.type.op.

Fix this by emitting instead:
...
  atom.and.b64  %r31, [%r30], %r32;
...

Tested on nvptx.

gcc/ChangeLog:

2022-03-07  Tom de Vries  <tdevries@suse.de>

* config/nvptx/nvptx.md (define_insn "atomic_fetch_<logic><mode>"):
Emit atom.and.b64 instead of atom.b64.and.

gcc/testsuite/ChangeLog:

2022-03-07  Tom de Vries  <tdevries@suse.de>

* gcc.target/nvptx/atomic_fetch-1.c: Update.
* gcc.target/nvptx/atomic_fetch-2.c: Update.
gcc/config/nvptx/nvptx.md
gcc/testsuite/gcc.target/nvptx/atomic_fetch-1.c
gcc/testsuite/gcc.target/nvptx/atomic_fetch-2.c