]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Avoid unnecessary epilogues from tree_unroll_loop
authorRichard Biener <rguenther@suse.de>
Thu, 9 Mar 2023 09:56:57 +0000 (10:56 +0100)
committerRichard Biener <rguenther@suse.de>
Wed, 19 Apr 2023 09:53:50 +0000 (11:53 +0200)
The following fixes the condition determining whether we need an
epilogue.

* tree-ssa-loop-manip.cc (determine_exit_conditions): Fix
no epilogue condition.

gcc/tree-ssa-loop-manip.cc

index 09acc1c94cce4100f91338934b2acbc9e23e2476..4ef27bae51527cf7475b459b41988c576ffcb348 100644 (file)
@@ -1010,7 +1010,7 @@ determine_exit_conditions (class loop *loop, class tree_niter_desc *desc,
       /* Convert the latch count to an iteration count.  */
       tree niter = fold_build2 (PLUS_EXPR, type, desc->niter,
                                build_one_cst (type));
-      if (multiple_of_p (type, niter, bigstep))
+      if (multiple_of_p (type, niter, build_int_cst (type, factor)))
        return;
     }