[PATCH] PR target/111778 - Fix undefined shifts in PowerPC compiler

2023-10-12 Thread Michael Meissner
I was building a cross compiler to PowerPC on my x86_86 workstation with the latest version of GCC on October 11th. I could not build the compiler on the x86_64 system as it died in building libgcc. I looked into it, and I discovered the compiler was recursing until it ran out of stack space.

[PATCH v1] RISC-V: Support FP lround/lroundf auto vectorization

2023-10-12 Thread pan2 . li
From: Pan Li This patch would like to support the FP lround/lroundf auto vectorization. * long lround (double) for rv64 * long lroundf (float) for rv32 Due to the limitation that only the same size of data type are allowed in the vectorier, the standard name lroundmn2 only act on DF => DI for

Re: PR111648: Fix wrong code-gen due to incorrect VEC_PERM_EXPR folding

2023-10-12 Thread Prathamesh Kulkarni
On Wed, 11 Oct 2023 at 16:57, Prathamesh Kulkarni wrote: > > On Wed, 11 Oct 2023 at 16:42, Prathamesh Kulkarni > wrote: > > > > On Mon, 9 Oct 2023 at 17:05, Richard Sandiford > > wrote: > > > > > > Prathamesh Kulkarni writes: > > > > Hi, > > > > The attached patch attempts to fix PR111648. > >

Re: Re: [PATCH] VECT: Enhance SLP of MASK_LEN_GATHER_LOAD[PR111721]

