]> 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>
Thu, 24 Jul 2025 06:49:37 +0000 (08:49 +0200)
commit4d0c17354e42d57d3f94a7b66ab59299b076ee68
tree5ab854c60b33c22f5689dd12df5efea2ebe46602
parentefce571b152ac9f5bdbd6821dd537a93e36c1b73
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.

(cherry picked from commit bdfb5cc5aa6959a6959fc0cf98da08db89c81032)
gcc/testsuite/gcc.dg/pr121202.c [new file with mode: 0644]
gcc/tree-vect-slp.cc