Re: [PATCH V5] Use reg mode to move sub blocks for parameters and returns

2023-06-06 Thread guojiufu via Gcc-patches
Hi, On 2023-06-05 00:59, Jeff Law wrote: On 5/9/23 07:43, Jiufu Guo wrote: Thanks for point out this! Yes, BLKmode rtx may not always be a MEM. MEM_SIZE is only ok for MEM after the it's known size is computed. Here MEM_SIZE is fine just because it is an stack rtx corresponding to the type of

Re: [PATCH V5] Use reg mode to move sub blocks for parameters and returns

2023-06-04 Thread Jeff Law via Gcc-patches
On 5/9/23 07:43, Jiufu Guo wrote: Thanks for point out this! Yes, BLKmode rtx may not always be a MEM. MEM_SIZE is only ok for MEM after the it's known size is computed. Here MEM_SIZE is fine just because it is an stack rtx corresponding to the type of parameter and returns which has been co

Re: [PATCH V5] Use reg mode to move sub blocks for parameters and returns

2023-05-09 Thread Jiufu Guo via Gcc-patches
Hi, Jeff Law writes: > On 5/3/23 23:49, guojiufu wrote: >> Hi, >> >> On 2023-05-01 03:00, Jeff Law wrote: >>> On 3/16/23 21:39, Jiufu Guo wrote: Hi, When assigning a parameter to a variable, or assigning a variable to return value with struct type, and the parameter/return

Re: [PATCH V5] Use reg mode to move sub blocks for parameters and returns

2023-05-05 Thread Jeff Law via Gcc-patches
On 5/3/23 23:49, guojiufu wrote: Hi, On 2023-05-01 03:00, Jeff Law wrote: On 3/16/23 21:39, Jiufu Guo wrote: Hi, When assigning a parameter to a variable, or assigning a variable to return value with struct type, and the parameter/return is passed through registers. For this kind of case,

Re: [PATCH V5] Use reg mode to move sub blocks for parameters and returns

2023-05-03 Thread guojiufu via Gcc-patches
Hi, On 2023-05-01 23:52, Segher Boessenkool wrote: Hi! On Fri, Mar 17, 2023 at 11:39:52AM +0800, Jiufu Guo wrote: gcc/testsuite/ChangeLog: * gcc.target/powerpc/pr65421-1.c: New test. * gcc.target/powerpc/pr65421.c: New test. Please name the tests something else? -1.c and -2

Re: [PATCH V5] Use reg mode to move sub blocks for parameters and returns

2023-05-03 Thread guojiufu via Gcc-patches
Hi, On 2023-05-01 03:00, Jeff Law wrote: On 3/16/23 21:39, Jiufu Guo wrote: Hi, When assigning a parameter to a variable, or assigning a variable to return value with struct type, and the parameter/return is passed through registers. For this kind of case, it would be better to use the nature

Re: [PATCH V5] Use reg mode to move sub blocks for parameters and returns

2023-05-01 Thread Segher Boessenkool
Hi! On Fri, Mar 17, 2023 at 11:39:52AM +0800, Jiufu Guo wrote: > gcc/testsuite/ChangeLog: > > * gcc.target/powerpc/pr65421-1.c: New test. > * gcc.target/powerpc/pr65421.c: New test. Please name the tests something else? -1.c and -2.c maybe. Or something more inspired. Just not som

Re: [PATCH V5] Use reg mode to move sub blocks for parameters and returns

2023-04-30 Thread Jeff Law via Gcc-patches
On 3/16/23 21:39, Jiufu Guo wrote: Hi, When assigning a parameter to a variable, or assigning a variable to return value with struct type, and the parameter/return is passed through registers. For this kind of case, it would be better to use the nature mode of the registers to move the conten