On Fri, Nov 12, 2021 at 07:30:35AM +, Tamar Christina via Gcc-patches wrote:
> @@ -2099,7 +2124,7 @@ spaceship_replacement (basic_block cond_bb, basic_block
> middle_bb,
>|| !tree_fits_shwi_p (rhs)
>|| !IN_RANGE (tree_to_shwi (rhs), -1, 1))
> return false;
> - if (orig_us
Ping
> -Original Message-
> From: Tamar Christina
> Sent: Friday, November 12, 2021 7:31 AM
> To: Jakub Jelinek
> Cc: Jonathan Wakely ; Richard Biener
> ; gcc-patches@gcc.gnu.org; nd
> Subject: RE: [PATCH] middle-end: fix de-optimizations with bitclear patter
> -Original Message-
> From: Jakub Jelinek
> Sent: Thursday, November 4, 2021 4:11 PM
> To: Tamar Christina
> Cc: Jonathan Wakely ; Richard Biener
> ; gcc-patches@gcc.gnu.org; nd
> Subject: Re: [PATCH] middle-end: fix de-optimizations with bitclear patterns
>
On Thu, Nov 04, 2021 at 12:19:34PM +, Tamar Christina wrote:
> I'm not sure the precision matters since if the conversion resulted in not
> enough
> precision such that It influences the compare it would have been optimized
> out.
You can't really rely on other optimizations being performed.
> > + if (!TYPE_UNSIGNED (TREE_TYPE (orig_use_lhs)))
> > + return false;
> > + if (SSA_NAME_OCCURS_IN_ABNORMAL_PHI (orig_use_lhs))
> > + return false;
> > + if (EDGE_COUNT (phi_bb->preds) != 4)
> > + return false;
> > + if (!TYPE_UNSIGNED (TREE_TYPE (orig_use_lhs)))
> > +
On Wed, Nov 03, 2021 at 10:56:30AM +, Tamar Christina wrote:
> The spaceship operator is looking for (res & 1) == res which was previously
> folded to (res & ~1) == 0.
> This is now being folded further to ((unsigned) res) <= 1.
Is that match.pd change already in the tree (which commit) or no
Hi,
I think it was lost along the way that I did post an update to the detection
code to fix the regression 😊
I think I have a better understanding of the code now and have updated the
patch.
Essentially when a signed comparison is encountered my match.pd pattern will
trigger for
EQ and NE.
On Tue, 26 Oct 2021 at 20:40, Jakub Jelinek wrote:
> On Tue, Oct 26, 2021 at 08:35:40PM +0100, Jonathan Wakely wrote:
> > We can change __cmp_cat::type if that would result in better code. I
> picked
> > signed char because we only need two bits, and preferably have a signed
> > type as it simplif
On Tue, Oct 26, 2021 at 08:35:40PM +0100, Jonathan Wakely wrote:
> We can change __cmp_cat::type if that would result in better code. I picked
> signed char because we only need two bits, and preferably have a signed
> type as it simplifies some things. Would int make more sense? Or int:2 ?
I thin
On Tue, 26 Oct 2021 at 14:36, Jakub Jelinek wrote:
> On Tue, Oct 26, 2021 at 03:21:55PM +0200, Richard Biener wrote:
> > On Tue, 26 Oct 2021, Jakub Jelinek wrote:
> >
> > > On Tue, Oct 26, 2021 at 03:13:29PM +0200, Richard Biener wrote:
> > > > try
> > > > auto c = ...;
> > > > signed char c2
On Tue, 26 Oct 2021, Jakub Jelinek wrote:
> On Tue, Oct 26, 2021 at 03:21:55PM +0200, Richard Biener wrote:
> > On Tue, 26 Oct 2021, Jakub Jelinek wrote:
> >
> > > On Tue, Oct 26, 2021 at 03:13:29PM +0200, Richard Biener wrote:
> > > > try
> > > > auto c = ...;
> > > > signed char c2 = c;
> >
On Tue, Oct 26, 2021 at 03:21:55PM +0200, Richard Biener wrote:
> On Tue, 26 Oct 2021, Jakub Jelinek wrote:
>
> > On Tue, Oct 26, 2021 at 03:13:29PM +0200, Richard Biener wrote:
> > > try
> > > auto c = ...;
> > > signed char c2 = c;
> > > return c2 >= ...
> > > then
> >
> > That won't work
On Tue, 26 Oct 2021, Jakub Jelinek wrote:
> On Tue, Oct 26, 2021 at 03:13:29PM +0200, Richard Biener wrote:
> > try
> > auto c = ...;
> > signed char c2 = c;
> > return c2 >= ...
> > then
>
> That won't work, at least when using , which is what we with the
> optimization want to deal with p
On Tue, Oct 26, 2021 at 03:13:29PM +0200, Richard Biener wrote:
> try
> auto c = ...;
> signed char c2 = c;
> return c2 >= ...
> then
That won't work, at least when using , which is what we with the
optimization want to deal with primarily.
Because std::partial_ordering etc. aren't implicitl
ctober 26, 2021 9:26 AM
> > > > To: Tamar Christina
> > > > Cc: gcc-patches@gcc.gnu.org; Jakub Jelinek ; nd
> > > >
> > > > Subject: RE: [PATCH] middle-end: fix de-optimizations with bitclear
> > > > patterns on signed values
> > > >
> -Original Message-
> From: Richard Biener
> Sent: Tuesday, October 26, 2021 9:46 AM
> To: Tamar Christina
> Cc: gcc-patches@gcc.gnu.org; Jakub Jelinek ; nd
>
> Subject: RE: [PATCH] middle-end: fix de-optimizations with bitclear patterns
> on signed values
15, 2021 12:31 PM
> > > > To: Tamar Christina
> > > > Cc: gcc-patches@gcc.gnu.org; Jakub Jelinek ; nd
> > > >
> > > > Subject: Re: [PATCH] middle-end: fix de-optimizations with bitclear
> > > > patterns on signed values
> > > >
> > &
> -Original Message-
> From: Richard Biener
> Sent: Tuesday, October 26, 2021 9:26 AM
> To: Tamar Christina
> Cc: gcc-patches@gcc.gnu.org; Jakub Jelinek ; nd
>
> Subject: RE: [PATCH] middle-end: fix de-optimizations with bitclear patterns
> on signed values
On Mon, 25 Oct 2021, Tamar Christina wrote:
> > -Original Message-
> > From: Richard Biener
> > Sent: Friday, October 15, 2021 12:31 PM
> > To: Tamar Christina
> > Cc: gcc-patches@gcc.gnu.org; Jakub Jelinek ; nd
> >
> > Subject: Re: [PA
> -Original Message-
> From: Richard Biener
> Sent: Friday, October 15, 2021 12:31 PM
> To: Tamar Christina
> Cc: gcc-patches@gcc.gnu.org; Jakub Jelinek ; nd
>
> Subject: Re: [PATCH] middle-end: fix de-optimizations with bitclear patterns
> on signed values
On Fri, 15 Oct 2021, Tamar Christina wrote:
> Hi All,
>
> During testing after rebasing to commit I noticed a failing testcase with the
> bitmask compare patch.
>
> Consider the following C++ testcase:
>
> #include
>
> #define A __attribute__((noipa))
> A bool f5 (double i, double j) { auto c
Hi All,
During testing after rebasing to commit I noticed a failing testcase with the
bitmask compare patch.
Consider the following C++ testcase:
#include
#define A __attribute__((noipa))
A bool f5 (double i, double j) { auto c = i <=> j; return c >= 0; }
This turns into a comparison against
22 matches
Mail list logo