https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81953
--- Comment #8 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Ajit Kumar Agarwal <aaga...@gcc.gnu.org>: https://gcc.gnu.org/g:f4b86ab09dfe258c4780fcc7567ca8a275c96e7a commit r15-327-gf4b86ab09dfe258c4780fcc7567ca8a275c96e7a Author: Ajit Kumar Agarwal <aagar...@linux.ibm.com> Date: Wed May 8 09:21:27 2024 -0500 tree-ssa-sink: Improve code sinking pass Currently, code sinking will sink code at the use points with loop having same nesting depth. The following patch improves code sinking by placing the sunk code in begining of the block after the labels. 2024-05-08 Ajit Kumar Agarwal <aagar...@linux.ibm.com> gcc/ChangeLog: PR tree-optimization/81953 * tree-ssa-sink.cc (statement_sink_location):Sink statements at the begining of the basic block after labels. gcc/testsuite/ChangeLog: PR tree-optimization/81953 * gcc.dg/tree-ssa/ssa-sink-21.c: New test.