]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/115252 - enhance peeling for gaps avoidance
authorRichard Biener <rguenther@suse.de>
Mon, 27 May 2024 14:04:35 +0000 (16:04 +0200)
committerRichard Biener <rguenther@suse.de>
Wed, 29 May 2024 11:05:24 +0000 (13:05 +0200)
commitf46eaad445e680034df51bd0dec4e6c7b1f372a4
treedd1c04eef158c554d4cf5cb9af6856b8573ca008
parent1065a7db6f2a69770a85b4d53b9123b090dd1771
tree-optimization/115252 - enhance peeling for gaps avoidance

Code generation for contiguous load vectorization can already deal
with generalized avoidance of loading from a gap.  The following
extends detection of peeling for gaps requirement with that,
gets rid of the old special casing of a half load and makes sure
when we do access the gap we have peeling for gaps enabled.

PR tree-optimization/115252
* tree-vect-stmts.cc (get_group_load_store_type): Enhance
detecting the number of cases where we can avoid accessing a gap
during code generation.
(vectorizable_load): Remove old half-vector peeling for gap
avoidance which is now redundant.  Add gap-aligned case where
it's OK to access the gap.  Add assert that we have peeling for
gaps enabled when we access a gap.

* gcc.dg/vect/slp-gap-1.c: New testcase.
gcc/testsuite/gcc.dg/vect/slp-gap-1.c [new file with mode: 0644]
gcc/tree-vect-stmts.cc