https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65443
Bug ID: 65443 Summary: Don't peel last iteration from loop in transform_to_exit_first_loop Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: vries at gcc dot gnu.org tree-parloops.c ( https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/tree-parloops.c;h=fbb9eebddcf23e0c3498668e7aaa4708d302f255;hb=HEAD#l1503 ): ... TODO: the common case is that latch of the loop is empty and immediately follows the loop exit. In this case, it would be better not to copy the body of the loop, but only move the entry of the loop directly before the exit check and increase the number of iterations of the loop by one. This may need some additional preconditioning in case NIT = ~0. REDUCTION_LIST describes the reductions in LOOP. */ static void transform_to_exit_first_loop (struct loop *loop, reduction_info_table_type *reduction_list, tree nit) ...