]> git.ipfire.org Git - thirdparty/gcc.git/commit
Handle SLP build operand swapping for ternaries and calls
authorRichard Biener <rguenther@suse.de>
Mon, 30 Jun 2025 09:23:49 +0000 (11:23 +0200)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 30 Jun 2025 11:21:07 +0000 (13:21 +0200)
commitf788324c724240b6280243119a6fa30f3d37b467
tree8484ee8f30c776680eb2cf884243c0c9e910f821
parent6e24814d9e09019bf42b33b66827648ceff6e7c0
Handle SLP build operand swapping for ternaries and calls

The following adds SLP build operand swapping for .FMA which is
a ternary operator and a call.  The current code only handles
binary operators in assignments, thus the patch extends this to
handle both calls and assignments as well as binary and ternary
operators.

* tree-vect-slp.cc (vect_build_slp_2): Handle ternary
and call operators when swapping operands.

* gcc.target/i386/vect-pr82426.c: Pass explicit -ffp-contract=fast.
* gcc.target/i386/vect-pr82426-2.c: New testcase variant with
-ffp-contract=on.
gcc/testsuite/gcc.target/i386/vect-pr82426-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/vect-pr82426.c
gcc/tree-vect-slp.cc