diff options
author | Richard Biener <rguenther@suse.de> | 2021-06-11 13:33:17 +0200 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2021-06-11 13:35:31 +0200 |
commit | fbd8a8041292f2ec2c22be43c8d3e74b37b2bc88 (patch) | |
tree | 78830fba159400c70c0ed872d610554d0fc546ad /gcc/tree-vect-slp.c | |
parent | 4bdcdd8fa8d7659e5a19a930cf2f0332127f8a46 (diff) | |
download | gcc-fbd8a8041292f2ec2c22be43c8d3e74b37b2bc88.zip gcc-fbd8a8041292f2ec2c22be43c8d3e74b37b2bc88.tar.gz gcc-fbd8a8041292f2ec2c22be43c8d3e74b37b2bc88.tar.bz2 |
tree-optimization/101026 - fix SLP re-association
Since we cannot yet encode the operation in the SLP node itself
but need a representative stmt require an existing one for now
to avoid the need to build a fake GIMPLE stmt.
2021-06-11 Richard Biener <rguenther@suse.de>
PR tree-optimization/101026
* tree-vect-slp.c (vect_build_slp_tree_2): Make sure we
have a representative for the associated chain nodes.
* gfortran.dg/pr101026.f: New testcase.
Diffstat (limited to 'gcc/tree-vect-slp.c')
-rw-r--r-- | gcc/tree-vect-slp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c index 6237a61..897bd6f 100644 --- a/gcc/tree-vect-slp.c +++ b/gcc/tree-vect-slp.c @@ -1860,7 +1860,9 @@ vect_build_slp_tree_2 (vec_info *vinfo, slp_tree node, chains.quick_push (chain.copy ()); chain.truncate (0); } - if (chains.length () == group_size) + if (chains.length () == group_size + /* We cannot yet use SLP_TREE_CODE to communicate the operation. */ + && op_stmt_info) { /* Now we have a set of chains with the same length. */ /* 1. pre-sort according to def_type and operation. */ |