2023-10-12 Thread Richard Biener
On Thu, 12 Oct 2023, juzhe.zh...@rivai.ai wrote: > I tree-vect-slp.cc: > vect_get_and_check_slp_defs > 711: > > tree type = TREE_TYPE (oprnd); > dt = dts[i]; > if ((dt == vect_constant_def >|| dt == vect_external_def) > &&

Re: [PATCH] ifcvt/vect: Emit COND_ADD for conditional scalar reduction.

2023-10-12 Thread Richard Sandiford
Robin Dapp writes: >> It wasn't very clear, sorry, but it was the last sentence I was asking >> for clarification on, not the other bits. Why do we want to avoid >> generating a COND_ADD when the operand is a vectorisable call? > > Ah, I see, apologies. Upon thinking about it a bit more

RE: [PATCH v1] RISC-V: Support FP llrint auto vectorization

2023-10-12 Thread Li, Pan2
Sorry for misleading here. When implement the llrint after lrint, I realize llrint (DF => SF) are supported by the lrint already in the previous patche(es). Because they same the same standard name as well as the mode iterator. Thus, I may have 2 options here for the patch naming. 1. Only

Re: [pushed][PATCH v2] LoongArch: Adjust makefile dependency for loongarch headers.

2023-10-12 Thread chenglulu
Pushed to r14-4584. 在 2023/10/11 下午5:59, Yang Yujie 写道: gcc/ChangeLog: * config.gcc: Add loongarch-driver.h to tm_files. * config/loongarch/loongarch.h: Do not include loongarch-driver.h. * config/loongarch/t-loongarch: Append loongarch-multilib.h to $(GTM_H)

[PATCH v6] c++: Check for indirect change of active union member in constexpr [PR101631,PR102286]

2023-10-12 Thread Nathaniel Shead
On Wed, Oct 11, 2023 at 12:48:12AM +1100, Nathaniel Shead wrote: > On Mon, Oct 09, 2023 at 04:46:46PM -0400, Jason Merrill wrote: > > On 10/8/23 21:03, Nathaniel Shead wrote: > > > Ping for > > > https://gcc.gnu.org/pipermail/gcc-patches/2023-September/631203.html > > > > > > + && (TREE_CODE

[PATCH] RISCV: Bugfix for incorrect documentation heading nesting

2023-10-12 Thread Mary Bennett
gcc/ChangeLog: * doc/extend.texi: Change subsubsection to subsection for CORE-V built-ins. --- gcc/doc/extend.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index ffe8532ad91..e8180945ab4 100644 ---

[PATCH] reg-notes.def: Fix up description of REG_NOALIAS

2023-10-12 Thread Alex Coplan
Hi, The description of the REG_NOALIAS note in reg-notes.def isn't quite right. It describes it as being attached to call insns, but it is instead attached to a move insn receiving the return value from a call. This can be seen by looking at the code in calls.cc:expand_call which attaches the

Re: Re: [PATCH] VECT: Enhance SLP of MASK_LEN_GATHER_LOAD[PR111721]

2023-10-12 Thread juzhe.zh...@rivai.ai
Hi, Richi. I restrict as you said into vect_external_def. Then this condition made SLP failed: - if (mask_index >= 0 + if (mask_index >= 0 && internal_fn_len_index (ifn) < 0 && !vect_check_scalar_mask (vinfo, stmt_info, slp_node, mask_index,

Re: Re: [PATCH] VECT: Enhance SLP of MASK_LEN_GATHER_LOAD[PR111721]

2023-10-12 Thread juzhe.zh...@rivai.ai
Oh. I see. Here make vect_constant_def failed to SLP: tree-vect-slp.cc: vect_build_slp_tree_2 line 2354: if (oprnd_info->first_dt == vect_external_def || oprnd_info->first_dt == vect_constant_def) { slp_tree invnode = vect_create_new_slp_node (oprnd_info->ops);

[PATCH 2/2] Support 32/64-bit vectorization for conversion between _Float16 and integer/float.

2023-10-12 Thread liuhongt
Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. Ready push to trunk. gcc/ChangeLog: * config/i386/mmx.md (V2FI_32): New mode iterator (movd_v2hf_to_sse): Rename to .. (movd__to_sse): .. this. (movd_v2hf_to_sse_reg): Rename to ..

[PATCH 1/2] Enable vectorization for V2HF/V4HF rounding operations and sqrt.

2023-10-12 Thread liuhongt
For lrint/lround/lceil/lfoor is not vectorized due to vectorization restriction. When input element size is different from output element size, vectorization relies on the old TARGET_VECTORIZE_BUILTIN_VECTORIZED_FUNCTION intstead of the modern standand pattern name. The patch only supports

[PATCH v2] LoongArch: Delete macro definition ASM_OUTPUT_ALIGN_WITH_NOP.

2023-10-12 Thread Lulu Cheng
There are two reasons for removing this macro definition: 1. The default in the assembler is to use the nop instruction for filling. 2. For assembly directives: .align [abs-expr[, abs-expr[, abs-expr]]] The third expression it is the maximum number of bytes that should be skipped by this

Re: [PATCH 02/11] Handle epilogues that contain jumps

2023-10-12 Thread Richard Sandiford
Richard Biener writes: > On Tue, Aug 22, 2023 at 12:42 PM Szabolcs Nagy via Gcc-patches > wrote: >> >> From: Richard Sandiford >> >> The prologue/epilogue pass allows the prologue sequence >> to contain jumps. The sequence is then partitioned into >> basic blocks using

[PATCH] tree-optimization/111764 - wrong reduction vectorization

2023-10-12 Thread Richard Biener
The following removes a misguided attempt to allow x + x in a reduction path, also allowing x * x which isn't valid. x + x actually never arrives this way but instead is canonicalized to 2 * x. This makes reduction path handling consistent with how we handle the single-stmt reduction case.

Re: [PATCH v1] RISC-V: Support FP lround/lroundf auto vectorization

2023-10-12 Thread juzhe.zh...@rivai.ai
OK juzhe.zh...@rivai.ai From: pan2.li Date: 2023-10-12 16:59 To: gcc-patches CC: juzhe.zhong; pan2.li; yanzhang.wang; kito.cheng Subject: [PATCH v1] RISC-V: Support FP lround/lroundf auto vectorization From: Pan Li This patch would like to support the FP lround/lroundf auto vectorization.

Re: Re: [PATCH] VECT: Enhance SLP of MASK_LEN_GATHER_LOAD[PR111721]

2023-10-12 Thread juzhe.zh...@rivai.ai
I tree-vect-slp.cc: vect_get_and_check_slp_defs 711: tree type = TREE_TYPE (oprnd); dt = dts[i]; if ((dt == vect_constant_def || dt == vect_external_def) && !GET_MODE_SIZE (vinfo->vector_mode).is_constant () && (TREE_CODE

Re: [pushed][PATCH v3 0/2] LoongArch: Update target-supports.exp for LoongArch SX/ASX.

2023-10-12 Thread chenglulu
Pushed to r14-4585. 在 2023/9/28 下午6:05, Chenghui Pan 写道: This is the update of: https://gcc.gnu.org/pipermail/gcc-patches/2023-September/631379.html This version does not include changes for codes, but fixes the commit title format and appends the missing PR info. Chenghui Pan (2):

[PATCH v8] tree-ssa-sink: Improve code sinking pass

2023-10-12 Thread Ajit Agarwal
This patch improves code sinking pass to sink statements before call to reduce register pressure. Review comments are incorporated. Synced and modified with latest trunk sources. For example : void bar(); int j; void foo(int a, int b, int c, int d, int e, int f) { int l; l = a + b + c + d +e

[PATCH] tree-optimization/111773 - avoid CD-DCE of noreturn special calls

2023-10-12 Thread Richard Biener
The support to elide calls to allocation functions in DCE runs into the issue that when implementations are discovered noreturn we end up DCEing the calls anyway, leaving blocks without termination and without outgoing edges which is both invalid IL and wrong-code when as in the example the

Re: Re: [PATCH] VECT: Enhance SLP of MASK_LEN_GATHER_LOAD[PR111721]

2023-10-12 Thread Richard Biener
On Thu, 12 Oct 2023, ??? wrote: > Thanks Richi point it out. > > I found this patch can't make conditional gather load succeed on SLP. > > I am considering change MASK_LEN_GATHER_LOAD in pattern recognization: > > If no condition mask, in tree-vect-patterns.cc, I build MASK_LEN_GATHER_LOAD >

Re: [PATCH 6/6] aarch64: Add front-end argument type checking for target builtins

2023-10-12 Thread Richard Sandiford
"Richard Earnshaw (lists)" writes: > On 09/10/2023 14:12, Victor Do Nascimento wrote: >> >> >> On 10/7/23 12:53, Richard Sandiford wrote: >>> Richard Earnshaw writes: On 03/10/2023 16:18, Victor Do Nascimento wrote: > In implementing the ACLE read/write system register builtins it was

[PATCH V2] VECT: Enhance SLP of MASK_LEN_GATHER_LOAD[PR111721]

2023-10-12 Thread Juzhe-Zhong
This patch fixes this following FAILs in RISC-V regression: FAIL: gcc.dg/vect/vect-gather-1.c -flto -ffat-lto-objects scan-tree-dump vect "Loop contains only SLP stmts" FAIL: gcc.dg/vect/vect-gather-1.c scan-tree-dump vect "Loop contains only SLP stmts" FAIL: gcc.dg/vect/vect-gather-3.c -flto

[PATCH] libstdc++: Fix tr1/8_c_compatibility/cstdio/functions.cc regression with recent glibc

2023-10-12 Thread Jakub Jelinek
Hi! The following testcase started FAILing recently after the https://sourceware.org/git/?p=glibc.git;a=commit;h=64b1a44183a3094672ed304532bedb9acc707554 glibc change which marked vfscanf with nonnull (1) attribute. While vfwscanf hasn't been marked similarly (strangely), the patch changes that

[PATCH] tree-optimization/111779 - Handle some BIT_FIELD_REFs in SRA

2023-10-12 Thread Richard Biener
The following handles byte-aligned, power-of-two and byte-multiple sized BIT_FIELD_REF reads in SRA. In particular this should cover BIT_FIELD_REFs created by optimize_bit_field_compare. For gcc.dg/tree-ssa/ssa-dse-26.c we now SRA the BIT_FIELD_REF appearing there leading to more DSE, fully

Re: Re: [PATCH] VECT: Enhance SLP of MASK_LEN_GATHER_LOAD[PR111721]

2023-10-12 Thread Richard Biener
On Thu, 12 Oct 2023, juzhe.zh...@rivai.ai wrote: > Hi, Richi. > > I restrict as you said into vect_external_def. > > Then this condition made SLP failed: > > - if (mask_index >= 0 > + if (mask_index >= 0 && internal_fn_len_index (ifn) < 0 > && !vect_check_scalar_mask

Re: [PATCH-1v2, expand] Enable vector mode for compare_by_pieces [PR111449]

2023-10-12 Thread Richard Sandiford
HAO CHEN GUI writes: > Hi, > Vector mode instructions are efficient on some targets (e.g. ppc64). > This patch enables vector mode for compare_by_pieces. The non-member > function widest_fixed_size_mode_for_size takes by_pieces_operation > as the second argument and decide whether vector mode

Re: [PATCH] libstdc++: Fix tr1/8_c_compatibility/cstdio/functions.cc regression with recent glibc

2023-10-12 Thread Jonathan Wakely
On Thursday, 12 October 2023, Jakub Jelinek wrote: > Hi! > > The following testcase started FAILing recently after the > https://sourceware.org/git/?p=glibc.git;a=commit;h=64b1a44183a3094672ed304532bedb9acc707554 > glibc change which marked vfscanf with nonnull (1) attribute. > While vfwscanf

[PATCH v9] tree-ssa-sink: Improve code sinking pass

2023-10-12 Thread Ajit Agarwal
This patch improves code sinking pass to sink statements before call to reduce register pressure. Review comments are incorporated. Synced with latest trunk sources and modify the sinking pass accordingly. For example : void bar(); int j; void foo(int a, int b, int c, int d, int e, int f) {

Re: [PATCH V2] Emit funcall external declarations only if actually used.

2023-10-12 Thread Richard Sandiford
"Jose E. Marchesi" writes: > Hi Richard. > Thanks for looking at this! :) > > >> "Jose E. Marchesi" writes: >>> ping >> >> I don't know this code very well, and have AFAIR haven't worked >> with an assembler that requires external declarations, but since >> it's at a second ping :) >> >>>

Re: Ping: [PATCH v2 2/2] testsuite: Replace many dg-require-thread-fence with dg-require-atomic-cmpxchg-word

2023-10-12 Thread Christophe Lyon
LGTM but I'm not a maintainer ;-) On Thu, 12 Oct 2023 at 04:22, Hans-Peter Nilsson wrote: > > Ping. > > > From: Hans-Peter Nilsson > > Date: Wed, 4 Oct 2023 19:08:16 +0200 > > > > s/atomic-exchange/atomic-cmpxchg-word/g. > > Tested as v1. > > > > Ok to commit? > > -- >8 -- > > These tests

[Patch] libgomp.texi: Note to 'Memory allocation' sect and missing mem-memory routines

2023-10-12 Thread Tobias Burnus
This patch improves the documentation by completing the description of the remaining so far undocumented OpenMP Memory-Management Routines (except for the two function added in TR11, which are also unimplmeneted). Current online version:

Re: Re: [PATCH] VECT: Enhance SLP of MASK_LEN_GATHER_LOAD[PR111721]

2023-10-12 Thread juzhe.zh...@rivai.ai
In tree-vect-stmts.cc vect_check_scalar_mask Failed here: /* If the caller is not prepared for adjusting an external/constant SLP mask vector type fail. */ if (slp_node && !mask_node && SLP_TREE_DEF_TYPE (mask_node_1) != vect_internal_def) { if (dump_enabled_p

Re: [PATCH] wide-int: Allow up to 16320 bits wide_int and change widest_int precision to 32640 bits [PR102989]

2023-10-12 Thread Jakub Jelinek
On Thu, Oct 12, 2023 at 11:54:14AM +0100, Richard Sandiford wrote: > Jakub Jelinek writes: > > @@ -2036,11 +2075,20 @@ wi::lrshift_large (HOST_WIDE_INT *val, c > >unsigned int xlen, unsigned int xprecision, > >unsigned int precision, unsigned int shift) > > { > >

Re: [PATCH] PR target/111778 - Fix undefined shifts in PowerPC compiler

2023-10-12 Thread Jiufu Guo
Hi, Thanks for your quick fix! Michael Meissner writes: > I was building a cross compiler to PowerPC on my x86_86 workstation with the > latest version of GCC on October 11th. I could not build the compiler on the > x86_64 system as it died in building libgcc. I looked into it, and I >

Re: Re: [PATCH] VECT: Enhance SLP of MASK_LEN_GATHER_LOAD[PR111721]

2023-10-12 Thread juzhe.zh...@rivai.ai
The mask node is NULL since the caller : if (mask_index >= 0 && !vect_check_scalar_mask (vinfo, stmt_info, slp_node, mask_index, , NULL, _dt, _vectype)) return false; pass NULL to mask_node. juzhe.zh...@rivai.ai From: Richard

Re: [PATCH] tree-optimization/111779 - Handle some BIT_FIELD_REFs in SRA

2023-10-12 Thread Andre Vehreschild
Hi Richard, being the one who wrote the surrounding code: The fortran part looks good to me. Ok for merge from the fortran side. - Andre On Thu, 12 Oct 2023 11:44:01 + (UTC) Richard Biener wrote: > On Thu, 12 Oct 2023, Richard Biener wrote: > > > The following handles byte-aligned,

[PATCH v9] Improve code sinking pass

2023-10-12 Thread Ajit Agarwal
This patch improves code sinking pass to sink statements before call to reduce register pressure. Review comments are incorporated. Synced with latest sources and modify the code changes accordingly. For example : void bar(); int j; void foo(int a, int b, int c, int d, int e, int f) { int l;

Re: [PATCH] gimple-match: Do not try UNCOND optimization with COND_LEN.

2023-10-12 Thread Richard Sandiford
Robin Dapp via Gcc-patches writes: > Hi, > > as Juzhe noticed in gcc.dg/pr92301.c there was still something missing in > the last patch. The attached v2 makes sure we always have a COND_LEN > operation > before returning true and initializes len and bias even if they are unused. > >

[PATCH v1] RISC-V: Support FP lceil/lceilf auto vectorization

2023-10-12 Thread pan2 . li
From: Pan Li This patch would like to support the FP lceil/lceilf auto vectorization. * long lceil (double) for rv64 * long lceilf (float) for rv32 Due to the limitation that only the same size of data type are allowed in the vectorier, the standard name lceilmn2 only act on DF => DI for rv64,

Re: [PATCH v1] RISC-V: Support FP llrint auto vectorization

2023-10-12 Thread Kito Cheng
I would prefer first approach since it no changes other than adding testcase, that might confusing other people. Li, Pan2 於 2023年10月11日 週三 23:12 寫道: > Sorry for misleading here. > > When implement the llrint after lrint, I realize llrint (DF => SF) are > supported by the lrint already in the

Re: [PATCH] ifcvt/vect: Emit COND_ADD for conditional scalar reduction.

2023-10-12 Thread Richard Biener
On Wed, 11 Oct 2023, Robin Dapp wrote: > > It wasn't very clear, sorry, but it was the last sentence I was asking > > for clarification on, not the other bits. Why do we want to avoid > > generating a COND_ADD when the operand is a vectorisable call? > > Ah, I see, apologies. Upon thinking

Re: [PATCH V2] Emit funcall external declarations only if actually used.

2023-10-12 Thread Jose E. Marchesi
Hi Richard. Thanks for looking at this! :) > "Jose E. Marchesi" writes: >> ping > > I don't know this code very well, and have AFAIR haven't worked > with an assembler that requires external declarations, but since > it's at a second ping :) > >> >>> ping >>> [Differences from V1: -

[avr,committed] Implement atan2

2023-10-12 Thread Georg-Johann Lay
This implements atan2 which was missing from LibF7. Johann -- LibF7: Implement atan2. libgcc/config/avr/libf7/ * libf7.c (F7MOD_atan2_, f7_atan2): New module and function. * libf7.h: Adjust comments. * libf7-common.mk (CALL_PROLOGUES): Add atan2. diff --git

Re: [PATCH V2] Emit funcall external declarations only if actually used.

2023-10-12 Thread Jose E. Marchesi
> "Jose E. Marchesi" writes: >> Hi Richard. >> Thanks for looking at this! :) >> >> >>> "Jose E. Marchesi" writes: ping >>> >>> I don't know this code very well, and have AFAIR haven't worked >>> with an assembler that requires external declarations, but since >>> it's at a second ping :)

Re: [PATCH V2] Emit funcall external declarations only if actually used.

2023-10-12 Thread Richard Sandiford
"Jose E. Marchesi" writes: >> "Jose E. Marchesi" writes: >>> Hi Richard. >>> Thanks for looking at this! :) >>> >>> "Jose E. Marchesi" writes: > ping I don't know this code very well, and have AFAIR haven't worked with an assembler that requires external declarations,

[PATCH 5/6]AArch64: Fix Armv9-a warnings that get emitted whenever a ACLE header is used.

2023-10-12 Thread Tamar Christina
Hi All, At the moment, trying to use -march=armv9-a with any ACLE header such as arm_neon.h results in rows and rows of warnings saying: : warning: "__ARM_ARCH" redefined : note: this is the location of the previous definition This is obviously not useful and happens because the header was

[PATCH v2] RISC-V: Make xtheadcondmov-indirect tests robust against instruction reordering

2023-10-12 Thread Christoph Muellner
From: Christoph Müllner Fixes: c1bc7513b1d7 ("RISC-V: const: hide mvconst splitter from IRA") A recent change broke the xtheadcondmov-indirect tests, because the order of emitted instructions changed. Since the test is too strict when testing for a fixed instruction order, let's change the

Re: Ping: [PATCH v2 1/2] testsuite: Add dg-require-atomic-cmpxchg-word

2023-10-12 Thread Christophe Lyon
LGTM but I'm not a maintainer ;-) On Thu, 12 Oct 2023 at 04:21, Hans-Peter Nilsson wrote: > > Ping. > > > From: Hans-Peter Nilsson > > Date: Wed, 4 Oct 2023 19:04:55 +0200 > > > > > From: Hans-Peter Nilsson > > > Date: Wed, 4 Oct 2023 17:15:28 +0200 > > > > > New version coming up. > > > >

Re: [PATCH 5/6]AArch64: Fix Armv9-a warnings that get emitted whenever a ACLE header is used.

2023-10-12 Thread Richard Sandiford
Tamar Christina writes: > Hi All, > > At the moment, trying to use -march=armv9-a with any ACLE header such as > arm_neon.h results in rows and rows of warnings saying: > > : warning: "__ARM_ARCH" redefined > : note: this is the location of the previous definition > > This is obviously not useful

Re: [PATCH] wide-int: Allow up to 16320 bits wide_int and change widest_int precision to 32640 bits [PR102989]

2023-10-12 Thread Richard Sandiford
Jakub Jelinek writes: > @@ -2036,11 +2075,20 @@ wi::lrshift_large (HOST_WIDE_INT *val, c > unsigned int xlen, unsigned int xprecision, > unsigned int precision, unsigned int shift) > { > - unsigned int len = rshift_large_common (val, xval, xlen, xprecision, >

Re: Re: [PATCH] VECT: Enhance SLP of MASK_LEN_GATHER_LOAD[PR111721]

2023-10-12 Thread Richard Biener
On Thu, 12 Oct 2023, juzhe.zh...@rivai.ai wrote: > In tree-vect-stmts.cc > > vect_check_scalar_mask > > Failed here: > > /* If the caller is not prepared for adjusting an external/constant > SLP mask vector type fail. */ > if (slp_node > && !mask_node ^^^ where's the

Re: Re: [PATCH] VECT: Enhance SLP of MASK_LEN_GATHER_LOAD[PR111721]

2023-10-12 Thread Richard Biener
On Thu, 12 Oct 2023, juzhe.zh...@rivai.ai wrote: > Oh. I see. > > Here make vect_constant_def failed to SLP: > > tree-vect-slp.cc: > vect_build_slp_tree_2 > line 2354: > > if (oprnd_info->first_dt == vect_external_def > || oprnd_info->first_dt == vect_constant_def) > {

Re: [PATCH] wide-int: Allow up to 16320 bits wide_int and change widest_int precision to 32640 bits [PR102989]

2023-10-12 Thread Richard Sandiford
Jakub Jelinek writes: > On Thu, Oct 12, 2023 at 11:54:14AM +0100, Richard Sandiford wrote: >> Jakub Jelinek writes: >> > @@ -2036,11 +2075,20 @@ wi::lrshift_large (HOST_WIDE_INT *val, c >> > unsigned int xlen, unsigned int xprecision, >> > unsigned int precision,

Re: [PATCH] PR target/111778 - Fix undefined shifts in PowerPC compiler

2023-10-12 Thread David Edelsohn
On Thu, Oct 12, 2023 at 4:24 AM Michael Meissner wrote: > I was building a cross compiler to PowerPC on my x86_86 workstation with > the > latest version of GCC on October 11th. I could not build the compiler on > the > x86_64 system as it died in building libgcc. I looked into it, and I >

Re: [PATCH] tree-optimization/111779 - Handle some BIT_FIELD_REFs in SRA

2023-10-12 Thread Richard Biener
On Thu, 12 Oct 2023, Richard Biener wrote: > The following handles byte-aligned, power-of-two and byte-multiple > sized BIT_FIELD_REF reads in SRA. In particular this should cover > BIT_FIELD_REFs created by optimize_bit_field_compare. > > For gcc.dg/tree-ssa/ssa-dse-26.c we now SRA the

Re: [PATCH] RISCV: Bugfix for incorrect documentation heading nesting

2023-10-12 Thread Jeff Law
On 10/12/23 04:05, Mary Bennett wrote: gcc/ChangeLog: * doc/extend.texi: Change subsubsection to subsection for CORE-V built-ins. This is OK. I'll commit it shortly it. jeff

Re: [PATCH] gimple-match: Do not try UNCOND optimization with COND_LEN.

2023-10-12 Thread Richard Sandiford
Richard Sandiford writes: > Robin Dapp via Gcc-patches writes: >> [...] >> @@ -386,9 +390,29 @@ try_conditional_simplification (internal_fn ifn, >> gimple_match_op *res_op, >> default: >>gcc_unreachable (); >> } >> - *res_op = cond_op; >> - maybe_resimplify_conditional_op

Re: [PATCH] RISCV: Bugfix for incorrect documentation heading nesting

2023-10-12 Thread Jeff Law
On 10/12/23 04:05, Mary Bennett wrote: gcc/ChangeLog: * doc/extend.texi: Change subsubsection to subsection for CORE-V built-ins. Thanks for jumping on it quickly. I added the PR marker to the ChangeLog entry (bugzilla integration) and pushed this to the trunk. jeff

Re: [RFC] expr: don't clear SUBREG_PROMOTED_VAR_P flag for a promoted subreg [target/111466]

2023-10-12 Thread Vineet Gupta
On 10/11/23 19:37, Hans-Peter Nilsson wrote: ``` foo2: sext.w a6,a1 <-- this goes away beq a1,zero,.L4 li a5,0 li a0,0 .L3: addwa4,a2,a5 addwa5,a3,a5 addwa0,a4,a0 bltua5,a6,.L3

Re: Ping: [PATCH v2 1/2] testsuite: Add dg-require-atomic-cmpxchg-word

2023-10-12 Thread Jeff Law
On 10/12/23 08:38, Christophe Lyon wrote: LGTM but I'm not a maintainer ;-) LGTM to as well -- I usually try to stay out of libstdc++, but this looks simple enough. Both patches in this series are OK. jeff

Re: [PATCH v2] RISC-V: Make xtheadcondmov-indirect tests robust against instruction reordering

2023-10-12 Thread Jeff Law
On 10/12/23 07:06, Christoph Muellner wrote: From: Christoph Müllner Fixes: c1bc7513b1d7 ("RISC-V: const: hide mvconst splitter from IRA") A recent change broke the xtheadcondmov-indirect tests, because the order of emitted instructions changed. Since the test is too strict when testing

Re: [PATCH] RISC-V: Fix the riscv_legitimize_poly_move issue on targets where the minimal VLEN exceeds 512.

2023-10-12 Thread Kito Cheng
Yeah, will send v2 today Jeff Law 於 2023年10月12日 週四 09:15 寫道: > > > On 10/11/23 17:17, Kito Cheng wrote: > > Yeah, I'll take you suggestion and go ahead, Robin's suggestion is > > great but it's just a little too magic :P > So there'll be a V2 of this patch, right? Just want to make sure state

Re: [PATCH] C99 testsuite readiness: Some verified test case adjustments

2023-10-12 Thread Jeff Law
On 10/11/23 10:55, Florian Weimer wrote: The updated test cases still reproduce the bugs with old compilers. gcc/testsuite/ * gcc.c-torture/compile/pc44485.c (func_21): Add missing cast. * gcc.c-torture/compile/pr106101.c: Use builtins to avoid calls to undeclared

Re: [PATCH] reg-notes.def: Fix up description of REG_NOALIAS

2023-10-12 Thread Jeff Law
On 10/12/23 03:41, Alex Coplan wrote: Hi, The description of the REG_NOALIAS note in reg-notes.def isn't quite right. It describes it as being attached to call insns, but it is instead attached to a move insn receiving the return value from a call. This can be seen by looking at the code in

[Patch] libgomp.texi: Clarify OMP_TARGET_OFFLOAD=mandatory

2023-10-12 Thread Tobias Burnus
I noticed that while OMP_DEFAULT_DEVICE was updated a ref to OMP_TARGET_OFFLOAD (→ mandatory case) was missing. And OMP_TARGET_OFFLOAD wasn't updated at all for those changes. I hope the new version is clearer. Current versions:

Re: [PATCH] TEST: Add vectorization check

2023-10-12 Thread Jeff Law
On 10/9/23 08:59, Juzhe-Zhong wrote: These cases won't check SLP for load_lanes support target. Add vectorization check for situations. gcc/testsuite/ChangeLog: * gcc.dg/vect/pr97832-2.c: Add vectorization check. * gcc.dg/vect/pr97832-3.c: Ditto. *

Re: [PATCH][_Hashtable] Avoid redundant usage of rehash policy

2023-10-12 Thread François Dumont
Now that abi breakage is fixed and hoping that Friday is review day :-) Ping ! On 17/09/2023 22:41, François Dumont wrote: libstdc++: [_Hashtable] Avoid redundant usage of rehash policy Bypass usage of __detail::__distance_fwd and check for need to rehash when assigning an initializer_list

Re: [PATCH] tree-optimization/111773 - avoid CD-DCE of noreturn special calls

2023-10-12 Thread Jan Hubicka
> The support to elide calls to allocation functions in DCE runs into > the issue that when implementations are discovered noreturn we end > up DCEing the calls anyway, leaving blocks without termination and > without outgoing edges which is both invalid IL and wrong-code when > as in the example

[committed] wide-int: Fix build with gcc < 12 or clang++ [PR111787]

2023-10-12 Thread Jakub Jelinek
Hi! While my wide_int patch bootstrapped/regtested fine when I used GCC 12 as system gcc, apparently it doesn't with GCC 11 and older or clang++. For GCC before PR96555 C++ DR1315 implementation the compiler complains about template argument involving template parameters, for clang++ the same +

Re: [PATCH] RISC-V: Fix the riscv_legitimize_poly_move issue on targets where the minimal VLEN exceeds 512.

2023-10-12 Thread Jeff Law
On 10/11/23 17:17, Kito Cheng wrote: Yeah, I'll take you suggestion and go ahead, Robin's suggestion is great but it's just a little too magic :P So there'll be a V2 of this patch, right? Just want to make sure state is correct in patchwork. jeff

Re: [PATCH] C99 test suite readiness: Mark some C89 tests

2023-10-12 Thread Jeff Law
On 10/11/23 10:42, Florian Weimer wrote: Add -std=gnu89 to some tests which evidently target C89-only language features. gcc/testsuite/ * gcc.c-torture/compile/920501-11.c: Compile with -std=gnu89. * gcc.c-torture/compile/920501-23.c: Likewise. *

Re: [PATCH] C99 test suite conversation: Some unverified test case adjustments

2023-10-12 Thread Jeff Law
On 10/11/23 10:53, Florian Weimer wrote: These changes are assumed not to interfere with the test objective, but it was not possible to reproduce the historic test case failures (with or without the modification here). gcc/testsuite/ * gcc.c-torture/compile/2105-1.c: Add missing

Re: [PATCH v17 02/39] c-family, c++: Look up built-in traits through gperf

2023-10-12 Thread Patrick Palka
On Wed, 11 Oct 2023, Ken Matsui wrote: > Since RID_MAX soon reaches 255 and all traits are used approximately once in > a C++ translation unit, this patch instead uses only RID_TRAIT_EXPR and > RID_TRAIT_TYPE for all traits and uses gperf to look up the specific trait. > >

Re: [PATCH v2] RISC-V: Make xtheadcondmov-indirect tests robust against instruction reordering

2023-10-12 Thread Kito Cheng
Sorry for the late comment after Jeff say ok, but I guess we may consider add "-fno-schedule-insns -fno-schedule-insns2" to avoid disturbing from schedule like some of our test case in gcc/testsuite/gcc.target/riscv/rvv? On Thu, Oct 12, 2023 at 9:12 AM Jeff Law wrote: > > > > On 10/12/23 07:06,

Re: [PATCH v6] c++: Check for indirect change of active union member in constexpr [PR101631,PR102286]

2023-10-12 Thread Jason Merrill
On 10/12/23 04:53, Nathaniel Shead wrote: On Wed, Oct 11, 2023 at 12:48:12AM +1100, Nathaniel Shead wrote: On Mon, Oct 09, 2023 at 04:46:46PM -0400, Jason Merrill wrote: On 10/8/23 21:03, Nathaniel Shead wrote: Ping for https://gcc.gnu.org/pipermail/gcc-patches/2023-September/631203.html +

Re: [Patch] libgomp.texi: Clarify OMP_TARGET_OFFLOAD=mandatory

2023-10-12 Thread Jakub Jelinek
On Thu, Oct 12, 2023 at 06:37:00PM +0200, Tobias Burnus wrote: > libgomp.texi: Clarify OMP_TARGET_OFFLOAD=mandatory > > In OpenMP 5.0/5.1, the semantic of OMP_TARGET_OFFLOAD=mandatory was > insufficiently specified; 5.2 clarified this with extensions/clarifications > (omp_initial_device,

[PATCH] genemit: Split insn-emit.cc into ten files.

2023-10-12 Thread Robin Dapp
Hi, on riscv insn-emit.cc has grown to over 1.2 mio lines of code and compiling it takes considerable time. Therefore, this patch adjust genemit to create ten files insn-emit-1.cc to insn-emit-10.cc. In order to do so it first counts the number of available patterns, calculates the number of

[PATCH] c++: Fix compile-time-hog in cp_fold_immediate_r [PR111660]

2023-10-12 Thread Marek Polacek
Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? -- >8 -- My recent patch introducing cp_fold_immediate_r caused exponential compile time with nested COND_EXPRs. The problem is that the COND_EXPR case recursively walks the arms of a COND_EXPR, but after processing both arms it

Re: [PATCH v2] RISC-V: Make xtheadcondmov-indirect tests robust against instruction reordering

2023-10-12 Thread Kito Cheng
but anyway, I don't have a strong opinion for either way, just go ahead no matter which one you choose. On Thu, Oct 12, 2023 at 11:28 AM Kito Cheng wrote: > > Sorry for the late comment after Jeff say ok, but I guess we may > consider add "-fno-schedule-insns -fno-schedule-insns2" to avoid >

[PATCH v2] RISC-V: Fix the riscv_legitimize_poly_move issue on targets where the minimal VLEN exceeds 512.

2023-10-12 Thread Kito Cheng
riscv_legitimize_poly_move was expected to ensure the poly value is at most 32 times smaller than the minimal VLEN (32 being derived from '4096 / 128'). This assumption held when our mode modeling was not so precisely defined. However, now that we have modeled the mode size according to the

Re: [PATCH 2/1] c++: more non-static memfn call dependence cleanup [PR106086]

2023-10-12 Thread Patrick Palka
On Tue, 26 Sep 2023, Patrick Palka wrote: > Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK > for trunk? > > -- >8 -- > > This follow-up patch removes some more repetition of the type-dependent On second thought there's no good reason to split these patches into a two part

Re: [PATCH v6] c++: Check for indirect change of active union member in constexpr [PR101631,PR102286]

2023-10-12 Thread Nathaniel Shead
On Thu, Oct 12, 2023 at 04:24:00PM -0400, Jason Merrill wrote: > On 10/12/23 04:53, Nathaniel Shead wrote: > > On Wed, Oct 11, 2023 at 12:48:12AM +1100, Nathaniel Shead wrote: > > > On Mon, Oct 09, 2023 at 04:46:46PM -0400, Jason Merrill wrote: > > > > On 10/8/23 21:03, Nathaniel Shead wrote: > >

[PATCH v1] RISC-V: Support FP lfloor/lfloorf auto vectorization

2023-10-12 Thread pan2 . li
From: Pan Li This patch would like to support the FP lfloor/lfloorf auto vectorization. * long lfloor (double) for rv64 * long lfloorf (float) for rv32 Due to the limitation that only the same size of data type are allowed in the vectorier, the standard name lfloormn2 only act on DF => DI for

Re: [PATCH v1] RISC-V: Support FP lfloor/lfloorf auto vectorization

2023-10-12 Thread juzhe.zh...@rivai.ai
OK. juzhe.zh...@rivai.ai From: pan2.li Date: 2023-10-13 09:38 To: gcc-patches CC: juzhe.zhong; pan2.li; yanzhang.wang; kito.cheng Subject: [PATCH v1] RISC-V: Support FP lfloor/lfloorf auto vectorization From: Pan Li This patch would like to support the FP lfloor/lfloorf auto vectorization.

Re: [PATCH] c++: Fix compile-time-hog in cp_fold_immediate_r [PR111660]

2023-10-12 Thread Jason Merrill
On 10/12/23 17:04, Marek Polacek wrote: Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? -- >8 -- My recent patch introducing cp_fold_immediate_r caused exponential compile time with nested COND_EXPRs. The problem is that the COND_EXPR case recursively walks the arms of a

Re: Ping: [PATCH v2 1/2] testsuite: Add dg-require-atomic-cmpxchg-word

2023-10-12 Thread Jonathan Wakely
On Thu, 12 Oct 2023, 17:11 Jeff Law, wrote: > > > On 10/12/23 08:38, Christophe Lyon wrote: > > LGTM but I'm not a maintainer ;-) > LGTM to as well -- I usually try to stay out of libstdc++, but this > looks simple enough. Both patches in this series are OK. > Thanks for stepping in, Jeff. The

Re: [PATCH v1] RISC-V: Support FP lceil/lceilf auto vectorization

2023-10-12 Thread 钟居哲
LGTM。 juzhe.zh...@rivai.ai From: pan2.li Date: 2023-10-12 22:17 To: gcc-patches CC: juzhe.zhong; pan2.li; yanzhang.wang; kito.cheng Subject: [PATCH v1] RISC-V: Support FP lceil/lceilf auto vectorization From: Pan Li This patch would like to support the FP lceil/lceilf auto vectorization.

Re: [PATCH v2] RISC-V: Fix the riscv_legitimize_poly_move issue on targets where the minimal VLEN exceeds 512.

2023-10-12 Thread 钟居哲
LGTM juzhe.zh...@rivai.ai From: Kito Cheng Date: 2023-10-13 02:40 To: gcc-patches; kito.cheng; palmer; jeffreyalaw; rdapp; juzhe.zhong CC: Kito Cheng Subject: [PATCH v2] RISC-V: Fix the riscv_legitimize_poly_move issue on targets where the minimal VLEN exceeds 512. riscv_legitimize_poly_move

RE: [PATCH v1] RISC-V: Support FP llrint auto vectorization

2023-10-12 Thread Li, Pan2
Sure thing, thanks a lot and will follow the guidance. Pan From: Kito Cheng Sent: Thursday, October 12, 2023 10:42 PM To: Li, Pan2 Cc: 钟居哲 ; gcc-patches ; Wang, Yanzhang Subject: Re: [PATCH v1] RISC-V: Support FP llrint auto vectorization I would prefer first approach since it no changes

[PATCH v1] RISC-V: Add test for FP iroundf auto vectorization

2023-10-12 Thread pan2 . li
From: Pan Li The below FP API are supported already by sharing the same standard name, as well as the machine mode. int iroundf (float); This patch would like to add the test cases for ensuring the correctness. gcc/testsuite/ChangeLog: *

Re: [PATCH v1] RISC-V: Add test for FP iroundf auto vectorization

2023-10-12 Thread juzhe.zhong
lgtm Replied Message Frompan2...@intel.comDate10/13/2023 13:33 Togcc-patches@gcc.gnu.org Ccjuzhe.zh...@rivai.ai,pan2...@intel.com,yanzhang.w...@intel.com,kito.ch...@gmail.comSubject[PATCH v1] RISC-V: Add test for FP iroundf auto vectorization

RE: [PATCH v1] RISC-V: Add test for FP iroundf auto vectorization

2023-10-12 Thread Li, Pan2
Committed, thanks Juzhe. Pan From: juzhe.zhong Sent: Friday, October 13, 2023 1:39 PM To: Li, Pan2 Cc: gcc-patches@gcc.gnu.org; Li, Pan2 ; Wang, Yanzhang ; kito.ch...@gmail.com Subject: Re: [PATCH v1] RISC-V: Add test for FP iroundf auto vectorization lgtm Replied Message From

[PATCH] RISC-V Regression: Fix FAIL of bb-slp-pr69907.c for RVV

2023-10-12 Thread Juzhe-Zhong
Like ARM SVE and GCN, add RVV. gcc/testsuite/ChangeLog: * gcc.dg/vect/bb-slp-pr69907.c: Add RVV. --- gcc/testsuite/gcc.dg/vect/bb-slp-pr69907.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-pr69907.c

Re: [PATCH] Disparage slightly for the alternative which move DFmode between SSE_REGS and GENERAL_REGS.

2023-10-12 Thread Hongtao Liu
On Thu, Jul 6, 2023 at 1:53 PM Uros Bizjak via Gcc-patches wrote: > > On Thu, Jul 6, 2023 at 3:14 AM liuhongt wrote: > > > > For testcase > > > > void __cond_swap(double* __x, double* __y) { > > bool __r = (*__x < *__y); > > auto __tmp = __r ? *__x : *__y; > > *__y = __r ? *__y : *__x; > >

Re: [PATCH v2] RISC-V: Fix the riscv_legitimize_poly_move issue on targets where the minimal VLEN exceeds 512.

2023-10-12 Thread Kito Cheng
Committed with few changelog tweak :P On Thu, Oct 12, 2023 at 3:37 PM 钟居哲 wrote: > > LGTM > > > juzhe.zh...@rivai.ai > > > From: Kito Cheng > Date: 2023-10-13 02:40 > To: gcc-patches; kito.cheng; palmer; jeffreyalaw; rdapp; juzhe.zhong > CC: Kito Cheng > Subject:

[PATCH v1] RISC-V: Leverage stdint-gcc.h for RVV test cases

2023-10-12 Thread pan2 . li
From: Pan Li Leverage stdint-gcc.h for the int64_t types instead of typedef. Or we may have conflict with stdint-gcc.h in somewhere else. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/unop/math-llrint-0.c: Include stdint-gcc.h for int types. *

Re: [PATCH v1] RISC-V: Leverage stdint-gcc.h for RVV test cases

2023-10-12 Thread juzhe.zh...@rivai.ai
LGTM。 juzhe.zh...@rivai.ai From: pan2.li Date: 2023-10-13 10:22 To: gcc-patches CC: juzhe.zhong; pan2.li; yanzhang.wang; kito.cheng Subject: [PATCH v1] RISC-V: Leverage stdint-gcc.h for RVV test cases From: Pan Li Leverage stdint-gcc.h for the int64_t types instead of typedef. Or we may

  1   2   >