[PATCH V2] Machine Description: Add LEN_MASK_{GATHER_LOAD, SCATTER_STORE} pattern

2023-06-29 Thread juzhe . zhong
From: Ju-Zhe Zhong Hi, Richi and Richard. This patch is adding LEN_MASK_{GATHER_LOAD,SCATTER_STORE} to allow targets handle flow control by mask and loop control by length on gather/scatter memory operations. Consider this following case: #include void f (uint8_t *restrict a, uint8_t *rest

Re: [PATCH] rs6000, __builtin_set_fpscr_rn add retrun value

2023-06-29 Thread Peter Bergner via Gcc-patches
On 6/29/23 4:13 AM, Kewen.Lin wrote: > on 2023/6/19 23:57, Carl Love wrote: >> The following patch changes the return type of the >> __builtin_set_fpscr_rn builtin from void to double. The return value >> is the current value of the various FPSCR fields DRN, VE, OE, UE, ZE, >> XE, NI, RN bit posi

Re: [PATCH] rs6000: Update the vsx-vector-6.* tests.

2023-06-29 Thread Kewen.Lin via Gcc-patches
Hi Carl, on 2023/6/30 05:36, Carl Love wrote: > Kewen: > > On Wed, 2023-06-28 at 16:35 +0800, Kewen.Lin wrote: >>> Yea, I was going with a runnable test and didn't include the >>> instruction counts. Added back in. Rather then doing by processor >>> version (P8, P9, P10) I was able to do it by

Re: PR82943 - Suggested patch to fix

2023-06-29 Thread Alexander Westbrooks via Gcc-patches
Hello, I have finished my testing, and updated my patch and relevant Changelogs. I added 4 new tests and all the existing tests in the current testsuite for gfortran passed or failed as expected. Do I need to attach the test results here? The platform I tested on was a Docker container running in

PR108672 re-fixed after [PATCH] libstdc++: Synchronize PSTL with upstream

2023-06-29 Thread Hans-Peter Nilsson via Gcc-patches
> Date: Mon, 26 Jun 2023 11:57:49 -0700 > From: Thomas Rodgers via Gcc-patches > On Wed, May 17, 2023 at 12:32 PM Jonathan Wakely wrote: > > All the actual code changes look good. Unfortunately, this overwrote the fix for PR108672. I take it there's a step missing from the synchronization proc

Re: PR82943 - Suggested patch to fix

2023-06-29 Thread Steve Kargl via Gcc-patches
On Thu, Jun 29, 2023 at 10:38:42PM -0500, Alexander Westbrooks via Fortran wrote: > I have finished my testing, and updated my patch and relevant Changelogs. I > added 4 new tests and all the existing tests in the current testsuite > for gfortran passed or failed as expected. Do I need to attach t

[PATCH] tree.h: Hide wi::from_mpz from GENERATOR_FILE

2023-06-29 Thread Kewen.Lin via Gcc-patches
Hi, Similar to r0-85707-g34917a102a4e0c for PR35051, the uses of mpz_t should be guarded with "#ifndef GENERATOR_FILE". This patch is to fix it and avoid some possible build errors. Bootstrapped and regress-tested on x86_64-redhat-linux, and powerpc64{,le}-linux-gnu. And cross-build well on powe

[PATCH] Collect both user and kernel events for autofdo tests and autoprofiledbootstrap

2023-06-29 Thread Eugene Rozenfeld via Gcc-patches
When we collect just user events for autofdo with lbr we get some events where branch sources are kernel addresses and branch targets are user addresses. Without kernel MMAP events create_gcov can't make sense of kernel addresses. Currently create_gcov fails if it can't map at least 95% of event

[PATCH 1/3] targhooks: Extend legitimate_address_p with code_helper [PR110248]

2023-06-29 Thread Kewen.Lin via Gcc-patches
Hi, As PR110248 shows, some middle-end passes like IVOPTs can query the target hook legitimate_address_p with some artificially constructed rtx to determine whether some addressing modes are supported by target for some gimple statement. But for now the existing legitimate_address_p only checks t

[PATCH 2/3] ivopts: Call valid_mem_ref_p with code_helper [PR110248]

2023-06-29 Thread Kewen.Lin via Gcc-patches
Hi, As PR110248 shows, to get the expected query results for that case internal functions LEN_{LOAD,STORE} is unable to adopt some addressing modes, we need to pass down the related IFN code as well. This patch is to make IVOPTs pass down ifn code for USE_PTR_ADDRESS type uses, it adjusts the rel

[PATCH 3/3] rs6000: Teach legitimate_address_p about LEN_{LOAD, STORE} [PR110248]

2023-06-29 Thread Kewen.Lin via Gcc-patches
Hi, This patch is to teach rs6000_legitimate_address_p to handle the queried rtx constructed for LEN_{LOAD,STORE}, since lxvl and stxvl doesn't support x-form or ds-form, so consider it as not legitimate when outer code is PLUS. This can help to fix SPEC2017 503.bwaves_r degradation as reported i

Re: [PATCH V2] Machine Description: Add LEN_MASK_{GATHER_LOAD, SCATTER_STORE} pattern

