add vect_get_slp_vect_def
authorRichard Biener <rguenther@suse.de>
Thu, 4 Jun 2020 12:59:16 +0000 (14:59 +0200)
committerRichard Biener <rguenther@suse.de>
Thu, 4 Jun 2020 14:01:55 +0000 (16:01 +0200)
commitb15369e2538086c95250ac57c56a4c2590f922f4
tree1421b8329d03fde053f3abd654662d52c1de02c4
parenta0dae768c6f78eba6997930065b55184202d87ba
add vect_get_slp_vect_def

This adds vect_get_slp_vect_def to get at a SLP nodes vectorized def,
abstracting away the details.  It also fixes one stray failure to
use SLP_TREE_REPRESENTATIVE.

2020-05-04  Richard Biener  <rguenther@suse.de>

* tree-vectorizer.h (vect_get_slp_vect_def): Declare.
* tree-vect-loop.c (vect_create_epilog_for_reduction): Use it.
* tree-vect-stmts.c (vect_transform_stmt): Likewise.
(vect_is_simple_use): Use SLP_TREE_REPRESENTATIVE.
* tree-vect-slp.c (vect_get_slp_vect_defs): Fold into single
use ...
(vect_get_slp_defs): ... here.
(vect_get_slp_vect_def): New function.
gcc/tree-vect-loop.c
gcc/tree-vect-slp.c
gcc/tree-vect-stmts.c
gcc/tree-vectorizer.h