Re: [PATCH 7/8] vect: Support multiple lane-reducing operations for loop reduction [PR114440]

2024-07-19 Thread Rainer Orth
Richard Biener writes: >> gcc/testsuite/ >> PR tree-optimization/114440 >> * gcc.dg/vect/vect-reduc-chain-1.c >> * gcc.dg/vect/vect-reduc-chain-2.c >> * gcc.dg/vect/vect-reduc-chain-3.c >> * gcc.dg/vect/vect-reduc-chain-dot-slp-1.c >> * gcc.dg/vect/

Re: [PATCH v1] Internal-fn: Only allow modes describe types for internal fn[PR115961]

2024-07-19 Thread Richard Sandiford
pan2...@intel.com writes: > From: Pan Li > > The direct_internal_fn_supported_p has no restrictions for the type > modes. For example the bitfield like below will be recog as .SAT_TRUNC. > > struct e > { > unsigned pre : 12; > unsigned a : 4; > }; > > __attribute__((noipa)) > void bug (e * v,

Re: [r15-2135 Regression] FAIL: libgomp.oacc-fortran/privatized-ref-2.f90 -DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable -Os at line 32 (test for warnings, line 31) on Linux/x86_64

2024-07-19 Thread Thomas Schwinge
Hi! First, note this is now GCC PR115989 "[15 regression] libgomp.oacc-fortran/privatized-ref-2.f90 fails after r15-2135-gc3aa339ea50f05". Otherwise: On 2024-07-19T06:54:46+0100, Paul Richard Thomas wrote: > Thanks for doing that test. Here is what the error looks like on 14-branch: > libgomp

[PATCH] s390: testsuite: Fix vcond-shift.c

2024-07-19 Thread Stefan Schulze Frielinghaus
Previously we optimized expressions of the form a < 0 ? -1 : 0 to (signed)a >> 31 during vcond expanding. Since r15-1741-g2ccdd0f22312a1 this is done in match.pd. The implementation in the back end as well as in match.pd are basically the same but still distinct. For the tests in vcond-shift.c t

Re: [r15-2135 Regression] FAIL: libgomp.oacc-fortran/privatized-ref-2.f90 -DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable -Os at line 32 (test for warnings, line 31) on Linux/x86_64

2024-07-19 Thread Paul Richard Thomas
Hi Haochen, Thanks for doing that test. Here is what the error looks like on 14-branch: libgomp.oacc-fortran/privatized-ref-2.f90:36:22: 36 | A = [(3*j, j=1, 10)] | ^ Warning: ‘a.offset’ is used uninitialized [-Wuninitialized] libgomp.oacc-fortran/privatized-ref-2.f

Re: [PATCH] c-family: Introduce the -Winvalid-noreturn flag from clang with extra tuneability

2024-07-19 Thread Julian Waters
Attempting to resend with a different client, plain text enabled... Hi Jason, I’ve managed to address your review comments, and rewrite the patch to include both -Winvalid-noreturn and -Winvalid-noreturn= but have trouble figuring out how to format invoke.texi and where to add the documentation f

[PATCH v2] RISC-V: More support of vx and vf for autovec comparison

2024-07-19 Thread demin.han
There are still some cases which can't utilize vx or vf after last_combine pass. 1. integer comparison when imm isn't in range of [-16, 15] 2. float imm is 0.0 3. DI or DF mode under RV32 This patch fix above mentioned issues. Tested on RV32 and RV64. Signed-off-by: demin.han gcc/ChangeLog:

Re: [PATCH] s390: testsuite: Fix vcond-shift.c

2024-07-19 Thread Andrew Pinski
On Thu, Jul 18, 2024 at 10:31 PM Stefan Schulze Frielinghaus wrote: > > Previously we optimized expressions of the form a < 0 ? -1 : 0 to > (signed)a >> 31 during vcond expanding. Since r15-1741-g2ccdd0f22312a1 > this is done in match.pd. The implementation in the back end as well as > in match.

Re: [PATCH] s390: testsuite: Fix vcond-shift.c

2024-07-19 Thread Stefan Schulze Frielinghaus
On Thu, Jul 18, 2024 at 11:58:10PM -0700, Andrew Pinski wrote: > On Thu, Jul 18, 2024 at 10:31 PM Stefan Schulze Frielinghaus > wrote: > > > > Previously we optimized expressions of the form a < 0 ? -1 : 0 to > > (signed)a >> 31 during vcond expanding. Since r15-1741-g2ccdd0f22312a1 > > this is d

[PATCH] RISC-V: Fix double mode under RV32 not utilize vf

2024-07-19 Thread demin.han
Currently, some binops of vector vs double scalar under RV32 can't translated to vf but vfmv+vxx.vv. The cause is that vec_duplicate is also expanded to broadcast for double mode under RV32. last-combine can't process expanded broadcast. gcc/ChangeLog: * config/riscv/vector.md: Add !FLOA

Re: [PATCH 3/3] Add power11 tests

2024-07-19 Thread Segher Boessenkool
On Thu, Jul 18, 2024 at 09:53:05AM -0500, Peter Bergner wrote: > On 7/18/24 8:23 AM, Segher Boessenkool wrote: > > Everything in gcc.target/powerpc is only run for target powerpc*-*-* > > anyway, so make this just > > > > /* { dg-do compile } */ > > > > please. (Or nothing, it is the default aft

[Patch, rs6000, middle-end] v7: Add implementation for different targets for pair mem fusion

2024-07-19 Thread Ajit Agarwal
Hello Richard: All comments are addressed. Common infrastructure using generic code for pair mem fusion of different targets. rs6000 target specific code implement virtual functions defined by generic code. Target specific code are added in rs6000-mem-fusion.cc. Bootstrapped and regtested on p

Re: [Patch, rs6000, middle-end] v6: Add implementation for different targets for pair mem fusion

2024-07-19 Thread Ajit Agarwal
Hello Richard: On 18/07/24 4:44 pm, Richard Sandiford wrote: > Ajit Agarwal writes: >> [...] +// Set subreg for OO mode pair to generate sequential registers given +// insn_info pairs I1, I2 and LOAD_P is true iff load insn and false +// if store insn. +void +rs6000_pair_

Re: [Patch, v2] gcn/mkoffload.cc: Use #embed for including the generated ELF file

2024-07-19 Thread Jakub Jelinek
On Fri, Jun 21, 2024 at 05:30:02PM +0200, Tobias Burnus wrote: > gcc/ChangeLog: > > * config/gcn/mkoffload.cc (read_file): Remove. > (process_obj): Generate C file that uses #embed. > (main): Update call to it; remove no longer needed file I/O. > + fprintf (cfile, > +"s

RE: [PATCH v2] RISC-V: More support of vx and vf for autovec comparison

2024-07-19 Thread Li, Pan2
> + TEST_COND_IMM_FLOAT (T, >, 0.0, _gt) > \ > + TEST_COND_IMM_FLOAT (T, <, 0.0, _lt) > \ > + TEST_COND_IMM_FLOAT (T, >=, 0.0, _ge) > \ > + TEST_COND_IMM_FLOAT (T, <=, 0.0, _le)

[PATCH v2] Internal-fn: Only allow type matches mode for internal fn[PR115961]

2024-07-19 Thread pan2 . li
From: Pan Li The direct_internal_fn_supported_p has no restrictions for the type modes. For example the bitfield like below will be recog as .SAT_TRUNC. struct e { unsigned pre : 12; unsigned a : 4; }; __attribute__((noipa)) void bug (e * v, unsigned def, unsigned use) { e & defE = *v;

RE: [PATCH v1] Internal-fn: Only allow modes describe types for internal fn[PR115961]

2024-07-19 Thread Li, Pan2
Thanks Richard S for comments and suggestions, updated in v2. Pan -Original Message- From: Richard Sandiford Sent: Friday, July 19, 2024 3:46 PM To: Li, Pan2 Cc: gcc-patches@gcc.gnu.org; juzhe.zh...@rivai.ai; kito.ch...@gmail.com; richard.guent...@gmail.com; tamar.christ...@arm.com; j

RE: [PATCH v2] RISC-V: More support of vx and vf for autovec comparison

2024-07-19 Thread Demin Han
> -Original Message- > From: Li, Pan2 > Sent: 2024年7月19日 18:33 > To: Demin Han ; gcc-patches@gcc.gnu.org > Cc: juzhe.zh...@rivai.ai; kito.ch...@gmail.com; jeffreya...@gmail.com; > rdapp@gmail.com > Subject: RE: [PATCH v2] RISC-V: More support of vx and vf for autovec > comparison > >

Re: [Fortran, Patch, PR77518, (coarray), v2] Fix ICE in sizeof(coarray)

2024-07-19 Thread Andre Vehreschild
Hi Paul, thanks for the review. > While I realise that this is not your doing, should we not > check DECL_LANG_SPECIFIC ()) before touching GFC_DECL_SAVED_DESCRIPTOR? I like that idea. I have added it. But what should we do when DECL_LANG_SPECIFIC is not set? I have chosen to add a gcc_unreachab

Re: [PATCH] Fortran: character array constructor with >= 4 constant elements [PR103115]

2024-07-19 Thread Andre Vehreschild
Hi Harald, you right, that solution looks pretty obvious to me. Ok by me. Thanks for the patch and the opportunity to give back a review. Keep up the good work! Regards, Andre On Thu, 18 Jul 2024 21:27:13 +0200 Harald Anlauf wrote: > Dear all, > > here's a quite obvious fix for an ICE

Re: [PATCH] bpf: create modifier for mem operand for xchg and cmpxchg

2024-07-19 Thread Cupertino Miranda
Fixed and pushed! Thanks, Cupertino David Faust writes: > On 7/15/24 08:33, Cupertino Miranda wrote: >> Both xchg and cmpxchg instructions, in the pseudo-C dialect, do not >> expect their memory address operand to be surrounded by parentheses. >> For example, it should be output as "w0 =cmpxch

[PATCH] testsuite: Allow vst1 instruction

2024-07-19 Thread Torbjörn SVENSSON
Ok for trunk and releases/gcc-14? -- On Cortex-A7 with -mfloat-abi=hard and -mfpu=neon, the following instructions are generated for the test case: vldrd16, .L3 vst1.32 {d16}, [r0] For Cortex-A7 with -mfloat-abi=soft, it's instead: movsr2, #1 movsr3,

Re: [PATCH] arm: Update fp16-aapcs-[24].c after insn_propagation patch

2024-07-19 Thread Richard Earnshaw (lists)
On 11/07/2024 19:31, Richard Sandiford wrote: > These tests used to generate: > > bl swap > ldr r2, [sp, #4] > mov r0, r2 @ __fp16 > > but g:9d20529d94b23275885f380d155fe8671ab5353a means that we can > load directly into r0: > > bl swap >

Re: [PATCH] c++: alias of alias tmpl with dependent attrs [PR115897]

2024-07-19 Thread Patrick Palka
On Thu, 18 Jul 2024, Jason Merrill wrote: > On 7/18/24 12:45 PM, Patrick Palka wrote: > > Bootstrapped and regtested on x86_64-pc-linux-gnu, does thi look > > OK for trunk/14? > > > > -- >8 -- > > > > As a followup of r15-2047-g7954bb4fcb6fa8, we also need to consider > > dependent attributes wh

Re: [PATCH] RISC-V: Support __mulbc3 and __divbc3 in libgcc for __bf16

2024-07-19 Thread Jeff Law
On 7/18/24 9:13 PM, Xiao Zeng wrote: 2024-07-18 01:53  Jeff Law wrote: On 7/17/24 2:01 AM, Xiao Zeng wrote: libgcc/ChangeLog: * Makefile.in: Support __divbc3 and __mulbc3. * libgcc2.c (if): Support BC mode for __bf16. (defined): Ditto. (MTYPE): Ditto. (CTYPE): Ditto. (AMTYPE): Ditto. (M

Re: [PATCH v10 2/3] C: Implement musttail attribute for returns

2024-07-19 Thread Marek Polacek
On Thu, Jul 18, 2024 at 04:18:56PM -0700, Andi Kleen wrote: > > > > > + set_musttail_on_return (retval, xloc, musttail_p); > > > > > + > > > > >if (retval) > > > > > { > > > > >tree semantic_type = NULL_TREE; > > > > > > > > Is it deliberate that set_musttail_on_return is called

[PATCH] rtl-optimization/116002 - cselib hash is bad

2024-07-19 Thread Richard Biener
The following addresses the bad hash function of cselib which uses integer plus for merging. This causes a huge number of collisions for the testcase in the PR and thus very large compile-time. The following rewrites it to use inchash, eliding duplicate mixing of RTX code and mode in some cases a

Re: [PATCH] testsuite: Allow vst1 instruction

2024-07-19 Thread Richard Earnshaw (lists)
On 19/07/2024 14:07, Torbjörn SVENSSON wrote: > Ok for trunk and releases/gcc-14? > > -- > > On Cortex-A7 with -mfloat-abi=hard and -mfpu=neon, the following > instructions are generated for the test case: > > vldrd16, .L3 > vst1.32 {d16}, [r0] > > For Cortex-A7 with -mfloat

Re: [PATCH] testsuite: Avoid running incompatible Arm tests

2024-07-19 Thread Richard Earnshaw (lists)
On 12/07/2024 09:02, Torbjörn SVENSSON wrote: > Ok for trunk and releases/gcc-14? > > -- > > Overriding the -mpfu and -mfloat-abi might be incompatible with selected > multilib. As a result, verify that the current multilib is compatible > with the effective target without changing the -mfpu or -

Re: [PATCH] c++: normalizing ttp parm constraints [PR115656]

2024-07-19 Thread Patrick Palka
On Fri, Jul 5, 2024 at 12:18 PM Patrick Palka wrote: > > Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK > for trunk/14 and perhaps 13? > > Alternatively we can set current_template_parms from weakly_subsumes > instead, who has only one caller anyway. Ping. > > -- >8 -- > >

[PATCH v1 0/3][libgcc] store signing key and signing method in DWARF _Unwind_FrameState

2024-07-19 Thread Matthieu Longo
This patch series is only a refactoring of the existing implementation of PAuth and returned-address signing. The existing behavior is preserved. 1. aarch64: store signing key and signing method in DWARF _Unwind_FrameState _Unwind_FrameState already contains several CIE and FDE information (see

[PATCH v1 1/3] aarch64: store signing key and signing method in DWARF _Unwind_FrameState

2024-07-19 Thread Matthieu Longo
This patch is only a refactoring of the existing implementation of PAuth and returned-address signing. The existing behavior is preserved. _Unwind_FrameState already contains several CIE and FDE information (see the attributes below the comment "The information we care about from the CIE/FDE" in l

[PATCH v1 2/3] libgcc: hide CIE and FDE data for DWARF architecture extensions behind a handler.

2024-07-19 Thread Matthieu Longo
This patch provides a new handler MD_ARCH_FRAME_STATE_T to hide an architecture-specific structure containing CIE and FDE data related to DWARF architecture extensions. Hiding the architecture-specific attributes behind a handler has the following benefits: 1. isolating those data from the generic

Re: [PATCH] c++: missing SFINAE during alias CTAD [PR115296]

2024-07-19 Thread Patrick Palka
On Fri, Jul 5, 2024 at 1:50 PM Patrick Palka wrote: > > Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look > OK for trunk/14? > > -- >8 -- > > During the alias CTAD transformation, if substitution failed for some > guide we should just discard the guide silently. We currently do >

[PATCH v1 3/3] libgcc: update configure (regenerated by autoreconf)

2024-07-19 Thread Matthieu Longo
libgcc/ChangeLog: * configure: Regenerate. --- libgcc/configure | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libgcc/configure b/libgcc/configure index a69d314374a..15a0be23644 100755 --- a/libgcc/configure +++ b/libgcc/configure @@ -587,6 +587,7 @@ ac_includes_default='/* none */

Re: [patch,avr] Support new built-in for faster mask computation

2024-07-19 Thread Jeff Law
On 7/18/24 3:12 PM, Georg-Johann Lay wrote: This new builtin provides a faster way to compute expressions like  1 << x  or ~(1 << x) that are sometimes used as masks for setting bits in the I/O region, and when x is not known at compile-time. The open coded C expression takes 5 + 4 * x cycles

Re: [PATCH] c++: xobj fn call without obj [PR115783]

2024-07-19 Thread Patrick Palka
On Sat, Jul 6, 2024 at 8:22 PM Patrick Palka wrote: > > Bootstrapped and regtested on x86_64-pc-linux-gnu, does this > look OK for trunk/14? Ping. > > -- >8 -- > > The code path for rejecting an object-less call to a non-static > member function should also consider xobj member functions so > th

Re: [PATCH v2 1/2] arm: [MVE intrinsics] fix vdup iterator

2024-07-19 Thread Richard Earnshaw (lists)
On 11/07/2024 10:36, Christophe Lyon wrote: > This patch fixes a bug where the mode iterator for mve_vdup > should be MVE_VLD_ST instead of MVE_vecs: V2DI and V2DF (thus vdup.64) > are not supported by MVE. > > 2024-07-02 Jolen Li > Christophe Lyon > > gcc/ > * config/a

[Patch, v3] gcn/mkoffload.cc: Use #embed for including the generated ELF file

2024-07-19 Thread Tobias Burnus
Hi, Jakub Jelinek wrote: + "#if defined(__STDC_EMBED_FOUND__) && __has_embed (\"%s\") == __STDC_EMBED_FOUND__\n" If this was an attempt to deal gracefully with no #embed support, then the above would be wrong and should have been #if defined(__STDC_EMBED_FOUND__) && defined(__has_embe

[pushed] c++: add fixed testcase [PR109464]

2024-07-19 Thread Patrick Palka
Seems to be fixed by r15-521-g6ad7ca1bb90573. PR c++/109464 gcc/testsuite/ChangeLog: * g++.dg/template/explicit-instantiation8.C: New test. --- .../g++.dg/template/explicit-instantiation8.C | 24 +++ 1 file changed, 24 insertions(+) create mode 100644 gcc/testsu

Re: [PATCH] testsuite: Allow vst1 instruction

2024-07-19 Thread Torbjorn SVENSSON
On 2024-07-19 16:36, Richard Earnshaw (lists) wrote: On 19/07/2024 14:07, Torbjörn SVENSSON wrote: Ok for trunk and releases/gcc-14? -- On Cortex-A7 with -mfloat-abi=hard and -mfpu=neon, the following instructions are generated for the test case: vldrd16, .L3 vst1.32

Re: [PATCH v2 2/2] arm: [MVE intrinsics] Improve vdupq_n implementation

2024-07-19 Thread Richard Earnshaw (lists)
On 11/07/2024 10:36, Christophe Lyon wrote: > This patch makes the non-predicated vdupq_n MVE intrinsics use > vec_duplicate rather than an unspec. This enables the compiler to > generate better code sequences (for instance using vmov when > possible). > > The patch renames the existing mve_vdup

Re: [PATCH] testsuite: Allow vst1 instruction

2024-07-19 Thread Richard Earnshaw (lists)
On 19/07/2024 16:10, Torbjorn SVENSSON wrote: > > > On 2024-07-19 16:36, Richard Earnshaw (lists) wrote: >> On 19/07/2024 14:07, Torbjörn SVENSSON wrote: >>> Ok for trunk and releases/gcc-14? >>> >>> -- >>> >>> On Cortex-A7 with -mfloat-abi=hard and -mfpu=neon, the following >>> instructions are

Re: [PATCH] c-family: Introduce the -Winvalid-noreturn flag from clang with extra tuneability

2024-07-19 Thread Jason Merrill
On 7/19/24 2:29 AM, Julian Waters wrote: Attempting to resend with a different client, plain text enabled... Still corrupted by word wrap and quoted-printable encoding, unfortunately. Probably the easiest solution is to send the patch as an attachment rather than pasted into the message. I

Re: [PATCH] c++: xobj fn call without obj [PR115783]

2024-07-19 Thread Jason Merrill
On 7/6/24 8:22 PM, Patrick Palka wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk/14? OK. -- >8 -- The code path for rejecting an object-less call to a non-static member function should also consider xobj member functions so that we properly reject the be

Re: [PATCH] c++: missing SFINAE during alias CTAD [PR115296]

2024-07-19 Thread Jason Merrill
On 7/19/24 10:55 AM, Patrick Palka wrote: On Fri, Jul 5, 2024 at 1:50 PM Patrick Palka wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk/14? -- >8 -- During the alias CTAD transformation, if substitution failed for some guide we should just discard the gui

Re: [Ping, Patch, Fortran, PR88624, v1] Fix Rejects allocatable coarray passed as a dummy argument

2024-07-19 Thread Paul Richard Thomas
Hi Andre, The patch looks fine to me. Please add the original testcase as pr88624.f90, since it can be a compile only. The addition to coarray/dummy_1.f90 is fine as well but I think that it is good to address the reporter's problem directly. Thanks Paul On Wed, 17 Jul 2024 at 14:10, Andre Veh

Re: [PATCH] c++: missing SFINAE during alias CTAD [PR115296]

2024-07-19 Thread Patrick Palka
On Fri, 19 Jul 2024, Jason Merrill wrote: > On 7/19/24 10:55 AM, Patrick Palka wrote: > > On Fri, Jul 5, 2024 at 1:50 PM Patrick Palka wrote: > > > > > > Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look > > > OK for trunk/14? > > > > > > -- >8 -- > > > > > > During the alias C

Ping: [Patch, fortran] PR115070 (and PR115348) - [13/14/15 Regression] ICE using IEEE_ARITHMETIC in a derived type method with class, intent(out)

2024-07-19 Thread Paul Richard Thomas
Hi All, Ping! I understand now why this works. The scope of the block is merged and so all the previous declarations that would otherwise disappear are added, even by the empty statement. Regards Paul On Mon, 15 Jul 2024 at 17:10, Paul Richard Thomas < paul.richard.tho...@gmail.com> wrote: >

Re: Ping: [Patch, fortran] PR115070 (and PR115348) - [13/14/15 Regression] ICE using IEEE_ARITHMETIC in a derived type method with class, intent(out)

2024-07-19 Thread Steve Kargl
Thanks for the patch and chasing down the magic. Path is ok to commit. -- steve On Fri, Jul 19, 2024 at 05:32:26PM +0100, Paul Richard Thomas wrote: > Hi All, > > Ping! > > I understand now why this works. The scope of the block is merged and so > all the previous declarations that would othe

[PATCH v2] MATCH: Add simplification for MAX and MIN to match.pd [PR109878]

2024-07-19 Thread Eikansh Gupta
Min and max could be optimized if both operands are defined by (same) variable restricted by an and(&). For signed types, optimization can be done when both constant have same sign bit. The patch also adds optimization for specific case of min/max(a, a&CST). This patch adds match pattern for: max

Re: [REPOST 1/3] Add support for -mcpu=power11

2024-07-19 Thread Michael Meissner
On Thu, Jul 18, 2024 at 08:08:44AM -0500, Segher Boessenkool wrote: > Hi! > > [ I reviewed this together with Ke Wen. All blame should go to me, all > praise to him. ] > > On Wed, Jul 10, 2024 at 01:34:26PM -0400, Michael Meissner wrote: > > [This is a repost of the June 4th patch] > > It is

[PATCH] recog: Disallow subregs in mode-punned value [PR115881]

2024-07-19 Thread Richard Sandiford
In g:9d20529d94b23275885f380d155fe8671ab5353a, I'd extended insn_propagation to handle simple cases of hard-reg mode punning. The punned "to" value was created using simplify_subreg rather than simplify_gen_subreg, on the basis that hard-coded subregs aren't generally useful after RA (where hard-re

[PATCH] Treat boolean vector elements as 0/-1 [PR115406]

2024-07-19 Thread Richard Sandiford
Previously we built vector boolean constants using 1 for true elements and 0 for false elements. This matches the predicates produced by SVE's PTRUE instruction, but leads to a miscompilation on AVX512, where all bits of a boolean element should be set. One option for RTL would be to make this ta

Re: [PATCH] Treat boolean vector elements as 0/-1 [PR115406]

2024-07-19 Thread Richard Biener
> Am 19.07.2024 um 19:44 schrieb Richard Sandiford : > > Previously we built vector boolean constants using 1 for true > elements and 0 for false elements. This matches the predicates > produced by SVE's PTRUE instruction, but leads to a miscompilation > on AVX512, where all bits of a boolean

Re: [REPOST 1/3] Add support for -mcpu=power11

2024-07-19 Thread Peter Bergner
On 7/19/24 12:34 PM, Michael Meissner wrote: > On Thu, Jul 18, 2024 at 08:08:44AM -0500, Segher Boessenkool wrote: >>> --- a/gcc/config/rs6000/ppc-auxv.h >>> +++ b/gcc/config/rs6000/ppc-auxv.h >>> @@ -47,9 +47,8 @@ >>> #define PPC_PLATFORM_PPC47612 >>> #define PPC_PLATFORM_POWER8

Re: [PATCH] RISC-V: Fix double mode under RV32 not utilize vf

2024-07-19 Thread Jeff Law
On 7/19/24 2:55 AM, demin.han wrote: Currently, some binops of vector vs double scalar under RV32 can't translated to vf but vfmv+vxx.vv. The cause is that vec_duplicate is also expanded to broadcast for double mode under RV32. last-combine can't process expanded broadcast. gcc/ChangeLog:

[PATCH] Avoid undefined behaviour in build_option_suggestions

2024-07-19 Thread Siddhesh Poyarekar
The inner loop in build_option_suggestions uses OPTION to take the address of OPTB and use it across iterations, which is undefined behaviour since OPTB is defined within the loop. Pull it outside the loop to make this defined. It's a trivial fix, so posting early. OK to commit once build and te

Re: [PATCH] Avoid undefined behaviour in build_option_suggestions

2024-07-19 Thread Jakub Jelinek
On Fri, Jul 19, 2024 at 12:52:06PM -0400, Siddhesh Poyarekar wrote: > The inner loop in build_option_suggestions uses OPTION to take the > address of OPTB and use it across iterations, which is undefined > behaviour since OPTB is defined within the loop. Pull it outside the > loop to make this def

[PATCH] rs6000, Add new overloaded vector shift builtin int128, varients

2024-07-19 Thread Carl Love
GCC developers: The following patch adds the int128 varients to the existing overloaded built-ins vec_sld, vec_sldb, vec_sldw, vec_sll, vec_slo, vec_srdb, vec_srl, vec_sro.  These varients were requested by Steve Munroe. The patch has been tested on a Power 10 system with no regressions. Ple

[PATCH] libsanitizer: also undef _TIME_BITS in sanitizer_procmaps_solaris.cpp

2024-07-19 Thread Thomas Petazzoni
Upstream commit https://github.com/llvm/llvm-project/commit/26800a2c7e7996dc773b4e990dd5cca41c45e1a9 of LLVM added a #undef _TIME_BITS in libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp to fix the build on 32-bit Linux platforms that have enabled 64-bit time_t using _TIME_BITS=64.

Re: [PATCH v2] RISC-V: More support of vx and vf for autovec comparison

2024-07-19 Thread Robin Dapp
> -(match_operand:V_VLSF 3 "register_operand")]))] > +(match_operand:V_VLSF 3 "nonmemory_operand")]))] Even though the integer compares have nonmemory operand here their respective insn patterns don't (but constrain properly). I guess what's happening with register operand and a c

