Re: [PATCH] Fix SFmode subreg of DImode and TImode

2021-09-13 Thread Richard Biener via Gcc-patches
On Fri, Sep 10, 2021 at 5:07 PM Segher Boessenkool wrote: > > On Fri, Sep 10, 2021 at 12:53:37PM +0200, Richard Biener wrote: > > On Fri, Sep 10, 2021 at 1:50 AM Segher Boessenkool > > wrote: > > > And many targets have strange rules for bit-strings in which modes can > > > be used as bit-strings

Re: [PATCH] Fix SFmode subreg of DImode and TImode

2021-09-10 Thread Segher Boessenkool
On Fri, Sep 10, 2021 at 11:09:31AM +0800, Hongtao Liu wrote: > On Fri, Sep 10, 2021 at 7:49 AM Segher Boessenkool > wrote: > > way too long. But from that same history it follows that anything you > > do not super carefully (with testing everywhere) will cause some serious > Frankly, testing ever

Re: [PATCH] Fix SFmode subreg of DImode and TImode

2021-09-10 Thread Segher Boessenkool
On Fri, Sep 10, 2021 at 12:53:37PM +0200, Richard Biener wrote: > On Fri, Sep 10, 2021 at 1:50 AM Segher Boessenkool > wrote: > > And many targets have strange rules for bit-strings in which modes can > > be used as bit-strings in which other modes, and at what offsets in > > which registers. Now

Re: [PATCH] Fix SFmode subreg of DImode and TImode

