Re: [PATCH 1/2] Add a parameter for the builtin function of prefetch to align with LLVM

2022-10-24 Thread Segher Boessenkool
On Mon, Oct 24, 2022 at 11:00:26AM +0100, Richard Sandiford wrote: > Segher Boessenkool writes: > > On Thu, Oct 20, 2022 at 07:34:13AM +, Jiang, Haochen wrote: > >> > > + /* Argument 3 must be either zero or one. */ > >> > > + if (INTVAL (op3) != 0 && INTVAL (op3) != 1) > >> > > +{ > >>

Re: [PATCH 1/2] Add a parameter for the builtin function of prefetch to align with LLVM

2022-10-24 Thread Richard Sandiford via Gcc-patches
Segher Boessenkool writes: > On Thu, Oct 20, 2022 at 07:34:13AM +, Jiang, Haochen wrote: >> > > + /* Argument 3 must be either zero or one. */ >> > > + if (INTVAL (op3) != 0 && INTVAL (op3) != 1) >> > > +{ >> > > + warning (0, "invalid fourth argument to %<__builtin_prefetch%>;" >>

Re: [PATCH 1/2] Add a parameter for the builtin function of prefetch to align with LLVM

2022-10-21 Thread Segher Boessenkool
On Fri, Oct 21, 2022 at 11:17:39AM +0100, Richard Earnshaw wrote: > On 20/10/2022 18:37, Andrew Pinski via Gcc-patches wrote: > >On aarch64 (armv8), it is actually the same instruction: PRFM. It > >might be the only one which is that way though. > >It even allows to specify the level for the instru

Re: [PATCH 1/2] Add a parameter for the builtin function of prefetch to align with LLVM

2022-10-21 Thread Richard Earnshaw via Gcc-patches
On 20/10/2022 18:37, Andrew Pinski via Gcc-patches wrote: On Thu, Oct 20, 2022 at 10:28 AM Segher Boessenkool wrote: On Thu, Oct 20, 2022 at 01:44:15AM +, Jiang, Haochen wrote: Maybe the testcase change cause some misunderstanding and concern. Actually, the patch did not disrupt the p

RE: [PATCH 1/2] Add a parameter for the builtin function of prefetch to align with LLVM

2022-10-20 Thread Jiang, Haochen via Gcc-patches
ux.ibm.com; olege...@gcc.gnu.org; da...@redhat.com; > ebotca...@libertysurf.fr; jeffreya...@gmail.com; dave.ang...@bell.net > Subject: Re: [PATCH 1/2] Add a parameter for the builtin function of prefetch > to align with LLVM > > On Thu, Oct 20, 2022 at 07:34:13AM +, Jiang, Haochen wro

Re: [PATCH 1/2] Add a parameter for the builtin function of prefetch to align with LLVM

2022-10-20 Thread Segher Boessenkool
On Thu, Oct 20, 2022 at 07:34:13AM +, Jiang, Haochen wrote: > > > + /* Argument 3 must be either zero or one. */ > > > + if (INTVAL (op3) != 0 && INTVAL (op3) != 1) > > > +{ > > > + warning (0, "invalid fourth argument to %<__builtin_prefetch%>;" > > > + " using one"); > > > > "usi

Re: [PATCH 1/2] Add a parameter for the builtin function of prefetch to align with LLVM

2022-10-20 Thread Segher Boessenkool
On Thu, Oct 20, 2022 at 11:12:01AM +0800, Hongtao Liu wrote: > On Thu, Oct 20, 2022 at 9:39 AM Hongtao Liu wrote: > > On Thu, Oct 20, 2022 at 5:08 AM Segher Boessenkool > > > Please use a separate pattern for this, and leave prefetch to mean data > > > prefetch, as documented! Documentation you d

Re: [PATCH 1/2] Add a parameter for the builtin function of prefetch to align with LLVM

2022-10-20 Thread Andrew Pinski via Gcc-patches
On Thu, Oct 20, 2022 at 10:28 AM Segher Boessenkool wrote: > > On Thu, Oct 20, 2022 at 01:44:15AM +, Jiang, Haochen wrote: > > Maybe the testcase change cause some misunderstanding and concern. > > > > Actually, the patch did not disrupt the previous builtins, as the > > builtin_prefetch > >

Re: [PATCH 1/2] Add a parameter for the builtin function of prefetch to align with LLVM

2022-10-20 Thread Segher Boessenkool
On Thu, Oct 20, 2022 at 01:44:15AM +, Jiang, Haochen wrote: > Maybe the testcase change cause some misunderstanding and concern. > > Actually, the patch did not disrupt the previous builtins, as the > builtin_prefetch > uses vargs. I set the default value of the new parameter as data prefetch

RE: [PATCH 1/2] Add a parameter for the builtin function of prefetch to align with LLVM

2022-10-20 Thread Jiang, Haochen via Gcc-patches
ux.ibm.com; olege...@gcc.gnu.org; da...@redhat.com; > ebotca...@libertysurf.fr; jeffreya...@gmail.com; dave.ang...@bell.net > Subject: Re: [PATCH 1/2] Add a parameter for the builtin function of prefetch > to align with LLVM > > On Fri, Oct 14, 2022 at 04:34:05PM +0800, Haochen Jiang wrote

Re: [PATCH 1/2] Add a parameter for the builtin function of prefetch to align with LLVM

2022-10-19 Thread Hongtao Liu via Gcc-patches
On Thu, Oct 20, 2022 at 9:39 AM Hongtao Liu wrote: > > On Thu, Oct 20, 2022 at 5:08 AM Segher Boessenkool > wrote: > > > > On Fri, Oct 14, 2022 at 04:34:05PM +0800, Haochen Jiang wrote: > > > * config/s390/s390.cc (s390_expand_cpymem): Generate fourth > > > parameter for > > > > (Many too

RE: [PATCH 1/2] Add a parameter for the builtin function of prefetch to align with LLVM

2022-10-19 Thread Jiang, Haochen via Gcc-patches
uk; dje@gmail.com; > olege...@gcc.gnu.org; claz...@synopsys.com; mfort...@gmail.com; > da...@redhat.com; dave.ang...@bell.net; hubi...@ucw.cz; > richard.earns...@arm.com; rguent...@suse.de; > marcus.shawcr...@arm.com; ramana.radhakrish...@arm.com; Liu, Hongtao > > Subject:

Re: [PATCH 1/2] Add a parameter for the builtin function of prefetch to align with LLVM

2022-10-19 Thread Hongtao Liu via Gcc-patches
On Thu, Oct 20, 2022 at 5:08 AM Segher Boessenkool wrote: > > On Fri, Oct 14, 2022 at 04:34:05PM +0800, Haochen Jiang wrote: > > * config/s390/s390.cc (s390_expand_cpymem): Generate fourth parameter > > for > > (Many too long lines here, this is the first one. Changelog lines are > max. 80

Re: [PATCH 1/2] Add a parameter for the builtin function of prefetch to align with LLVM

2022-10-19 Thread Hongtao Liu via Gcc-patches
On Thu, Oct 20, 2022 at 5:15 AM Segher Boessenkool wrote: > > On Wed, Oct 19, 2022 at 10:14:28AM -0700, Andrew Pinski wrote: > > Do the testcases really need to be changed rather than adding new testcases? > > Usually it is better if the testcases not change unless really needed > > to be. That is

Re: [PATCH 1/2] Add a parameter for the builtin function of prefetch to align with LLVM

2022-10-19 Thread Segher Boessenkool
On Wed, Oct 19, 2022 at 10:14:28AM -0700, Andrew Pinski wrote: > Do the testcases really need to be changed rather than adding new testcases? > Usually it is better if the testcases not change unless really needed > to be. That is do these testcases pass without being changed? If not > this seems n

Re: [PATCH 1/2] Add a parameter for the builtin function of prefetch to align with LLVM

2022-10-19 Thread Segher Boessenkool
On Fri, Oct 14, 2022 at 04:34:05PM +0800, Haochen Jiang wrote: > * config/s390/s390.cc (s390_expand_cpymem): Generate fourth parameter > for (Many too long lines here, this is the first one. Changelog lines are max. 80 positions; a tab is eight). > + /* Argument 3 must be either zero or

Re: [PATCH 1/2] Add a parameter for the builtin function of prefetch to align with LLVM

2022-10-19 Thread Andrew Pinski via Gcc-patches
On Fri, Oct 14, 2022 at 1:40 AM Haochen Jiang via Gcc-patches wrote: > > gcc/ChangeLog: > > * builtins.cc (expand_builtin_prefetch): Handle the fourth parameter > in > expand function. > * config/aarch64/aarch64-sve.md: Add default parameter value. > * config/aarch

Re: [PATCH 1/2] Add a parameter for the builtin function of prefetch to align with LLVM

2022-10-17 Thread Richard Earnshaw via Gcc-patches
On 14/10/2022 09:34, Haochen Jiang via Gcc-patches wrote: gcc/ChangeLog: * builtins.cc (expand_builtin_prefetch): Handle the fourth parameter in expand function. * config/aarch64/aarch64-sve.md: Add default parameter value. * config/aarch64/aarch64.md (prefetch

Re: [PATCH 1/2] Add a parameter for the builtin function of prefetch to align with LLVM

2022-10-14 Thread Hongtao Liu via Gcc-patches
This patch tries to add a parameter to generate instruction prefetch instead of data prefetch. Currently, __builtin_prefetch assumes data prefetch only. On Fri, Oct 14, 2022 at 4:39 PM Haochen Jiang via Gcc-patches wrote: > > gcc/ChangeLog: > > * builtins.cc (expand_builtin_prefetch): Han

[PATCH 1/2] Add a parameter for the builtin function of prefetch to align with LLVM

2022-10-14 Thread Haochen Jiang via Gcc-patches
gcc/ChangeLog: * builtins.cc (expand_builtin_prefetch): Handle the fourth parameter in expand function. * config/aarch64/aarch64-sve.md: Add default parameter value. * config/aarch64/aarch64.md (prefetch): New define_expand. (*prefetch): Add default paramete