]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/116902 - vectorizer load hosting breaks UID order #2
authorRichard Biener <rguenther@suse.de>
Tue, 1 Oct 2024 11:35:58 +0000 (13:35 +0200)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 1 Oct 2024 12:28:33 +0000 (14:28 +0200)
commit27ddda8b4cb51739e841053c29d9b5f503467e99
tree687b9d976fc3d316d9335cfbd623d5246ab12750
parent60fa7f51c84f042af70a3feea14236c102d6a9c2
tree-optimization/116902 - vectorizer load hosting breaks UID order #2

This is another case of load hoisting breaking UID order in the
preheader, this time between two hoistings.  The easiest way out is
to do what we do for the main stmt - copy instead of move.

PR tree-optimization/116902
PR tree-optimization/116842
* tree-vect-stmts.cc (sort_after_uid): Remove again.
(hoist_defs_of_uses): Copy defs instead of hoisting them so
we can zero their UID.
(vectorizable_load): Separate analysis and transform call,
do transform on the stmt copy.

* g++.dg/torture/pr116902.C: New testcase.
gcc/testsuite/g++.dg/torture/pr116902.C [new file with mode: 0644]
gcc/tree-vect-stmts.cc