https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104543
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:d03a67dc69251dc86c0772a432380a6e9bcb8617 commit r12-7243-gd03a67dc69251dc86c0772a432380a6e9bcb8617 Author: Richard Biener <rguent...@suse.de> Date: Tue Feb 15 12:27:14 2022 +0100 tree-optimization/104543 - fix unroll-and-jam precondition We have to make sure that outer loop exits come after the inner loop since we otherwise will put it into the fused loop body. 2022-02-15 Richard Biener <rguent...@suse.de> PR tree-optimization/104543 * gimple-loop-jam.cc (unroll_jam_possible_p): Check outer loop exits come after the inner loop. * gcc.dg/torture/pr104543.c: New testcase.