]> git.ipfire.org Git - thirdparty/gcc.git/commit
i386: Add vec_fm{addsub,subadd}v2sf4 patterns [PR116979]
authorJakub Jelinek <jakub@redhat.com>
Fri, 13 Dec 2024 09:31:04 +0000 (10:31 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 13 Dec 2024 09:32:57 +0000 (10:32 +0100)
commit99b9dfaff66ca6edd534bcf0e7b943a6f816c9bf
tree9831e90de5a29627b9a38c3f1447cac492dcd819
parent12a5ab146110631edffcd307a0c10773160f2723
i386: Add vec_fm{addsub,subadd}v2sf4 patterns [PR116979]

As mentioned in the PR, the addition of vec_addsubv2sf3 expander caused
the testcase to be vectorized and no longer to use fma.
The following patch adds new expanders so that it can be vectorized
again with the alternating add/sub fma instructions.

There is some bug on the slp cost computation side which causes it
not to count some scalar multiplication costs, but I think the patch
is desirable anyway before that is fixed and the testcase for now just
uses -fvect-cost-model=unlimited.

2024-12-13  Jakub Jelinek  <jakub@redhat.com>

PR target/116979
* config/i386/mmx.md (vec_fmaddsubv2sf4, vec_fmsubaddv2sf4): New
define_expand patterns.

* gcc.target/i386/pr116979.c: New test.
gcc/config/i386/mmx.md
gcc/testsuite/gcc.target/i386/pr116979.c [new file with mode: 0644]