Re: [PATCH v2] RISC-V: More support of vx and vf for autovec comparison

2024-07-19 Thread Robin Dapp
> I have a test. > The backend can't see -0.0 and It becomes 0.0 when translate to gimple. I don't think it should except when specifying -ffast-math or similar. But we don't have a shortcut to load a negative zero, just the positive one. -- Regards Robin

[COMMITTED] PR tree-optimzation/116003 - Check for SSA_NAME not in the IL yet.

2024-07-19 Thread Andrew MacLeod
When registering an equivalence, the oracle creates an initial equivalence for an SSA_NAME with itself in the def block.   This primarily prevents dominator queries from searching past the definition block. If the definition stmt for the SSA_NAME has not been placed in the CFG yet, we should

[OG14] Revert "[og10] vect: Add target hook to prefer gather/scatter instructions" (was: [PATCH] [og10] vect: Add target hook to prefer gather/scatter instructions)

2024-07-19 Thread Thomas Schwinge
Hi! On 2021-01-13T15:48:42-0800, Julian Brown wrote: > For AMD GCN, the instructions available for loading/storing vectors are > always scatter/gather operations (i.e. there are separate addresses for > each vector lane), so the current heuristic to avoid gather/scatter > operations with too many

Re: [PATCH] testsuite: powerpc: fix dg-do run typo