2023-06-29 Thread Richard Biener via Gcc-patches
On Fri, 30 Jun 2023, juzhe.zh...@rivai.ai wrote: > From: Ju-Zhe Zhong > > Hi, Richi and Richard. > > This patch is adding LEN_MASK_{GATHER_LOAD,SCATTER_STORE} to allow targets > handle flow control by mask and loop control by length on gather/scatter > memory > operations. Consider this follow

Re: [PATCH v1 0/6] Add Loongson SX/ASX instruction support to LoongArch target.

2023-06-29 Thread Xi Ruoyao via Gcc-patches
On Fri, 2023-06-30 at 10:16 +0800, Chenghui Pan wrote: > These patches add the Loongson SX/ASX instruction support to the > LoongArch > target, and can be utilized by using the new "-mlsx" and > "-mlasx" option. > > Patches are bootstrapped and tested on loongarch64-linux-gnu target. > > Lulu Che

[PATCH] tree-optimization/110381 - fix testcase

2023-06-29 Thread Richard Biener via Gcc-patches
This adds a missing check_vect () to the execute testcase. Tested on x86_64-unknown-linux-gnu, pushed. PR tree-optimization/110381 * gcc.dg/vect/pr110381.c: Add check_vect (). --- gcc/testsuite/gcc.dg/vect/pr110381.c | 4 1 file changed, 4 insertions(+) diff --git a/gcc/tes

Re: [PATCH v1 2/6] LoongArch: Added Loongson SX base instruction support.

2023-06-29 Thread Xi Ruoyao via Gcc-patches
On Fri, 2023-06-30 at 10:16 +0800, Chenghui Pan wrote: >   > +  int use_vecarg_p = TARGET_VECARG > +    && LSX_SUPPORTED_MODE_P (mode); > + >    memset (info, 0, sizeof (*info)); >    info->gpr_offset = cum->num_gprs; >    info->fpr_offset = cum->num_fprs; > @@ -535,7 +546,7 @@ loongarch_get_arg_in

Re: PR82943 - Suggested patch to fix

2023-06-29 Thread Paul Richard Thomas via Gcc-patches
Hi Alexander, I suggest that you take a look at PR82649 before going too far down the road of fixing PDT bugs. This PR underlines just how wrong the PDT representation is - mea culpa! The mechanics for constructing PDTs are in decl.cc(gfc_get_pdt_instance). They need to be turned inside out to cr

Re: [PATCH] Machine Description: Add LEN_MASK_{GATHER_LOAD, SCATTER_STORE} pattern

2023-06-29 Thread Robin Dapp via Gcc-patches
> I personally prefer **NOT** to include BIAS in the gather/scatter > since I don't known how it will be used. It was not my intention to suggest to add BIAS here. This can be done by the respective targets when/if they support mask_*, not by you. What I meant is that I'm unsure whether to add a

Re: [PATCH v1 2/6] LoongArch: Added Loongson SX base instruction support.

2023-06-29 Thread Xi Ruoyao via Gcc-patches
On Fri, 2023-06-30 at 10:16 +0800, Chenghui Pan wrote: > +(define_c_enum "unspec" [ > +  UNSPEC_LSX_ASUB_S > +  UNSPEC_LSX_VABSD_U > +  UNSPEC_LSX_VAVG_S /* ... */ To me many of them can be modeled using RTL templates, instead of an unspec. -- Xi Ruoyao School of Aerospace Science and Technolog

Re: Re: [PATCH V2] Machine Description: Add LEN_MASK_{GATHER_LOAD, SCATTER_STORE} pattern

2023-06-29 Thread juzhe.zh...@rivai.ai
>> I'll note >> that 'len' has issues with scatter/gather anyway since the trick of >> handling 'len' in bytes by only providing QImode variants doesn't work >> here. For RVV, we prefer ’len' in elements which perfectly match our RVV instruction ISA define. For example, for our indexed load: vs

GCC 10.4.1 Status Report (2023-06-30), branch frozen for release

2023-06-29 Thread Richard Biener via Gcc-patches
Status == The gcc-10 branch is frozen for release and closing. All changes require release manager approval. Previous Report === https://gcc.gnu.org/pipermail/gcc/2023-June/241839.html

Re: Ping [PATCH v4] Add condition coverage profiling

2023-06-29 Thread Jørgen Kvalsvik via Gcc-patches
On 23/06/2023 19:28, Jan Hubicka wrote: >>> >>> gcc/ChangeLog: >>> >>> * builtins.cc (expand_builtin_fork_or_exec): Check >>> profile_condition_flag. >>> * collect2.cc (main): Add -fno-profile-conditions to OBSTACK. >>> * common.opt: Add new options -fprofile-conditions and >>>

Re: [PATCH V2] Machine Description: Add LEN_MASK_{GATHER_LOAD, SCATTER_STORE} pattern

2023-06-29 Thread Robin Dapp via Gcc-patches
> I am not sure why you mention 'len' in bytes. The 'trick' for then len_load/len_store patterns is to allow a QImode/byte-only length rather than elements. Regards Robin

<    1   2