]> gcc.gnu.org Git - gcc.git/commit
tree-optimization/107647 - avoid FMA from SLP with -ffp-contract=off
authorRichard Biener <rguenther@suse.de>
Thu, 17 Nov 2022 08:43:31 +0000 (09:43 +0100)
committerRichard Biener <rguenther@suse.de>
Mon, 12 Dec 2022 10:26:36 +0000 (11:26 +0100)
commita9fafa2f533e25c57528c0294e19a154197848dd
tree7602722dd3afd55350dea6b5ca0907c2eddbcc5a
parente0e37f97e67c99604129eeac2e73ccd3719ccb28
tree-optimization/107647 - avoid FMA from SLP with -ffp-contract=off

Only with -ffp-contract=fast we can synthesize FMA operations like
vfmaddsub231ps, so properly guard the transform in SLP pattern
detection.

PR tree-optimization/107647
* tree-vect-slp-patterns.cc (addsub_pattern::recognize): Only
allow FMA generation with -ffp-contract=fast for FP types.
(complex_mul_pattern::matches): Likewise.

* gcc.target/i386/pr107647.c: New testcase.

(cherry picked from commit c5df8392c5848c0462558f41cdf6eab31db301cf)
gcc/testsuite/gcc.target/i386/pr107647.c [new file with mode: 0644]
gcc/tree-vect-slp-patterns.cc
This page took 0.063904 seconds and 6 git commands to generate.