RE: [PATCH] loading float member of parameter stored via int registers

2023-01-03 Thread Hu, Lin1 via Gcc-patches
...@gcc.gnu.org; jeffreya...@gmail.com Subject: Re: [PATCH] loading float member of parameter stored via int registers Hi! On Fri, Dec 30, 2022 at 12:30:04AM -0800, Andrew Pinski wrote: > On Thu, Dec 29, 2022 at 11:45 PM Segher Boessenkool > wrote: > > Ah! This

Re: [PATCH] loading float member of parameter stored via int registers

2023-01-03 Thread Segher Boessenkool
Hi! On Fri, Dec 30, 2022 at 12:30:04AM -0800, Andrew Pinski wrote: > On Thu, Dec 29, 2022 at 11:45 PM Segher Boessenkool > wrote: > > Ah! This simply shows rs6000_modes_tieable_p is decidedly non-optimal: > > it does not allow tying a scalar float to anything else. No such thing > > is required

Re: [PATCH] loading float member of parameter stored via int registers

2023-01-02 Thread Jiufu Guo via Gcc-patches
Hi, Andrew Pinski writes: > On Thu, Dec 29, 2022 at 11:45 PM Segher Boessenkool > wrote: >> >> Hi! >> >> On Fri, Dec 30, 2022 at 10:22:31AM +0800, Jiufu Guo wrote: >> > Considering the limitations of CSE, I try to find other places >> > to handle this issue, and notice DSE can optimize below

Re: [PATCH] loading float member of parameter stored via int registers

2022-12-30 Thread Andrew Pinski via Gcc-patches
On Thu, Dec 29, 2022 at 11:45 PM Segher Boessenkool wrote: > > Hi! > > On Fri, Dec 30, 2022 at 10:22:31AM +0800, Jiufu Guo wrote: > > Considering the limitations of CSE, I try to find other places > > to handle this issue, and notice DSE can optimize below code: > > "[sfp:DI]=x:DI ; y:SI=[sfp:DI]"

Re: [PATCH] loading float member of parameter stored via int registers

2022-12-29 Thread Segher Boessenkool
Hi! On Fri, Dec 30, 2022 at 10:22:31AM +0800, Jiufu Guo wrote: > Considering the limitations of CSE, I try to find other places > to handle this issue, and notice DSE can optimize below code: > "[sfp:DI]=x:DI ; y:SI=[sfp:DI]" to "y:SI=x:DI#0". > > So, I drafted a patch to update DSE to handle DI-

Re: [PATCH] loading float member of parameter stored via int registers

2022-12-29 Thread Jiufu Guo via Gcc-patches
Hi, Jiufu Guo via Gcc-patches writes: > Hi, > > Jiufu Guo via Gcc-patches writes: > >> Hi, >> >> Segher Boessenkool writes: >> >>> On Fri, Dec 23, 2022 at 08:13:48PM +0100, Richard Biener wrote: > Am 23.12.2022 um 17:55 schrieb Segher Boessenkool > : > There are at least six ve

Re: [PATCH] loading float member of parameter stored via int registers

2022-12-27 Thread Jiufu Guo via Gcc-patches
Hi, Jiufu Guo via Gcc-patches writes: > Hi, > > Segher Boessenkool writes: > >> On Fri, Dec 23, 2022 at 08:13:48PM +0100, Richard Biener wrote: >>> > Am 23.12.2022 um 17:55 schrieb Segher Boessenkool >>> > : >>> > There are at least six very different kinds of subreg: >>> > >>> > 0) Lvalue su

Re: [PATCH] loading float member of parameter stored via int registers

2022-12-26 Thread Jiufu Guo via Gcc-patches
Hi, Segher Boessenkool writes: > On Fri, Dec 23, 2022 at 08:13:48PM +0100, Richard Biener wrote: >> > Am 23.12.2022 um 17:55 schrieb Segher Boessenkool >> > : >> > There are at least six very different kinds of subreg: >> > >> > 0) Lvalue subregs. Most archs have no use for it, and it can be

Re: [PATCH] loading float member of parameter stored via int registers

2022-12-26 Thread Jiufu Guo via Gcc-patches
Hi, Segher Boessenkool writes: > Hi! > > On Fri, Dec 23, 2022 at 08:36:36PM +0800, Jiufu Guo wrote: >> It seems some limitations there. e.g. 1. "subreg:DF on DI register" >> may not work well on pseudo, > > It is perfectly normal: > A hard register may be accessed in various modes throughout o

Re: [PATCH] loading float member of parameter stored via int registers

2022-12-23 Thread Segher Boessenkool
On Fri, Dec 23, 2022 at 08:13:48PM +0100, Richard Biener wrote: > > Am 23.12.2022 um 17:55 schrieb Segher Boessenkool > > : > > There are at least six very different kinds of subreg: > > > > 0) Lvalue subregs. Most archs have no use for it, and it can be > > expressed much more clearly and cle

Re: [PATCH] loading float member of parameter stored via int registers

2022-12-23 Thread Richard Biener via Gcc-patches
> Am 23.12.2022 um 17:55 schrieb Segher Boessenkool > : > > On Fri, Dec 23, 2022 at 05:20:09PM +0100, Richard Biener wrote: Am 23.12.2022 um 15:48 schrieb Segher Boessenkool : >>> None of this belongs in generic code at all imo. At expand time it >>> should be expanded to somethin

