]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/124743 - SLP scheduling of invariant internal ops
authorRichard Biener <rguenther@suse.de>
Wed, 1 Apr 2026 10:39:43 +0000 (12:39 +0200)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 7 Apr 2026 08:06:33 +0000 (10:06 +0200)
commit8cb837ea238d974254459c1fe5ce2cf39251b452
tree2bed5f0a3f9527f35328d9f32c4f40c752e94c05
parentd26055fec8ef07d9b998ec3217b25507ad080fcf
tree-optimization/124743 - SLP scheduling of invariant internal ops

The following makes us avoid scheduling invariant internal operations
to random points in the CFG when doing loop vectorization since
in that case the stmt UIDs we use for dominance checks are not
initialized outside of loop bodies.  Instead schedule such
operations by appending to the loop preheader which is where
invariants generally end up for loop vectorization.

PR tree-optimization/124743
* tree-vect-slp.cc (vect_schedule_slp_node): Schedule
loop invariant operations in the loop preheader.

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