adjust BB SLP build from scalars heuristics
authorRichard Biener <rguenther@suse.de>
Wed, 14 Oct 2020 11:44:21 +0000 (13:44 +0200)
committerRichard Biener <rguenther@suse.de>
Wed, 14 Oct 2020 13:07:17 +0000 (15:07 +0200)
commitec5e6467091ee0f8de2f894f0c1669465a8440f1
treec928f949a7af97b4bc3921ae1a90d5add8870af3
parent17d5739a6b103cdd3315f5d0e09fe8faa6620a03
adjust BB SLP build from scalars heuristics

We can end up with { _1, 1.0 } * { 3.0, _2 } which isn't really
profitable.  The following adjusts things so we reject more than
one possibly expensive (non-constant and not uniform) vector CTOR
and instead build a CTOR for the scalar operation results.

This also moves a check in vect_get_and_check_slp_defs to a better
place.

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

* tree-vect-slp.c (vect_get_and_check_slp_defs): Move
check for duplicate/interleave of variable size constants
to a place done once and early.
(vect_build_slp_tree_2): Adjust heuristics when to build
a BB SLP node from scalars.
gcc/tree-vect-slp.c