2024-07-19 Thread Sam James
"Kewen.Lin" writes: > Hi Sam, Hi Kewen, > > on 2024/7/19 11:28, Sam James wrote: >> 'dg-run' is not a valid dejagnu directive, 'dg-do run' is needed here >> for the test to be executed. >> >> 2024-07-18 Sam James >> >> PR target/108699 >> * gcc.target/powerpc/pr108699.c: Fix 'dg-

[PATCH] gcc: stop adding -fno-common for checking builds

2024-07-19 Thread Sam James
Originally added in r0-44646-g204250d2fcd084 and r0-44627-gfd350d241fecf6 whic moved -fno-common from all builds to just checking builds. Since r10-4867-g6271dd984d7f92, GCC defaults to -fno-common. There's no need to pass it specially for checking builds. We could keep it for older bootstrap com

Re: [PATCH] gcc: stop adding -fno-common for checking builds

2024-07-19 Thread Andrew Pinski
On Fri, Jul 19, 2024 at 5:23 PM Sam James wrote: > > Originally added in r0-44646-g204250d2fcd084 and r0-44627-gfd350d241fecf6 whic > moved -fno-common from all builds to just checking builds. > > Since r10-4867-g6271dd984d7f92, GCC defaults to -fno-common. There's no need > to pass it specially f

