Re: [RFC] propgation leap over memory copy for struct

2022-11-09 Thread Richard Biener via Gcc-patches
On Wed, 9 Nov 2022, Jiufu Guo wrote: > Hi, > > Richard Biener writes: > > > On Mon, Oct 31, 2022 at 11:14 PM Jeff Law via Gcc-patches > > wrote: > >> > >> > >> On 10/30/22 20:42, Jiufu Guo via Gcc-patches wrote: > >> > Hi, > >> > > >> > We know that for struct variable assignment, memory copy

Re: [RFC] propgation leap over memory copy for struct

2022-11-09 Thread Jiufu Guo via Gcc-patches
Hi, Richard Biener writes: > On Mon, Oct 31, 2022 at 11:14 PM Jeff Law via Gcc-patches > wrote: >> >> >> On 10/30/22 20:42, Jiufu Guo via Gcc-patches wrote: >> > Hi, >> > >> > We know that for struct variable assignment, memory copy may be used. >> > And for memcpy, we may load and store more b

Re: [RFC] propgation leap over memory copy for struct

2022-11-09 Thread Richard Biener via Gcc-patches
On Wed, 9 Nov 2022, Jiufu Guo wrote: > Jiufu Guo via Gcc-patches writes: > > > Richard Biener writes: > > > >> On Tue, 1 Nov 2022, Jiufu Guo wrote: > >> > >>> Segher Boessenkool writes: > >>> > >>> > On Mon, Oct 31, 2022 at 04:13:38PM -0600, Jeff Law wrote: > >>> >> On 10/30/22 20:42, Jiufu G

Re: [RFC] propgation leap over memory copy for struct

2022-11-08 Thread Jiufu Guo via Gcc-patches
Jiufu Guo via Gcc-patches writes: > Richard Biener writes: > >> On Tue, 1 Nov 2022, Jiufu Guo wrote: >> >>> Segher Boessenkool writes: >>> >>> > On Mon, Oct 31, 2022 at 04:13:38PM -0600, Jeff Law wrote: >>> >> On 10/30/22 20:42, Jiufu Guo via Gcc-patches wrote: >>> >> >We know that for struct

Re: [RFC] propgation leap over memory copy for struct

2022-11-07 Thread Jiufu Guo via Gcc-patches
Richard Biener writes: > On Tue, 1 Nov 2022, Jiufu Guo wrote: > >> Segher Boessenkool writes: >> >> > On Mon, Oct 31, 2022 at 04:13:38PM -0600, Jeff Law wrote: >> >> On 10/30/22 20:42, Jiufu Guo via Gcc-patches wrote: >> >> >We know that for struct variable assignment, memory copy may be used.

Re: [RFC] propgation leap over memory copy for struct

2022-11-05 Thread Richard Biener via Gcc-patches
On Tue, 1 Nov 2022, Jiufu Guo wrote: > Segher Boessenkool writes: > > > On Mon, Oct 31, 2022 at 04:13:38PM -0600, Jeff Law wrote: > >> On 10/30/22 20:42, Jiufu Guo via Gcc-patches wrote: > >> >We know that for struct variable assignment, memory copy may be used. > >> >And for memcpy, we may load

Re: [RFC] propgation leap over memory copy for struct

2022-11-05 Thread Richard Biener via Gcc-patches
On Mon, Oct 31, 2022 at 11:14 PM Jeff Law via Gcc-patches wrote: > > > On 10/30/22 20:42, Jiufu Guo via Gcc-patches wrote: > > Hi, > > > > We know that for struct variable assignment, memory copy may be used. > > And for memcpy, we may load and store more bytes as possible at one time. > > While i

Re: [RFC] propgation leap over memory copy for struct

2022-10-31 Thread Jiufu Guo via Gcc-patches
Segher Boessenkool writes: > On Mon, Oct 31, 2022 at 04:13:38PM -0600, Jeff Law wrote: >> On 10/30/22 20:42, Jiufu Guo via Gcc-patches wrote: >> >We know that for struct variable assignment, memory copy may be used. >> >And for memcpy, we may load and store more bytes as possible at one time. >>

Re: [RFC] propgation leap over memory copy for struct

2022-10-31 Thread Jiufu Guo via Gcc-patches
Jeff Law writes: > On 10/30/22 20:42, Jiufu Guo via Gcc-patches wrote: >> Hi, >> >> We know that for struct variable assignment, memory copy may be used. >> And for memcpy, we may load and store more bytes as possible at one time. >> While it may be not best here: >> 1. Before/after stuct variabl

Re: [RFC] propgation leap over memory copy for struct

2022-10-31 Thread Jiufu Guo via Gcc-patches
Segher Boessenkool writes: > Hi! > > On Mon, Oct 31, 2022 at 10:42:35AM +0800, Jiufu Guo wrote: >> #define FN 4 >> typedef struct { double a[FN]; } A; >> >> A foo (const A *a) { return *a; } >> A bar (const A a) { return a; } >> /// >> >> If FN<=2; the size of "A" fits into TImode, then thi

Re: [RFC] propgation leap over memory copy for struct

2022-10-31 Thread Segher Boessenkool
On Mon, Oct 31, 2022 at 04:13:38PM -0600, Jeff Law wrote: > On 10/30/22 20:42, Jiufu Guo via Gcc-patches wrote: > >We know that for struct variable assignment, memory copy may be used. > >And for memcpy, we may load and store more bytes as possible at one time. > >While it may be not best here: >

Re: [RFC] propgation leap over memory copy for struct

2022-10-31 Thread Segher Boessenkool
Hi! On Mon, Oct 31, 2022 at 10:42:35AM +0800, Jiufu Guo wrote: > #define FN 4 > typedef struct { double a[FN]; } A; > > A foo (const A *a) { return *a; } > A bar (const A a) { return a; } > /// > > If FN<=2; the size of "A" fits into TImode, then this code can be optimized > (by subreg/cse/

Re: [RFC] propgation leap over memory copy for struct

2022-10-31 Thread Jeff Law via Gcc-patches
On 10/30/22 20:42, Jiufu Guo via Gcc-patches wrote: Hi, We know that for struct variable assignment, memory copy may be used. And for memcpy, we may load and store more bytes as possible at one time. While it may be not best here: 1. Before/after stuct variable assignment, the vaiable may be o

[RFC] propgation leap over memory copy for struct

2022-10-30 Thread Jiufu Guo via Gcc-patches
Hi, We know that for struct variable assignment, memory copy may be used. And for memcpy, we may load and store more bytes as possible at one time. While it may be not best here: 1. Before/after stuct variable assignment, the vaiable may be operated. And it is hard for some optimizations to leap o