tree-optimization/101083 - fix ICE with SLP reassoc
authorRichard Biener <rguenther@suse.de>
Wed, 16 Jun 2021 06:56:21 +0000 (08:56 +0200)
committerRichard Biener <rguenther@suse.de>
Wed, 16 Jun 2021 06:58:28 +0000 (08:58 +0200)
commit4e56b1347687a33efa47d13d357ae3b7ab759c99
tree82d3c41342896bbe0cf80b8b43a8523b85de0afd
parentede6c3568f383f62df7bf9234212ee80763fdf6b
tree-optimization/101083 - fix ICE with SLP reassoc

This makes us pass down the vector type for the two-operand
SLP node build rather than picking that from operand one which,
when constant or external, could be NULL.

2021-06-16  Richard Biener  <rguenther@suse.de>

PR tree-optimization/101083
* tree-vect-slp.c (vect_slp_build_two_operator_nodes): Get
vectype as argument.
(vect_build_slp_tree_2): Adjust.

* gcc.dg/vect/pr97832-4.c: New testcase.
gcc/testsuite/gcc.dg/vect/pr97832-4.c [new file with mode: 0644]
gcc/tree-vect-slp.c