]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/117556 - SLP of live stmts from load-lanes
authorRichard Biener <rguenther@suse.de>
Wed, 13 Nov 2024 13:43:27 +0000 (14:43 +0100)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 14 Nov 2024 08:06:16 +0000 (09:06 +0100)
commit4b4aa47ed296968507b2fde70d2e651129ff3b36
tree658c698467e4ebc22ae925a40b0b20a25191b494
parent735f5260fb42919a651ed8e381c9e1a11e753345
tree-optimization/117556 - SLP of live stmts from load-lanes

The following fixes SLP live lane generation for load-lanes which
fails to analyze for gcc.dg/vect/vect-live-slp-3.c because the
VLA division doesn't work out but it would also wrongly use the
transposed vector defs I think.  The following properly disables
the actual load-lanes SLP node from live lane processing and instead
relies on the SLP permute node representing the live lane where we
can use extract-last to extract the last lane.  This also fixes
the reported Ada miscompile.

PR tree-optimization/117556
PR tree-optimization/117553
* tree-vect-stmts.cc (vect_analyze_stmt): Do not analyze
the SLP load-lanes node for live lanes, but only the
permute node.
(vect_transform_stmt): Likewise for the transform.

* gcc.dg/vect/vect-live-slp-3.c: Expect us to SLP even for
VLA vectors (in single-lane mode).
gcc/testsuite/gcc.dg/vect/vect-live-slp-3.c
gcc/tree-vect-stmts.cc