Re:[pushed] [PATCH] LoongArch: Organize the code related to split move and merge the same functions.

2024-07-19 Thread Lulu Cheng
Pushed to r15-2167. 在 2024/7/13 下午5:04, Lulu Cheng 写道: gcc/ChangeLog: * config/loongarch/loongarch-protos.h (loongarch_split_128bit_move): Delete. (loongarch_split_128bit_move_p): Delete. (loongarch_split_256bit_move): Delete. (loongarch_split_256bit_move

[PATCH] testsuite: fix pr115929-1.c with -Wformat-security

2024-07-19 Thread Sam James
Some distributions like Gentoo make -Wformat and -Wformat-security enabled by default. Pass -Wno-format to the test to avoid a spurious fail in such environments. gcc/testsuite/ PR rtl-optimization/115929 * gcc.dg/torture/pr115929-1.c: Pass -Wno-format. --- Richard, is this OK? I c

Re: [PATCH] testsuite: fix pr115929-1.c with -Wformat-security

2024-07-19 Thread Xi Ruoyao
On Sat, 2024-07-20 at 06:52 +0100, Sam James wrote: > Some distributions like Gentoo make -Wformat and -Wformat-security > enabled by default. Pass -Wno-format to the test to avoid a spurious > fail in such environments. > > gcc/testsuite/ > PR rtl-optimization/115929 > * gcc.dg/tortur

Re: [PATCH] gcc: stop adding -fno-common for checking builds

2024-07-19 Thread Richard Biener
> Am 20.07.2024 um 02:31 schrieb Andrew Pinski : > > On Fri, Jul 19, 2024 at 5:23 PM Sam James wrote: >> >> Originally added in r0-44646-g204250d2fcd084 and r0-44627-gfd350d241fecf6 >> whic >> moved -fno-common from all builds to just checking builds. >> >> Since r10-4867-g6271dd984d7f92,

Re: [PATCH] testsuite: fix pr115929-1.c with -Wformat-security

2024-07-19 Thread Sam James
Xi Ruoyao writes: > On Sat, 2024-07-20 at 06:52 +0100, Sam James wrote: >> Some distributions like Gentoo make -Wformat and -Wformat-security >> enabled by default. Pass -Wno-format to the test to avoid a spurious >> fail in such environments. >> >> gcc/testsuite/ >> PR rtl-optimization/115

Re: [PATCH] s390: Fix unresolved iterators bhfgq and xdee

2024-07-19 Thread Stefan Schulze Frielinghaus
I'm pinging this early since I would like to make sure that it gets into 14.2 RC which is about to be done on Tuesday 23rd July. On Tue, Jul 16, 2024 at 04:50:29PM +0200, Stefan Schulze Frielinghaus wrote: > Code attribute bhfgq is missing a mapping for TF. This results in > unresolved iterators