]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/config/gcn/gcn.cc
amdgcn: vec_extract no-op insns
authorAndrew Stubbs <ams@codesourcery.com>
Wed, 1 Mar 2023 15:32:50 +0000 (15:32 +0000)
committerAndrew Stubbs <ams@codesourcery.com>
Thu, 23 Mar 2023 11:00:54 +0000 (11:00 +0000)
commitdb80ccd34365c14e529111c94b93d3fb201b6eef
tree40155abe9aeb7e9f81e91ea15484c9fafc9e26bf
parent484c41c747d95f9cee15a33b75b32ae2e7eb45f3
amdgcn: vec_extract no-op insns

Just using move insn for no-op conversions triggers special move handling in
IRA which declares that subreg of vectors aren't valid and routes everything
through memory.  These patterns make the vec_select explicit and all is well.

gcc/ChangeLog:

* config/gcn/gcn-protos.h (gcn_stepped_zero_int_parallel_p): New.
* config/gcn/gcn-valu.md (V_1REG_ALT): New.
(V_2REG_ALT): New.
(vec_extract<V_1REG:mode><V_1REG_ALT:mode>_nop): New.
(vec_extract<V_2REG:mode><V_2REG_ALT:mode>_nop): New.
(vec_extract<V_ALL:mode><V_ALL_ALT:mode>): Use new patterns.
* config/gcn/gcn.cc (gcn_stepped_zero_int_parallel_p): New.
* config/gcn/predicates.md (ascending_zero_int_parallel): New.
gcc/config/gcn/gcn-protos.h
gcc/config/gcn/gcn-valu.md
gcc/config/gcn/gcn.cc
gcc/config/gcn/predicates.md