2021-09-10 Thread Hongtao Liu via Gcc-patches
On Fri, Sep 10, 2021 at 10:08 PM David Edelsohn wrote: > > On Thu, Sep 9, 2021 at 11:03 PM Hongtao Liu wrote: > > > > On Fri, Sep 10, 2021 at 7:49 AM Segher Boessenkool > > wrote: > > > > > > On Thu, Sep 09, 2021 at 08:16:16AM +0200, Richard Biener wrote: > > > > > I think we should (longer term

Re: [PATCH] Fix SFmode subreg of DImode and TImode

2021-09-10 Thread David Edelsohn via Gcc-patches
On Thu, Sep 9, 2021 at 11:03 PM Hongtao Liu wrote: > > On Fri, Sep 10, 2021 at 7:49 AM Segher Boessenkool > wrote: > > > > On Thu, Sep 09, 2021 at 08:16:16AM +0200, Richard Biener wrote: > > > > I think we should (longer term) get rid of the overloaded meanings and > > > > uses of subregs. One f

Re: [PATCH] Fix SFmode subreg of DImode and TImode

2021-09-10 Thread Hongtao Liu via Gcc-patches
On Fri, Sep 10, 2021 at 7:25 PM Hongtao Liu wrote: > > On Fri, Sep 10, 2021 at 6:54 PM Richard Biener > wrote: > > > > On Fri, Sep 10, 2021 at 5:03 AM Hongtao Liu wrote: > > > > > > On Fri, Sep 10, 2021 at 7:49 AM Segher Boessenkool > > > wrote: > > > > > > > > On Thu, Sep 09, 2021 at 08:16:16A

Re: [PATCH] Fix SFmode subreg of DImode and TImode

2021-09-10 Thread Hongtao Liu via Gcc-patches
On Fri, Sep 10, 2021 at 6:54 PM Richard Biener wrote: > > On Fri, Sep 10, 2021 at 5:03 AM Hongtao Liu wrote: > > > > On Fri, Sep 10, 2021 at 7:49 AM Segher Boessenkool > > wrote: > > > > > > On Thu, Sep 09, 2021 at 08:16:16AM +0200, Richard Biener wrote: > > > > > I think we should (longer term)

Re: [PATCH] Fix SFmode subreg of DImode and TImode

2021-09-10 Thread Richard Biener via Gcc-patches
On Fri, Sep 10, 2021 at 5:03 AM Hongtao Liu wrote: > > On Fri, Sep 10, 2021 at 7:49 AM Segher Boessenkool > wrote: > > > > On Thu, Sep 09, 2021 at 08:16:16AM +0200, Richard Biener wrote: > > > > I think we should (longer term) get rid of the overloaded meanings and > > > > uses of subregs. One f

Re: [PATCH] Fix SFmode subreg of DImode and TImode

2021-09-10 Thread Richard Biener via Gcc-patches
On Fri, Sep 10, 2021 at 1:50 AM Segher Boessenkool wrote: > > On Thu, Sep 09, 2021 at 08:16:16AM +0200, Richard Biener wrote: > > > I think we should (longer term) get rid of the overloaded meanings and > > > uses of subregs. One fairly simple thing is to make a new rtx code > > > "bit_cast" (or

Re: [PATCH] Fix SFmode subreg of DImode and TImode

2021-09-09 Thread Hongtao Liu via Gcc-patches
On Fri, Sep 10, 2021 at 7:49 AM Segher Boessenkool wrote: > > On Thu, Sep 09, 2021 at 08:16:16AM +0200, Richard Biener wrote: > > > I think we should (longer term) get rid of the overloaded meanings and > > > uses of subregs. One fairly simple thing is to make a new rtx code > > > "bit_cast" (or

Re: [PATCH] Fix SFmode subreg of DImode and TImode

2021-09-09 Thread Segher Boessenkool
On Thu, Sep 09, 2021 at 08:16:16AM +0200, Richard Biener wrote: > > I think we should (longer term) get rid of the overloaded meanings and > > uses of subregs. One fairly simple thing is to make a new rtx code > > "bit_cast" (or is there a nice short more traditional name for it?) > > But subreg

Re: [PATCH] Fix SFmode subreg of DImode and TImode

2021-09-09 Thread Michael Meissner via Gcc-patches
On Thu, Sep 09, 2021 at 08:16:16AM +0200, Richard Biener wrote: > But subreg _is_ bit_cast. What is odd to me is that a "disallowed" subreg > like (subreg:SF (reg:TI ..) 0) magically becomes valid (in terms of > validate_subreg) if you rewrite it as (subreg:SF (subreg:SI (reg:TI ..) 0) 0). > Of co

Re: [PATCH] Fix SFmode subreg of DImode and TImode

2021-09-09 Thread Jim Wilson
On Tue, Sep 7, 2021 at 12:12 AM Michael Meissner via Gcc-patches < gcc-patches@gcc.gnu.org> wrote: > This patch fixes the breakage in the PowerPC due to a recent change in > SUBREG > behavior. While it is arguable that the patch that caused the breakage > should > be reverted, this patch should b

Re: [PATCH] Fix SFmode subreg of DImode and TImode

2021-09-08 Thread Richard Biener via Gcc-patches
On Wed, Sep 8, 2021 at 9:18 PM Segher Boessenkool wrote: > > On Wed, Sep 08, 2021 at 08:39:31PM +0200, Richard Biener wrote: > > On September 8, 2021 7:08:09 PM GMT+02:00, Segher Boessenkool > > wrote: > > >It is not a good idea to do allow all those things. Most backends can > > >only support

Re: [PATCH] Fix SFmode subreg of DImode and TImode

2021-09-08 Thread Hongtao Liu via Gcc-patches
On Thu, Sep 9, 2021 at 3:17 AM Segher Boessenkool wrote: > > On Wed, Sep 08, 2021 at 08:39:31PM +0200, Richard Biener wrote: > > On September 8, 2021 7:08:09 PM GMT+02:00, Segher Boessenkool > > wrote: > > >It is not a good idea to do allow all those things. Most backends can > > >only support

Re: [PATCH] Fix SFmode subreg of DImode and TImode

2021-09-08 Thread Hongtao Liu via Gcc-patches
On Thu, Sep 9, 2021 at 3:17 AM Segher Boessenkool wrote: > > On Wed, Sep 08, 2021 at 08:39:31PM +0200, Richard Biener wrote: > > On September 8, 2021 7:08:09 PM GMT+02:00, Segher Boessenkool > > wrote: > > >It is not a good idea to do allow all those things. Most backends can > > >only support

Re: [PATCH] Fix SFmode subreg of DImode and TImode

2021-09-08 Thread Segher Boessenkool
On Wed, Sep 08, 2021 at 08:39:31PM +0200, Richard Biener wrote: > On September 8, 2021 7:08:09 PM GMT+02:00, Segher Boessenkool > wrote: > >It is not a good idea to do allow all those things. Most backends can > >only support a few combinations of them, and everything else results in > >*worse*

Re: [PATCH] Fix SFmode subreg of DImode and TImode

2021-09-08 Thread Richard Biener via Gcc-patches
On September 8, 2021 7:08:09 PM GMT+02:00, Segher Boessenkool wrote: >Hi! > >On Wed, Sep 08, 2021 at 08:42:44AM +0200, Richard Biener wrote: >> On Wed, Sep 8, 2021 at 1:08 AM Segher Boessenkool >> wrote: >> > The core of the problem is that subreg of pseudos has three meanings: >> > -- Paradox

Re: [PATCH] Fix SFmode subreg of DImode and TImode

2021-09-08 Thread David Edelsohn via Gcc-patches
On Wed, Sep 8, 2021 at 1:10 PM Segher Boessenkool wrote: > > Hi! > > On Wed, Sep 08, 2021 at 08:42:44AM +0200, Richard Biener wrote: > > On Wed, Sep 8, 2021 at 1:08 AM Segher Boessenkool > > wrote: > > > The core of the problem is that subreg of pseudos has three meanings: > > > -- Paradoxical

Re: [PATCH] Fix SFmode subreg of DImode and TImode

2021-09-08 Thread Segher Boessenkool
Hi! On Wed, Sep 08, 2021 at 08:42:44AM +0200, Richard Biener wrote: > On Wed, Sep 8, 2021 at 1:08 AM Segher Boessenkool > wrote: > > The core of the problem is that subreg of pseudos has three meanings: > > -- Paradoxical subregs; > > -- Actual subregs; > > -- "bit_cast" thingies: treat the

Re: [PATCH] Fix SFmode subreg of DImode and TImode

2021-09-08 Thread Michael Meissner via Gcc-patches
On Tue, Sep 07, 2021 at 06:07:30PM -0500, Segher Boessenkool wrote: > Hi! > > On Tue, Sep 07, 2021 at 03:12:36AM -0400, Michael Meissner wrote: > > [PATCH] Fix SFmode subreg of DImode and TImode > > > > This patch fixes the breakage in the PowerPC due to a recent change in > > SUBREG > > behavio

Re: [PATCH] Fix SFmode subreg of DImode and TImode

2021-09-07 Thread Richard Biener via Gcc-patches
On Wed, Sep 8, 2021 at 1:08 AM Segher Boessenkool wrote: > > Hi! > > On Tue, Sep 07, 2021 at 03:12:36AM -0400, Michael Meissner wrote: > > [PATCH] Fix SFmode subreg of DImode and TImode > > > > This patch fixes the breakage in the PowerPC due to a recent change in > > SUBREG > > behavior. > > But

Re: [PATCH] Fix SFmode subreg of DImode and TImode

2021-09-07 Thread Segher Boessenkool
Hi! On Tue, Sep 07, 2021 at 03:12:36AM -0400, Michael Meissner wrote: > [PATCH] Fix SFmode subreg of DImode and TImode > > This patch fixes the breakage in the PowerPC due to a recent change in SUBREG > behavior. But what was that change? And was that intentional? If so, why wasn't it document