]> gcc.gnu.org Git - gcc.git/commit
[nvptx] Handle move from DF subreg to DF reg in nvptx_output_mov_insn
authorTom de Vries <tdevries@suse.de>
Tue, 22 Sep 2020 11:16:39 +0000 (13:16 +0200)
committerTom de Vries <tdevries@suse.de>
Wed, 23 Sep 2020 07:21:20 +0000 (09:21 +0200)
commitca52f937fff52c494ef2951490c1654750ef8157
tree69c5b36647f5ab44c798abd81e27fc6568959803
parent28d3b78dff512e18fc45c45e10c705e2a5ae3b48
[nvptx] Handle move from DF subreg to DF reg in nvptx_output_mov_insn

When compiling test-case gcc.dg/atomic/c11-atomic-exec-1.c, we run into
these ptxas errors:
...
line 100; error: Rounding modifier required for instruction 'cvt'
line 105; error: Rounding modifier required for instruction 'cvt'
...

The problem is that this move:
...
//(insn 13 11 14 2
//      (set (reg:DF 28 [ _9 ])
//           (subreg:DF (reg:TI 22 [ _1 ]) 0)) 9 {*movdf_insn}
//       (nil))
                cvt.f64.u64     %r28, %r22$0;
...
is emitted as cvt.f64.u64, while it should be a mov.b64 instead.

Fix this by handling this case in nvptx_output_mov_insn.

Tested on nvptx.

gcc/ChangeLog:

PR target/97158
* config/nvptx/nvptx.c (nvptx_output_mov_insn): Handle move from
DF subreg to DF reg.
gcc/config/nvptx/nvptx.c
This page took 0.057306 seconds and 5 git commands to generate.