tree-optimization/95539 - fix SLP_TREE_REPRESENTATIVE vs. dr_info
authorRichard Biener <rguenther@suse.de>
Fri, 5 Jun 2020 08:13:27 +0000 (10:13 +0200)
committerRichard Biener <rguenther@suse.de>
Fri, 5 Jun 2020 09:45:43 +0000 (11:45 +0200)
commit9758d196f57950ea89baa5cdf6ebd7125b5056e0
tree5c30c909db4be6df8701ea8a730150cd3af0522e
parent9a182ef9ee011935d827ab5c6c9a7cd8e22257d8
tree-optimization/95539 - fix SLP_TREE_REPRESENTATIVE vs. dr_info

This fixes a disconnect between the stmt_info used for dr_info
analysis and the one in SLP_TREE_REPRESENTATIVE with a temporary
workaround.

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

PR tree-optimization/95539
* tree-vect-data-refs.c
(vect_slp_analyze_and_verify_instance_alignment): Use
SLP_TREE_REPRESENTATIVE for the data-ref check.
* tree-vect-stmts.c (vectorizable_load): Reset stmt_info
back to the first scalar stmt rather than the
SLP_TREE_REPRESENTATIVE to match previous behavior.

* gcc.dg/vect/pr95539.c: New testcase.
gcc/testsuite/gcc.dg/vect/pr95539.c [new file with mode: 0644]
gcc/tree-vect-data-refs.c
gcc/tree-vect-stmts.c