Re: [PATCH] loading float member of parameter stored via int registers

2022-12-23 Thread Segher Boessenkool
On Fri, Dec 23, 2022 at 05:20:09PM +0100, Richard Biener wrote: > > Am 23.12.2022 um 15:48 schrieb Segher Boessenkool > > : > > None of this belongs in generic code at all imo. At expand time it > > should be expanded to something that works and can be optimised well, > > so not anything with :BL

Re: [PATCH] loading float member of parameter stored via int registers

2022-12-23 Thread Richard Biener via Gcc-patches
> Am 23.12.2022 um 15:48 schrieb Segher Boessenkool > : > > Hi! > >> On Fri, Dec 23, 2022 at 08:36:36PM +0800, Jiufu Guo wrote: >> It seems some limitations there. e.g. 1. "subreg:DF on DI register" >> may not work well on pseudo, > > It is perfectly normal: > A hard register may be access

Re: [PATCH] loading float member of parameter stored via int registers

2022-12-23 Thread Segher Boessenkool
Hi! On Fri, Dec 23, 2022 at 08:36:36PM +0800, Jiufu Guo wrote: > It seems some limitations there. e.g. 1. "subreg:DF on DI register" > may not work well on pseudo, It is perfectly normal: A hard register may be accessed in various modes throughout one function, but each pseudo register is giv

Re: [PATCH] loading float member of parameter stored via int registers

2022-12-23 Thread Jiufu Guo via Gcc-patches
HI, Jiufu Guo via Gcc-patches writes: > Hi, > > Richard Biener writes: > >> On Thu, 22 Dec 2022, guojiufu wrote: >> >>> Hi, >>> >>> On 2022-12-21 15:30, Richard Biener wrote: >>> > On Wed, 21 Dec 2022, Jiufu Guo wrote: >>> > >>> >> Hi, >>> >> >>> >> This patch is fixing an issue about parame

Re: [PATCH] loading float member of parameter stored via int registers

2022-12-23 Thread Jiufu Guo via Gcc-patches
Hi, Segher Boessenkool writes: > On Thu, Dec 22, 2022 at 11:28:01AM +, Richard Biener wrote: >> On Thu, 22 Dec 2022, Jiufu Guo wrote: >> > To reduce risk, I'm just draft straightforward patches for >> > special cases currently, Like: >> > https://gcc.gnu.org/pipermail/gcc-patches/2022-Decemb

Re: [PATCH] loading float member of parameter stored via int registers

2022-12-22 Thread Segher Boessenkool
On Thu, Dec 22, 2022 at 11:28:01AM +, Richard Biener wrote: > On Thu, 22 Dec 2022, Jiufu Guo wrote: > > To reduce risk, I'm just draft straightforward patches for > > special cases currently, Like: > > https://gcc.gnu.org/pipermail/gcc-patches/2022-December/608081.html > > and this patch. > >

Re: [PATCH] loading float member of parameter stored via int registers

2022-12-22 Thread Richard Biener via Gcc-patches
On Thu, 22 Dec 2022, Jiufu Guo wrote: > > Hi, > > Richard Biener writes: > > > On Thu, 22 Dec 2022, guojiufu wrote: > > > >> Hi, > >> > >> On 2022-12-21 15:30, Richard Biener wrote: > >> > On Wed, 21 Dec 2022, Jiufu Guo wrote: > >> > > >> >> Hi, > >> >> > >> >> This patch is fixing an issue

Re: [PATCH] loading float member of parameter stored via int registers

2022-12-22 Thread Jiufu Guo via Gcc-patches
Hi, Richard Biener writes: > On Thu, 22 Dec 2022, guojiufu wrote: > >> Hi, >> >> On 2022-12-21 15:30, Richard Biener wrote: >> > On Wed, 21 Dec 2022, Jiufu Guo wrote: >> > >> >> Hi, >> >> >> >> This patch is fixing an issue about parameter accessing if the >> >> parameter is struct type and

Re: [PATCH] loading float member of parameter stored via int registers

2022-12-21 Thread Richard Biener via Gcc-patches
On Thu, 22 Dec 2022, guojiufu wrote: > Hi, > > On 2022-12-21 15:30, Richard Biener wrote: > > On Wed, 21 Dec 2022, Jiufu Guo wrote: > > > >> Hi, > >> > >> This patch is fixing an issue about parameter accessing if the > >> parameter is struct type and passed through integer registers, and > >>

Re: [PATCH] loading float member of parameter stored via int registers

2022-12-21 Thread guojiufu via Gcc-patches
Hi, On 2022-12-21 15:30, Richard Biener wrote: On Wed, 21 Dec 2022, Jiufu Guo wrote: Hi, This patch is fixing an issue about parameter accessing if the parameter is struct type and passed through integer registers, and there is floating member is accessed. Like below code: typedef struct DF

Re: [PATCH] loading float member of parameter stored via int registers

2022-12-20 Thread Richard Biener via Gcc-patches
On Wed, 21 Dec 2022, Jiufu Guo wrote: > Hi, > > This patch is fixing an issue about parameter accessing if the > parameter is struct type and passed through integer registers, and > there is floating member is accessed. Like below code: > > typedef struct DF {double a[4]; long l; } DF; > double