]> gcc.gnu.org Git - gcc.git/commit
Adjust BB vectorization SLP build heuristics
authorRichard Biener <rguenther@suse.de>
Wed, 14 Oct 2020 13:37:51 +0000 (15:37 +0200)
committerRichard Biener <rguenther@suse.de>
Fri, 16 Oct 2020 11:44:37 +0000 (13:44 +0200)
commit6c6e0cafa38cee8309f37b846cb7db813a472a54
treebe453072dd2cb2876e9f70853057e27b043f5af7
parent377535881166969dba43794f298170978d797ef6
Adjust BB vectorization SLP build heuristics

This changes SLP def gathering to not fail due to mismatched
def type but instead demote the def to external.  This allows the
new testcase to be vectorized in full (with GCC 10 it is not
vectorized at all and with current trunk we vectorize only the
store).  This is important since with BB vectorization being
applied to bigger pieces of code the chance that we mix
internal and external defs for an operand that should end up
treated as external (built from scalars) increases.

2020-10-16  Richard Biener  <rguenther@suse.de>

* tree-vect-slp.c (vect_get_and_check_slp_defs): For BB
vectorization swap operands only if it helps, demote mismatches to
external.

* gcc.dg/vect/bb-slp-53.c: New testcase.
gcc/testsuite/gcc.dg/vect/bb-slp-53.c [new file with mode: 0644]
gcc/tree-vect-slp.c
This page took 0.074471 seconds and 5 git commands to generate.