]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/121202 - fix vector stmt placement
authorRichard Biener <rguenther@suse.de>
Tue, 22 Jul 2025 11:02:03 +0000 (13:02 +0200)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 22 Jul 2025 12:14:53 +0000 (14:14 +0200)
commitbdfb5cc5aa6959a6959fc0cf98da08db89c81032
treebbe1d467ce141c607d8ef2d2d4489017e7f57618
parent65f044a3ef6f5abde2e45a92a503060909100706
tree-optimization/121202 - fix vector stmt placement

When we have a vector shift with a scalar the shift operand can be
external - in that case we should not use the shift operand def
as hint where to place the vector shift instruction.  The ICE
in the PR is because stmt dominance queries only work inside of
the vector region.  But we should also never place stmts outside
of it.

PR tree-optimization/121202
* tree-vect-slp.cc (vect_schedule_slp_node): Do not take
an out-of-region stmt as "last".

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