]> git.ipfire.org Git - thirdparty/gcc.git/commit
amdgcn: add more insn patterns using vec_duplicate
authorAndrew Stubbs <ams@baylibre.com>
Thu, 12 Jun 2025 16:57:23 +0000 (16:57 +0000)
committerAndrew Stubbs <ams@baylibre.com>
Mon, 21 Jul 2025 11:13:19 +0000 (11:13 +0000)
commitbdc4062a0796788e44d5e6ecd753268a8b453cc7
tree3415552d16e5a662c2ec8fcc5919b2d715824198
parent9791950017c90c6dd2da773fbc2db98021226981
amdgcn: add more insn patterns using vec_duplicate

These new insns allow more efficient use of scalar inputs to 64-bit vector
add and mul.  Also, the patch adjusts the existing mul.._dup because it was
actually a dup2 (the vec_duplicate is on the second input), and that was
inconveniently inconsistent.

The patterns are generally useful, but will be used directly by a follow-up
patch.

gcc/ChangeLog:

* config/gcn/gcn-valu.md (add<mode>3_dup): New.
(add<mode>3_dup_exec): New.
(<su>mul<mode>3_highpart_dup<exec>): New.
(mul<mode>3_dup): Move the vec_duplicate to operand 1.
(mul<mode>3_dup_exec): New.
(vec_series<mode>): Adjust call to gen_mul<mode>3_dup.
* config/gcn/gcn.cc (gcn_expand_vector_init): Likewise.
gcc/config/gcn/gcn-valu.md
gcc/config/gcn/gcn.cc