public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andrew MacLeod <amacleod@redhat.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>,
	"hernandez, aldy" <aldyh@redhat.com>,
	Richard Biener <richard.guenther@gmail.com>
Subject: Re: [PATCH 2/2] Add VREL_OTHER for FP unsupported relations.
Date: Wed, 25 Jan 2023 18:23:25 -0500	[thread overview]
Message-ID: <6e6ec2ef-c186-0a30-0e08-b2dd6e9fd0c0@redhat.com> (raw)
In-Reply-To: <Y9Guv0EBgytXR3Kw@tucnak>


On 1/25/23 17:35, Jakub Jelinek wrote:
> On Wed, Jan 25, 2023 at 11:12:11AM -0500, Andrew MacLeod via Gcc-patches wrote:
>> In GCC13, I don't think there are any uses of the relation oracle outside of
>> ranger and range-ops.
>>
>> So, given that, perhaps the simplest thing to do is bail on all this change,
>> and instead simply do the following which also fixes the PR. (im running it
>> thru tests as we speak)
>>
>>
>>
>> diff --git a/gcc/gimple-range-fold.cc b/gcc/gimple-range-fold.cc
>> index 91eb6298254..9c5359a3fc6 100644
>> --- a/gcc/gimple-range-fold.cc
>> +++ b/gcc/gimple-range-fold.cc
>> @@ -1039,6 +1039,9 @@ fold_using_range::relation_fold_and_or (irange&
>> lhs_range, gimple *s,
>>     if (!ssa1_dep1 || !ssa1_dep2 || !ssa2_dep1 || !ssa2_dep2)
>>       return;
>>
>> +  if (HONOR_NANS (TREE_TYPE (ssa1_dep1)))
>> +    return;
>> +
>>     // Make sure they are the same dependencies, and detect the order of the
>>     // relationship.
>>     bool reverse_op2 = true;
>>
>>
> If this works, maybe (does something check if ssa1_dep1 has certain
> type (I assume ssa1_dep2 has to have the same) then ssa2_dep{1,2} has that
> type too (or uselessly equal to that)?  Though, if this spot has both
> operands of the comparison, could we for HONOR_NANS case ask frange if
> any of them is maybe_nan or known_nan and punt only if anything can be NAN?


it bootstraps with no regressions.

all the ssa?dep? must have the same type, or the comparisons for 
similarity are going to fail.  ir requires the same 2 ssa-name in both 
relational expressions, which means they must all be the same type.

At this point we don't actually know ranges.. this is a higher level 
thing before any queries have happen.   we could query, but I'd punt on 
that for next release :-)  And think about how applicable it is.  Id 
like to revisit this entire situation.

Andrew



>
> 	Jakub
>


  reply	other threads:[~2023-01-25 23:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-23 17:44 Andrew MacLeod
2023-01-23 17:45 ` [PATCH 2/2] tree-optimization/108447 - " Andrew MacLeod
2023-01-24  8:55 ` [PATCH 2/2] " Richard Biener
2023-01-24 10:05 ` Jakub Jelinek
2023-01-24 15:57   ` Andrew MacLeod
2023-01-25 11:15     ` Jakub Jelinek
2023-01-25 14:30       ` Andrew MacLeod
2023-01-25 14:48         ` Jakub Jelinek
2023-01-25 16:12           ` Andrew MacLeod
2023-01-25 22:35             ` Jakub Jelinek
2023-01-25 23:23               ` Andrew MacLeod [this message]
2023-01-25 23:27                 ` Jakub Jelinek

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=6e6ec2ef-c186-0a30-0e08-b2dd6e9fd0c0@redhat.com \
    --to=amacleod@redhat.com \
    --cc=aldyh@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --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).