diff options
author | Tom de Vries <tdevries@suse.de> | 2022-03-07 14:59:02 +0100 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2022-03-10 12:19:47 +0100 |
commit | 248bbcb2c3212bcb9f2a485b591dd37371133402 (patch) | |
tree | 71896f069b060d7ab00aae3183239173b82a492f /gcc/config/nvptx | |
parent | 975e7ade35095839b4dd2cc0f2b303bd63950db9 (diff) | |
download | gcc-248bbcb2c3212bcb9f2a485b591dd37371133402.zip gcc-248bbcb2c3212bcb9f2a485b591dd37371133402.tar.gz gcc-248bbcb2c3212bcb9f2a485b591dd37371133402.tar.bz2 |
[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.
Diffstat (limited to 'gcc/config/nvptx')
-rw-r--r-- | gcc/config/nvptx/nvptx.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/config/nvptx/nvptx.md b/gcc/config/nvptx/nvptx.md index a453c1d..8079763 100644 --- a/gcc/config/nvptx/nvptx.md +++ b/gcc/config/nvptx/nvptx.md @@ -2226,7 +2226,7 @@ return ""; } const char *t - = "%.\\tatom%A1.b%T0.<logic>\\t%0, %1, %2;"; + = "%.\\tatom%A1.<logic>.b%T0\\t%0, %1, %2;"; return nvptx_output_atomic_insn (t, operands, 1, 3); } |