]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/120808 - SLP patterns with FMA/FMS
authorRichard Biener <rguenther@suse.de>
Fri, 27 Jun 2025 09:42:45 +0000 (11:42 +0200)
committerRichard Biener <rguenther@suse.de>
Fri, 27 Jun 2025 10:55:49 +0000 (12:55 +0200)
commit08bdb6b4a32f1f696862db25fdcc364870b52d82
tree78f64bfc247236b53accacc5bda7e89acaf524b3
parentf359b9150c282c69704d8d2a6c8e071c90506538
tree-optimization/120808 - SLP patterns with FMA/FMS

The following amends the SLP addsub pattern to also match blends
of .FMA/.FMS and form .FMADDSUB even when -ffp-contract=off.

PR tree-optimization/120808
* tree-vect-slp-patterns.cc (vect_match_expression_p):
Take a code_helper and also match calls.
(addsub_pattern::recognize): Handle .FMA/.FMS pairs
in addition to PLUS/MINUS.
(addsub_pattern::build): Adjust.

* gcc.dg/vect/bb-slp-pr120808.c: Now also expect FMADDSUB
patterns to be matched.
gcc/testsuite/gcc.dg/vect/bb-slp-pr120808.c
gcc/tree-vect-slp-patterns.cc