public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Sandiford <richard.sandiford@arm.com>
To: Richard Biener via Gcc-patches <gcc-patches@gcc.gnu.org>
Cc: Richard Biener <rguenther@suse.de>
Subject: Re: [PATCH] Avoid unnecessary epilogues from tree_unroll_loop
Date: Thu, 09 Mar 2023 11:39:49 +0000	[thread overview]
Message-ID: <mptwn3q17cq.fsf@arm.com> (raw)
In-Reply-To: <20230309103756.43AFB3850213@sourceware.org> (Richard Biener via Gcc-patches's message of "Thu, 9 Mar 2023 10:37:13 +0000 (UTC)")

Richard Biener via Gcc-patches <gcc-patches@gcc.gnu.org> writes:
> The following fixes the condition determining whether we need an
> epilogue.
>
> When r12-2429-g62acc72a957b56 introduced this check I didn't notice
> the odd condition on review.  Richard - do you remember if this
> was on purpose?

Oops, no, looks like a mistake.  Thanks for the fix.

Richard

> I've noticed the mismatch with gcc.dg/tree-ssa/predcom-1.c for example.
>
> Bootstrapped and tested on x86_64-unknown-linux-gnu, queued for stage1.
>
> Richard.
>
> 	* tree-ssa-loop-manip.cc (determine_exit_conditions): Fix
> 	no epilogue condition.
> ---
>  gcc/tree-ssa-loop-manip.cc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gcc/tree-ssa-loop-manip.cc b/gcc/tree-ssa-loop-manip.cc
> index c804a7353d5..a52277abdbf 100644
> --- a/gcc/tree-ssa-loop-manip.cc
> +++ b/gcc/tree-ssa-loop-manip.cc
> @@ -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;
>      }

       reply	other threads:[~2023-03-09 11:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230309103756.43AFB3850213@sourceware.org>
2023-03-09 11:39 ` Richard Sandiford [this message]
2023-03-09 10:37 Richard Biener

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=mptwn3q17cq.fsf@arm.com \
    --to=richard.sandiford@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=rguenther@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).