https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117140
--- Comment #10 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Tamar Christina <tnfch...@gcc.gnu.org>: https://gcc.gnu.org/g:51291ad0f1f89a81de917110af96e019dcd5690c commit r15-4463-g51291ad0f1f89a81de917110af96e019dcd5690c Author: Tamar Christina <tamar.christ...@arm.com> Date: Fri Oct 18 10:37:28 2024 +0100 middle-end: Fix GSI for gcond root [PR117140] When finding the gsi to use for code of the root statements we should use the one of the original statement rather than the gcond which may be inside a pattern. Without this the emitted instructions may be discarded later. gcc/ChangeLog: PR tree-optimization/117140 * tree-vect-slp.cc (vectorize_slp_instance_root_stmt): Use gsi from original statement. gcc/testsuite/ChangeLog: PR tree-optimization/117140 * gcc.dg/vect/vect-early-break_129-pr117140.c: New test.