public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <jeffreyalaw@gmail.com>
To: Richard Biener <richard.guenther@gmail.com>,
	Andrew Pinski <apinski@marvell.com>,
	Andrew MacLeod <amacleod@redhat.com>,
	Aldy Hernandez <aldyh@redhat.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH 2/2] VR-VALUES: Rewrite test_for_singularity using range_op_handler
Date: Fri, 11 Aug 2023 08:00:13 -0600	[thread overview]
Message-ID: <c532394a-0ae6-b31e-6a73-f04ea5aa81df@gmail.com> (raw)
In-Reply-To: <CAFiYyc289qXWGZDGHbA+zu0KQCFk_SyoNOPMx35Ot3G==koUaw@mail.gmail.com>



On 8/11/23 03:51, Richard Biener via Gcc-patches wrote:
> On Fri, Aug 11, 2023 at 11:17 AM Andrew Pinski via Gcc-patches
> <gcc-patches@gcc.gnu.org> wrote:
>>
>> So it turns out there was a simplier way of starting to
>> improve VRP to start to fix PR 110131, PR 108360, and PR 108397.
>> That was rewrite test_for_singularity to use range_op_handler
>> and Value_Range.
>>
>> This patch implements that and
>>
>> OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions.
> 
> I'm hoping Andrew/Aldy can have a look here.
It's actually pretty simple stuff.  Instead of open-coding range 
identification for op1 and simplification of that range using op0's 
known range (VR), instead we generate a real range for op1 and intersect 
that result with the known range for op0.  If the result is a singleton, 
return it.  Simpler and more effective in the end.

I guess the interactions with the warning subsystem are a non-issue in 
the updated code since it doesn't return an expression, but the 
singleton value (when in the hell did it start returning an expression, 
that just seems wrong given the result is supposed to be a singleton!)

LGTM.

Jeff

  reply	other threads:[~2023-08-11 14:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-11  9:15 [PATCH 1/2] PHI-OPT [PR 110984]: Add support for NE_EXPR/EQ_EXPR with casts to spaceship_replacement Andrew Pinski
2023-08-11  9:15 ` [PATCH 2/2] VR-VALUES: Rewrite test_for_singularity using range_op_handler Andrew Pinski
2023-08-11  9:51   ` Richard Biener
2023-08-11 14:00     ` Jeff Law [this message]
2023-08-11 15:07     ` Andrew MacLeod
2023-08-21 21:00       ` Andrew Pinski
2023-09-01  6:40       ` Andrew Pinski
2023-09-07 14:02         ` Andrew MacLeod
2023-08-11  9:50 ` [PATCH 1/2] PHI-OPT [PR 110984]: Add support for NE_EXPR/EQ_EXPR with casts to spaceship_replacement Richard Biener
2023-09-01 17:30 [PATCH 1/2] VR-VALUES: Rename op0/op1 to op1/op2 for test_for_singularity Andrew Pinski
2023-09-01 17:30 ` [PATCH 2/2] VR-VALUES: Rewrite test_for_singularity using range_op_handler Andrew Pinski
2023-09-05  6:06   ` Jeff Law
2023-09-05  7:12     ` Andrew Pinski
2023-09-29 20:17       ` Jeff Law

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=c532394a-0ae6-b31e-6a73-f04ea5aa81df@gmail.com \
    --to=jeffreyalaw@gmail.com \
    --cc=aldyh@redhat.com \
    --cc=amacleod@redhat.com \
    --cc=apinski@marvell.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=richard.guenther@gmail.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).