tree-optimization/116974 - Handle single-lane SLP for OMP scan store
commit9df0772d50d8f8a75389d319949632e5d111cc6c
authorRichard Biener <rguenther@suse.de>
Wed, 13 Mar 2024 13:59:27 +0000 (13 14:59 +0100)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 9 Oct 2024 07:56:20 +0000 (9 09:56 +0200)
tree6fc365340bb9c9554126ad8ed9f7897481776c97
parentdc90578f0b3b766303eef6f1acce45d603dee2c6
tree-optimization/116974 - Handle single-lane SLP for OMP scan store

The following massages the GIMPLE matching way of handling scan
stores to work with single-lane SLP.  I do not fully understand all
the cases that can happen and the stmt matching at vectorizable_store
time is less than ideal - but the following gets me all the testcases
to pass with and without forced SLP.

Long term we want to perform the matching at SLP discovery time,
properly chaining the various SLP instances the current state ends
up with.

PR tree-optimization/116974
* tree-vect-stmts.cc (check_scan_store): Pass in the SLP node
instead of just a flag.  Allow single-lane scan stores.
(vectorizable_store): Adjust.
* tree-vect-loop.cc (vect_analyze_loop_2): Empty scan_map
before re-trying.
gcc/tree-vect-loop.cc
gcc/tree-vect-stmts.cc