public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <jeffreyalaw@gmail.com>
To: Richard Biener <rguenther@suse.de>, gcc-patches@gcc.gnu.org
Cc: richard.sandiford@arm.com
Subject: Re: [PATCH] tree-optimization/110243 - kill off IVOPTs split_offset
Date: Mon, 19 Jun 2023 12:32:28 -0600	[thread overview]
Message-ID: <bf486848-9cb0-129b-edab-d2bf8863a40a@gmail.com> (raw)
In-Reply-To: <20230616123424.B38AC1330B@imap2.suse-dmz.suse.de>



On 6/16/23 06:34, Richard Biener via Gcc-patches wrote:
> IVOPTs has strip_offset which suffers from the same issues regarding
> integer overflow that split_constant_offset did but the latter was
> fixed quite some time ago.  The following implements strip_offset
> in terms of split_constant_offset, removing the redundant and
> incorrect implementation.
> 
> The implementations are not exactly the same, strip_offset relies
> on ptrdiff_tree_p to fend off too large offsets while split_constant_offset
> simply assumes those do not happen and truncates them.  By
> the same means strip_offset also handles POLY_INT_CSTs but
> split_constant_offset does not.  Massaging the latter to
> behave like strip_offset in those cases might be the way to go?
> 
> Bootstrapped and tested on x86_64-unknown-linux-gnu.
> 
> Comments?
> 
> Thanks,
> Richard.
> 
> 	PR tree-optimization/110243
> 	* tree-ssa-loop-ivopts.cc (strip_offset_1): Remove.
> 	(strip_offset): Make it a wrapper around split_constant_offset.
> 
> 	* gcc.dg/torture/pr110243.c: New testcase.
Your call -- IMHO you know this code far better than I.

jeff

  reply	other threads:[~2023-06-19 18:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-16 12:34 Richard Biener
2023-06-19 18:32 ` Jeff Law [this message]
2023-06-19 20:34   ` Richard Sandiford
2023-06-20  7:36     ` Richard Biener
2023-06-20 20:48       ` Richard Sandiford
2023-06-21  9:14         ` Richard Biener
2023-06-21 10:36           ` Richard Biener
2023-06-21 11:13             ` Richard Sandiford

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=bf486848-9cb0-129b-edab-d2bf8863a40a@gmail.com \
    --to=jeffreyalaw@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=rguenther@suse.de \
    --cc=richard.sandiford@arm.com \
    /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).