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.
--- /dev/null
+! { dg-do compile }
+! { dg-options "-Ofast -frounding-math" }
+ SUBROUTINE PASSB4 (CC,CH)
+ DIMENSION CC(IDO,4,L1), CH(IDO,L1,*)
+ DO 103 I=2,IDO,2
+ TI4 = CC0-CC(I,4,K)
+ CI4 = TI1-TI4
+ CH(I-1,K,4) = CI4
+ CH(I,K,4) = CI4
+ 103 CONTINUE
+ END
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. */