Re: [PATCH v2] rs6000: Add new pass for replacement of contiguous addresses vector load lxv with lxvp

2023-12-11 Thread Ajit Agarwal
Hello Kewen: On 12/12/23 11:58 am, Kewen.Lin wrote: > Hi Ajit, > > on 2023/12/8 16:01, Ajit Agarwal wrote: >> Hello Kewen: >> > > [snip...] > >> With UNSPEC_MMA_EXTRACT I could generate the register pair but functionally >> here is the >> below code which is incorrect. >> >> l lxvp %vs0,0(%

[PATCH] tree-optimization/112939 - VN PHI visiting and -ftrivial-auto-var-init

2023-12-11 Thread Richard Biener
The following builds upon the last fix, making sure we only value-number to visited (un-)defs, otherwise prefer .VN_TOP. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. PR tree-optimization/112939 * tree-ssa-sccvn.cc (visit_phi): When all args are undefined ma

Re: [PATCH] Treat "p" in asms as addressing VOIDmode

2023-12-11 Thread Andrew Pinski
On Mon, Dec 11, 2023 at 11:46 AM Richard Sandiford wrote: > > Jeff Law writes: > > On 11/27/23 05:12, Richard Sandiford wrote: > >> check_asm_operands was inconsistent about how it handled "p" after > >> RA compared to before RA. Before RA it tested the address with a > >> void (unknown) memory

[PATCH draft v2] sched: Don't skip empty block in scheduling [PR108273]

2023-12-11 Thread Kewen.Lin
Hi, on 2023/11/22 17:30, Kewen.Lin wrote: > on 2023/11/17 20:55, Alexander Monakov wrote: >> >> On Fri, 17 Nov 2023, Kewen.Lin wrote: I don't think you can run cleanup_cfg after sched_init. I would suggest to put it early in schedule_insns. >>> >>> Thanks for the suggestion, I placed it

[PATCH] LoongArch: Replace -mexplicit-relocs=auto simple-used address peephole2 with combine

2023-12-11 Thread Xi Ruoyao
The problem with peephole2 is it uses a naive sliding-window algorithm and misses many cases. For example: float a[1]; float t() { return a[0] + a[8000]; } is compiled to: la.local$r13,a la.local$r12,a+32768 fld.s $f1,$r13,0 fld.s $f0,$r12,-768

Re: [PATCH v2] rs6000: Add new pass for replacement of contiguous addresses vector load lxv with lxvp

2023-12-11 Thread Kewen.Lin
Hi Ajit, on 2023/12/8 16:01, Ajit Agarwal wrote: > Hello Kewen: > [snip...] > With UNSPEC_MMA_EXTRACT I could generate the register pair but functionally > here is the > below code which is incorrect. > > llxvp %vs0,0(%r4) > xxlor %vs32,%vs0,%vs0 > xvf32ger 0,%vs34,%vs32

PING^1 [PATCH] sched: Remove debug counter sched_block

2023-12-11 Thread Kewen.Lin
Hi, Gentle ping this: https://gcc.gnu.org/pipermail/gcc-patches/2023-November/636597.html BR, Kewen on 2023/11/15 17:01, Kewen.Lin wrote: > Hi, > > on 2023/11/10 01:40, Alexander Monakov wrote: > >> I agree with the concern. I hoped that solving the problem by skipping the BB >> like the (bit

PING^1 [PATCH] rs6000: New pass to mitigate SP float load perf issue on Power10

2023-12-11 Thread Kewen.Lin
Hi, Gentle ping: https://gcc.gnu.org/pipermail/gcc-patches/2023-November/636599.html BR, Kewen on 2023/11/15 17:16, Kewen.Lin wrote: > Hi, > > As Power ISA defines, when loading a scalar single precision (SP) > floating point from memory, we have the double precision (DP) format > in target re

[PATCH] Adjust vectorized cost for reduction.

2023-12-11 Thread liuhongt
x86 doesn't support horizontal reduction instructions, reduc_op_scal_m is emulated with vec_extract_half + op(half vector length) Take that into account when calculating cost for vectorization. Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. No big performance impact on SPEC2017 as measu

PING^6 [PATCH v2] rs6000: Don't use optimize_function_for_speed_p too early [PR108184]

2023-12-11 Thread Kewen.Lin
Hi, Gentle ping this: https://gcc.gnu.org/pipermail/gcc-patches/2023-January/609993.html BR, Kewen > on 2023/1/16 17:08, Kewen.Lin via Gcc-patches wrote: >> Hi, >> >> As Honza pointed out in [1], the current uses of function >> optimize_function_for_speed_p in rs6000_option_

PING^8 [PATCH 0/9] rs6000: Rework rs6000_emit_vector_compare

2023-12-11 Thread Kewen.Lin
Hi, Gentle ping this series: https://gcc.gnu.org/pipermail/gcc-patches/2022-November/607146.html BR, Kewen >>> on 2022/11/24 17:15, Kewen Lin wrote: Hi, Following Segher's suggestion, this patch series is to rework function rs6000_emit_vector_compare for

PING^1 [PATCH] range: Workaround different type precision issue between _Float128 and long double [PR112788]

2023-12-11 Thread Kewen.Lin
Hi, Gentle ping this: https://gcc.gnu.org/pipermail/gcc-patches/2023-December/639140.html BR, Kewen on 2023/12/4 17:49, Kewen.Lin wrote: > Hi, > > As PR112788 shows, on rs6000 with -mabi=ieeelongdouble type _Float128 > has the different type precision (128) from that (127) of type long > doubl

Re: [r14-6420 Regression] FAIL: gcc.target/i386/pr110790-2.c scan-assembler-times shrq 2 on Linux/x86_64

2023-12-11 Thread Hongtao Liu
On Tue, Dec 12, 2023 at 1:47 PM Jiang, Haochen via Gcc-regression wrote: > > > -Original Message- > > From: Jiang, Haochen > > Sent: Tuesday, December 12, 2023 9:11 AM > > To: Andrew Pinski (QUIC) ; haochen.jiang > > ; gcc-regress...@gcc.gnu.org; gcc- > > patc...@gcc.gnu.org > > Subject: R

Re: [Patch, rs6000] Clean up pre-checking of expand_block_compare

2023-12-11 Thread Kewen.Lin
Hi, on 2023/12/11 10:54, HAO CHEN GUI wrote: > Hi, > This patch cleans up pre-checking of expand_block_compare. It does > 1. Assert only P7 above can enter this function as it's already guard > by the expand. > 2. Return false when optimizing for size. > 3. Remove P7 CPU test as only P7 above ca

Re: [r14-6420 Regression] FAIL: gcc.target/i386/pr110790-2.c scan-assembler-times shrq 2 on Linux/x86_64

2023-12-11 Thread Andrew Pinski
On Mon, Dec 11, 2023, 21:48 Jiang, Haochen wrote: > > -Original Message- > > From: Jiang, Haochen > > Sent: Tuesday, December 12, 2023 9:11 AM > > To: Andrew Pinski (QUIC) ; haochen.jiang > > ; gcc-regress...@gcc.gnu.org; gcc- > > patc...@gcc.gnu.org > > Subject: RE: [r14-6420 Regression]

RE: [r14-6420 Regression] FAIL: gcc.target/i386/pr110790-2.c scan-assembler-times shrq 2 on Linux/x86_64

2023-12-11 Thread Jiang, Haochen
> -Original Message- > From: Jiang, Haochen > Sent: Tuesday, December 12, 2023 9:11 AM > To: Andrew Pinski (QUIC) ; haochen.jiang > ; gcc-regress...@gcc.gnu.org; gcc- > patc...@gcc.gnu.org > Subject: RE: [r14-6420 Regression] FAIL: gcc.target/i386/pr110790-2.c scan- > assembler-times shrq 2

Re: [PATCH] Don't assume it's AVX_U128_CLEAN after call_insn whose abi.mode_clobber(V4DImode) deosn't contains all SSE_REGS.

2023-12-11 Thread Hongtao Liu
On Fri, Dec 8, 2023 at 10:17 AM liuhongt wrote: > > If the function desn't clobber any sse registers or only clobber > 128-bit part, then vzeroupper isn't issued before the function exit. > the status not CLEAN but ANY after the function. > > Also for sibling_call, it's safe to issue an vzeroupper

Re: [PATCH] untyped calls: enable target switching [PR112334]

2023-12-11 Thread Alexandre Oliva
On Dec 11, 2023, Jeff Law wrote: >> >> for gcc/ChangeLog >> PR target/112334 >> * builtins.h (target_builtins): Add fields for apply_args_size >> and apply_result_size. >> * builtins.cc (apply_args_size, apply_result_size): Cache >> results in fields rather than in static variables. >> (get_app

Re: [PATCH] LoongArch: Fix warnings building libgcc

2023-12-11 Thread chenglulu
在 2023/12/12 上午9:58, chenglulu 写道: 在 2023/12/10 上午12:38, Xi Ruoyao 写道: We are excluding loongarch-opts.h from target libraries, but now struct loongarch_target and gcc_options are not declared in the target libraries, causing: In file included from ../.././gcc/options.h:8,  

Re: [Patch, rs6000] Correct definition of macro of fixed point efficient unaligned

2023-12-11 Thread Kewen.Lin
Hi, on 2023/12/11 09:49, HAO CHEN GUI wrote: > Hi, > The patch corrects the definition of > TARGET_EFFICIENT_OVERLAPPING_UNALIGNED and change its name to a > comprehensible name. > > Bootstrapped and tested on x86 and powerpc64-linux BE and LE with no > regressions. Is this OK for trunk? > >

[PATCH] contrib: add git gcc-style alias

2023-12-11 Thread Jason Merrill
OK for trunk? -- 8< -- I thought it could be easier to use check_GNU_style.py. With this alias, 'git gcc-style' will take a git revision as argument instead of a file, or check HEAD if no argument is given. contrib/ChangeLog: * gcc-git-customization.sh: Add git gcc-style alias. --- co

Re: [PATCH] i386: Fix missed APX_NDD check for shift/rotate expanders [PR 112943]

2023-12-11 Thread Hongtao Liu
On Mon, Dec 11, 2023 at 8:39 PM Hongyu Wang wrote: > > > > +__int128 u128_2 = (9223372036854775808 << 4) * foo0_u8_0; /* { > > > dg-warning "integer constant is so large that it is unsigned" "so large" > > > } */ > > > > Just you can use (9223372036854775807LL + (__int128) 1) instead of > >

[PATCH #2/2] strub: drop volatile from wrapper args [PR112938]

2023-12-11 Thread Alexandre Oliva
On Dec 11, 2023, Alexandre Oliva wrote: > (there's a #2/2 followup coming up that addresses the ??? comment added > herein) Here it is. Also regstrapped on x86_64-linux-gnu, along with the previous patch (that had also been regstrapped by itself). I think this would be a desirable thing to do

Re: [PATCH V4 2/3] Using pli for constant splitting

2023-12-11 Thread Kewen.Lin
Hi, on 2023/12/11 11:26, Jiufu Guo wrote: > Hi, > > For constant building e.g. r120=0x, which does not fit 'li or lis', > 'pli' is used to build this constant via 'emit_move_insn'. > > While for a complicated constant, e.g. 0xULL, when using > 'rs6000_emit_set_long_const'

[pushed] analyzer: add more test coverage for tainted modulus

2023-12-11 Thread David Malcolm
Add more test coverage for r14-6349-g0bef72539e585d. Pushed to trunk as r14-6444-g2900a77fe4e7d2. gcc/testsuite/ChangeLog: * gcc.dg/plugin/plugin.exp: Add taint-modulus.c to analyzer_kernel_plugin.c tests. * gcc.dg/plugin/taint-modulus.c: New test. --- gcc/testsuite/gcc.d

Re: [PATCH V4 1/3]rs6000: accurate num_insns_constant_gpr

2023-12-11 Thread Kewen.Lin
Hi Jeff, on 2023/12/11 11:26, Jiufu Guo wrote: > Hi, > > Trunk gcc supports more constants to be built via two instructions: > e.g. "li/lis; xori/xoris/rldicl/rldicr/rldic". > And then num_insns_constant should also be updated. > > Function "rs6000_emit_set_long_const" is used to build complicat

[committed] MAINTAINERS: Update my email address

2023-12-11 Thread Feng Wang
ChangeLog: * MAINTAINERS: Update my email address --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index f3683ff03ec..bc47e30325b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -705,7 +705,7 @@ Marcel Vollweiler

[committed] RISC-V: Add avail interface into function_group_info

2023-12-11 Thread Feng Wang
Patch v3: Fix typo and remove the modification of rvv.exp. Patch v2: Using variadic macro and add the dependency into t-riscv. In order to add other extension about vector,this patch add unsigned int (*avail) (void) into function_group_info to determine whether to register the intrinsic based on I

[Committed] RISC-V: Move RVV POLY VALUE estimation from riscv.cc to riscv-v.cc[NFC]

2023-12-11 Thread Juzhe-Zhong
This patch moves RVV POLY VALUE estimation from riscv.cc to riscv-v.cc for future better maintain like other target hook implementation. Committed as it is obviously a code refinement. gcc/ChangeLog: * config/riscv/riscv-protos.h (estimated_poly_value): New function. * config/ris

RE: [PATCH v7] libgfortran: Replace mutex with rwlock

2023-12-11 Thread Zhu, Lipeng
On 2023/12/12 1:45, H.J. Lu wrote: > On Sat, Dec 9, 2023 at 7:25 PM Zhu, Lipeng wrote: > > > > On 2023/12/9 23:23, Jakub Jelinek wrote: > > > On Sat, Dec 09, 2023 at 10:39:45AM -0500, Lipeng Zhu wrote: > > > > This patch try to introduce the rwlock and split the read/write to > > > > unit_root tre

[committed] MAINTAINERS: Add myself to write after approval and DCO

2023-12-11 Thread Feng Wang
ChangeLog: * MAINTAINERS: Add myself to write after approval --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 0dbcbadcfd7..f3683ff03ec 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -705,6 +705,7 @@ Marcel Vollweiler

Re:[pushed] [PATCH v5] LoongArch: Fix eh_return epilogue for normal returns.

2023-12-11 Thread chenglulu
Pushed to r14-6440. 在 2023/12/8 下午6:01, Yang Yujie 写道: On LoongArch, the regitsters $r4 - $r7 (EH_RETURN_DATA_REGNO) will be saved and restored in the function prologue and epilogue if the given function calls __builtin_eh_return. This causes the return value to be overwritten on normal return

[PATCH #1/2] strub: handle volatile promoted args in internal strub [PR112938]

2023-12-11 Thread Alexandre Oliva
When generating code for an internal strub wrapper, don't clear the DECL_NOT_GIMPLE_REG_P flag of volatile args, and gimplify them both before and after any conversion. While at that, move variable TMP into narrower scopes so that it's more trivial to track where ARG lives. Regstrapped on x86_6

Re: [PATCH] LoongArch: Fix warnings building libgcc

2023-12-11 Thread chenglulu
在 2023/12/10 上午12:38, Xi Ruoyao 写道: We are excluding loongarch-opts.h from target libraries, but now struct loongarch_target and gcc_options are not declared in the target libraries, causing: In file included from ../.././gcc/options.h:8, from ../.././gcc/tm.h:49,

Re: Introduce -finline-stringops

2023-12-11 Thread Alexandre Oliva
On Dec 11, 2023, Sam James wrote: > Alexandre Oliva via Gcc-patches writes: >> On Jun 2, 2023, Alexandre Oliva wrote: >> >>> Introduce -finline-stringops >> >> Ping? https://gcc.gnu.org/pipermail/gcc-patches/2023-June/620472.html > Should the docs for the x86-specific -minline-all-stringo

[PATCH] multiflags: fix doc warning properly

2023-12-11 Thread Alexandre Oliva
On Dec 11, 2023, Joseph Myers wrote: > On Fri, 8 Dec 2023, Alexandre Oliva wrote: >> @@ -20589,7 +20589,7 @@ allocation before or after interprocedural >> optimization. >> This option enables multilib-aware @code{TFLAGS} to be used to build >> target libraries with options different from those t

RE: [r14-6420 Regression] FAIL: gcc.target/i386/pr110790-2.c scan-assembler-times shrq 2 on Linux/x86_64

2023-12-11 Thread Jiang, Haochen
> -Original Message- > From: Andrew Pinski (QUIC) > Sent: Tuesday, December 12, 2023 9:01 AM > To: haochen.jiang ; Andrew Pinski (QUIC) > ; gcc-regress...@gcc.gnu.org; gcc- > patc...@gcc.gnu.org; Jiang, Haochen > Subject: RE: [r14-6420 Regression] FAIL: gcc.target/i386/pr110790-2.c scan-

RE: [r14-6420 Regression] FAIL: gcc.target/i386/pr110790-2.c scan-assembler-times shrq 2 on Linux/x86_64

2023-12-11 Thread Andrew Pinski (QUIC)
> -Original Message- > From: haochen.jiang > Sent: Monday, December 11, 2023 4:54 PM > To: Andrew Pinski (QUIC) ; gcc- > regress...@gcc.gnu.org; gcc-patches@gcc.gnu.org; haochen.ji...@intel.com > Subject: [r14-6420 Regression] FAIL: gcc.target/i386/pr110790-2.c scan- > assembler-times shrq

[r14-6420 Regression] FAIL: gcc.target/i386/pr110790-2.c scan-assembler-times shrq 2 on Linux/x86_64

2023-12-11 Thread haochen.jiang
On Linux/x86_64, 85c5efcffed19ca6160eeecc2d4faebd9fee63aa is the first bad commit commit 85c5efcffed19ca6160eeecc2d4faebd9fee63aa Author: Andrew Pinski Date: Sat Nov 11 15:54:10 2023 -0800 MATCH: (convert)(zero_one !=/== 0/1) for outer type and zero_one type are the same caused FAIL: gc

Re: [PATCH] libgccjit: Fix GGC segfault when using -flto

2023-12-11 Thread Antoni Boucher
I'm not sure how to do this. I tried the following commands, but this fails even on master: ../../gcc/configure --enable-host-shared --enable- languages=c,jit,c++,fortran,objc,lto --enable-checking=release -- disable-werror --prefix=/opt/gcc make bootstrap -j24 make -k check -j24 >From what I ca

Re: [Patch] OpenMP: Minor '!$omp allocators' cleanup - and still: Re: [patch] OpenMP/Fortran: Implement omp allocators/allocate for ptr/allocatables

2023-12-11 Thread Andrew MacLeod
On 12/11/23 17:12, Thomas Schwinge wrote: Hi! This issue would've been prevented if we'd actually use a distinct C++ data type for GCC types, checkable at compile time -- I'm thus CCing Andrew MacLeod for amusement or crying, "one more for the list!". ;-\ Perhaps the time has come  It i

RE: [PATCH 9/21]middle-end: implement vectorizable_early_exit for codegen of exit code

2023-12-11 Thread Tamar Christina
> > + vectype = truth_type_for (comp_type); > > so this leaves the producer of the mask in the GIMPLE_COND and we > vectorize the GIMPLE_COND as > > mask_1 = ...; > if (mask_1 != {-1,-1...}) > .. > > ? In principle only the mask producer needs a vector type and that > adjusted by bo

Re: [PATCH] c++: End lifetime of objects in constexpr after destructor call [PR71093]

2023-12-11 Thread Jakub Jelinek
On Mon, Dec 11, 2023 at 05:00:50PM -0500, Jason Merrill wrote: > In discussion of PR71093 it came up that more clobber_kind options would be > useful within the C++ front-end. > > gcc/ChangeLog: > > * tree-core.h (enum clobber_kind): Rename CLOBBER_EOL to > CLOBBER_STORAGE_END. Add C

Re: [PATCH] c++: End lifetime of objects in constexpr after destructor call [PR71093]

2023-12-11 Thread Marek Polacek
On Mon, Dec 11, 2023 at 05:00:50PM -0500, Jason Merrill wrote: > On 12/11/23 14:21, Marek Polacek wrote: > > On Mon, Dec 11, 2023 at 08:17:22PM +0100, Richard Biener wrote: > > > > > > > > > > Am 11.12.2023 um 20:12 schrieb Jason Merrill : > > > > Maybe something like this? Or shall we write out

Re: [Patch] OpenMP: Minor '!$omp allocators' cleanup - and still: Re: [patch] OpenMP/Fortran: Implement omp allocators/allocate for ptr/allocatables

2023-12-11 Thread Thomas Schwinge
Hi! This issue would've been prevented if we'd actually use a distinct C++ data type for GCC types, checkable at compile time -- I'm thus CCing Andrew MacLeod for amusement or crying, "one more for the list!". ;-\ (See

Re: [PATCH] c++: End lifetime of objects in constexpr after destructor call [PR71093]

2023-12-11 Thread Jason Merrill
On 12/11/23 14:21, Marek Polacek wrote: On Mon, Dec 11, 2023 at 08:17:22PM +0100, Richard Biener wrote: Am 11.12.2023 um 20:12 schrieb Jason Merrill : Maybe something like this? Or shall we write out the names like CLOBBER_OBJECT_START, CLOBBER_STORAGE_END, etc? Yeah, the abbreviations lo

[r14-6412 Regression] FAIL: libgomp.fortran/allocators-5.f90 -O (test for excess errors) on Linux/x86_64

2023-12-11 Thread haochen.jiang
On Linux/x86_64, 2505a8b41d3b74a545755a278f3750a29c1340b6 is the first bad commit commit 2505a8b41d3b74a545755a278f3750a29c1340b6 Author: Tobias Burnus Date: Mon Dec 11 15:08:07 2023 +0100 OpenMP: Minor '!$omp allocators' cleanup caused FAIL: gfortran.dg/gomp/allocate-5.f90 -O (intern

Re: [PATCH] aarch64: enable mixed-types for aarch64 simdclones

2023-12-11 Thread Thomas Schwinge
Hi Andre! On 2023-10-16T16:03:26+0100, "Andre Vieira (lists)" wrote: > Just a minor update to the patch, I had missed the libgomp testsuite, so > had to make some adjustments there too. Unfortunately, there appear to be a number of DejaGnu directive errors in your test case changes -- do you no

[PATCH] analyzer: fix uninitialized bitmap [PR112955]

2023-12-11 Thread David Malcolm
In r14-5566-g841008d3966c0f I added a new ctor for feasibility_state, but failed to call bitmap_clear on m_snodes_visited. Fixed thusly. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Verified fix manually with valgrind on gcc.dg/analyzer/data-model-20.c. Pushed to trunk as r14-64

Re: v2 [C PATCH] Fix regression causing ICE for structs with VLAs [PR 112488]

2023-12-11 Thread Joseph Myers
On Sat, 9 Dec 2023, Martin Uecker wrote: > Fix regression causing ICE for structs with VLAs [PR 112488] > > A previous patch the fixed several ICEs related to size expressions > of VM types (PR c/70418, ...) caused a regression for structs where > a DECL_EXPR is not generated anymore although req

Re: [PATCH] multiflags: fix doc warning

2023-12-11 Thread Joseph Myers
On Fri, 8 Dec 2023, Alexandre Oliva wrote: > @@ -20589,7 +20589,7 @@ allocation before or after interprocedural > optimization. > This option enables multilib-aware @code{TFLAGS} to be used to build > target libraries with options different from those the compiler is > configured to use by def

Re: [PATCH 1/2] libstdc++: Atomic wait/notify ABI stabilization

2023-12-11 Thread Jonathan Wakely
CCing Tom's current address, as he's not @redhat.com now. On Mon, 11 Dec 2023, 19:24 Nate Eldredge, wrote: > On Mon, 11 Dec 2023, Nate Eldredge wrote: > > > To fix, we need something like `__args._M_old = __val;` inside the loop > in > > __atomic_wait_address(), so that we always wait on the exa

Re: [PATCH] Treat "p" in asms as addressing VOIDmode

2023-12-11 Thread Richard Sandiford
Jeff Law writes: > On 11/27/23 05:12, Richard Sandiford wrote: >> check_asm_operands was inconsistent about how it handled "p" after >> RA compared to before RA. Before RA it tested the address with a >> void (unknown) memory mode: >> >> case CT_ADDRESS: >>/* Every address o

Re: [PATCH 1/2] libstdc++: Atomic wait/notify ABI stabilization

2023-12-11 Thread Nate Eldredge
On Mon, 11 Dec 2023, Nate Eldredge wrote: To fix, we need something like `__args._M_old = __val;` inside the loop in __atomic_wait_address(), so that we always wait on the exact value that the predicate __pred() rejected. Again, there are similar instances in atomic_timed_wait.h. Thinking t

Re: [PATCH] c++: End lifetime of objects in constexpr after destructor call [PR71093]

2023-12-11 Thread Marek Polacek
On Mon, Dec 11, 2023 at 08:17:22PM +0100, Richard Biener wrote: > > > > Am 11.12.2023 um 20:12 schrieb Jason Merrill : > > Maybe something like this? Or shall we write out the names like > > CLOBBER_OBJECT_START, CLOBBER_STORAGE_END, etc? > > Yeah, the abbreviations look a bit confusing so spe

Re: [PATCH] c++: End lifetime of objects in constexpr after destructor call [PR71093]

2023-12-11 Thread Richard Biener
> Am 11.12.2023 um 20:12 schrieb Jason Merrill : > > On 12/11/23 03:02, Richard Biener wrote: >>> On Sun, 10 Dec 2023, Jason Merrill wrote: >>> On 12/10/23 05:22, Richard Biener wrote: > Am 09.12.2023 um 21:13 schrieb Jason Merrill : > > On 11/2/23 21:18, Nathaniel Shead wrote: >

[pushed] testsuite: update mangling

2023-12-11 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- Since r14-6064-gc3f281a0c1ca50 this test was checking for the wrong mangling, but it still passed on targets that support ABI compatibility aliases. Let's avoid generating those aliases when checking mangling. gcc/ChangeLog: * com

Re: [PATCH] c++: End lifetime of objects in constexpr after destructor call [PR71093]

2023-12-11 Thread Jason Merrill
On 12/11/23 03:02, Richard Biener wrote: On Sun, 10 Dec 2023, Jason Merrill wrote: On 12/10/23 05:22, Richard Biener wrote: Am 09.12.2023 um 21:13 schrieb Jason Merrill : On 11/2/23 21:18, Nathaniel Shead wrote: Bootstrapped and regtested on x86-64_pc_linux_gnu. I'm not entirely sure if the

Re: [PING ^3][PATCH] rs6000: Fix issue in specifying PTImode as an attribute [PR106895]

2023-12-11 Thread jeevitha
Ping! Please review On 13/11/23 8:38 pm, jeevitha wrote: > Ping! > > please review. > > Thanks & Regards > Jeevitha > > On 25/08/23 7:49 am, Peter Bergner wrote: >> On 8/24/23 12:35 PM, Michael Meissner wrote: >>> On Thu, Jul 20, 2023 at 10:05:28AM +0530, jeevitha wrote: gcc/ PR

Re: [PATCH v8] c++: implement P2564, consteval needs to propagate up [PR107687]

2023-12-11 Thread Marek Polacek
On Mon, Dec 11, 2023 at 02:02:52PM -0500, Jason Merrill wrote: > On 12/11/23 03:49, FX Coudert wrote: > > Hi Marek, > > > > The patch is causing three failures on x86_64-apple-darwin21: > > > > > FAIL: g++.dg/cpp2a/concepts-explicit-inst1.C -std=c++20 scan-assembler > > > _Z1gI1XEvT_ > > > FAIL:

Re: [PATCH v8] c++: implement P2564, consteval needs to propagate up [PR107687]

2023-12-11 Thread Jason Merrill
On 12/11/23 03:49, FX Coudert wrote: Hi Marek, The patch is causing three failures on x86_64-apple-darwin21: FAIL: g++.dg/cpp2a/concepts-explicit-inst1.C -std=c++20 scan-assembler _Z1gI1XEvT_ FAIL: g++.dg/cpp2a/concepts-explicit-inst1.C -std=c++20 scan-assembler _Z1gI1YEvT_ I think these a

Re: Introduce -finline-stringops (was: Re: [RFC] Introduce -finline-memset-loops)

2023-12-11 Thread Sam James
Alexandre Oliva via Gcc-patches writes: > On Jun 2, 2023, Alexandre Oliva wrote: > >> Introduce -finline-stringops > > Ping? https://gcc.gnu.org/pipermail/gcc-patches/2023-June/620472.html Should the docs for the x86-specific -minline-all-stringops refer to the new -finline-stringops? than

Re: [PATCH V2] RISC-V: XFAIL scan dump fails for autovec PR111311

2023-12-11 Thread Edwin Lu
On 12/10/2023 9:37 PM, Kito Cheng wrote: diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr83518.C b/gcc/testsuite/g++.dg/tree-ssa/pr83518.C index b8a2bd1ebbd..6f2fc56c82c 100644 --- a/gcc/testsuite/g++.dg/tree-ssa/pr83518.C +++ b/gcc/testsuite/g++.dg/tree-ssa/pr83518.C @@ -24,4 +24,4 @@ unsigned t

[PATCH v2 FYI] -finline-stringops: avoid too-wide smallest_int_mode_for_size [PR112784]

2023-12-11 Thread Alexandre Oliva
On Dec 11, 2023, Richard Biener wrote: > you can use .exists (&move_mode) here to ... Aah, yeah, and that should help avoid the noisy as_a conversions too, that I could replace with require(), or drop altogether. >> + || (GET_MODE_BITSIZE (as_a (int_move_mode)) >> + != incr * BITS

Re: [PATCH v7] libgfortran: Replace mutex with rwlock

2023-12-11 Thread H.J. Lu
On Sat, Dec 9, 2023 at 7:25 PM Zhu, Lipeng wrote: > > On 2023/12/9 23:23, Jakub Jelinek wrote: > > On Sat, Dec 09, 2023 at 10:39:45AM -0500, Lipeng Zhu wrote: > > > This patch try to introduce the rwlock and split the read/write to > > > unit_root tree and unit_cache with rwlock instead of the mut

Re: [PATCH] Testsuite: restrict test to nonpic targets

2023-12-11 Thread Mike Stump
On Dec 11, 2023, at 12:29 AM, FX Coudert wrote: > > The test is currently failing on x86_64-apple-darwin. This patch requires > nonpic, as suggested in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112297 > by Andrew Pinski. > > OK to commit? Ok.

Re: Backport of "fixincludes: Update darwin_flt_eval_method for macOS 14"

2023-12-11 Thread FX Coudert
> Yes, OK (build fixes are on my list, but you got to it first). Backported to 13 as https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=87e6cc0103369f8891c3c3a516f4d93187c2c12b Backported to 12 as https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=65595b02668c99edcfd5aedac984ebcbb64a1685 FX

[PATCH v3 6/6] libgomp: fine-grained pinned memory allocator

2023-12-11 Thread Andrew Stubbs
This patch introduces a new custom memory allocator for use with pinned memory (in the case where the Cuda allocator isn't available). In future, this allocator will also be used for Unified Shared Memory. Both memories are incompatible with the system malloc because allocated memory cannot shar

[PATCH v3 4/6] openmp: -foffload-memory=pinned

2023-12-11 Thread Andrew Stubbs
Implement the -foffload-memory=pinned option such that libgomp is instructed to enable fully-pinned memory at start-up. The option is intended to provide a performance boost to certain offload programs without modifying the code. This feature only works on Linux, at present, and simply calls mlo

[PATCH v3 5/6] libgomp, nvptx: Cuda pinned memory

2023-12-11 Thread Andrew Stubbs
Use Cuda to pin memory, instead of Linux mlock, when available. There are two advantages: firstly, this gives a significant speed boost for NVPTX offloading, and secondly, it side-steps the usual OS ulimit/rlimit setting. The design adds a device independent plugin API for allocating pinned memo

[PATCH v3 2/6] libgomp, openmp: Add ompx_pinned_mem_alloc

2023-12-11 Thread Andrew Stubbs
This creates a new predefined allocator as a shortcut for using pinned memory with OpenMP. The name uses the OpenMP extension space and is intended to be consistent with other OpenMP implementations currently in development. The allocator is equivalent to using a custom allocator with the pinned

[PATCH v3 3/6] openmp: Add -foffload-memory

2023-12-11 Thread Andrew Stubbs
Add a new option. It's inactive until I add some follow-up patches. gcc/ChangeLog: * common.opt: Add -foffload-memory and its enum values. * coretypes.h (enum offload_memory): New. * doc/invoke.texi: Document -foffload-memory. --- gcc/common.opt | 16 ++

[PATCH v3 0/6] libgomp: OpenMP pinned memory omp_alloc

2023-12-11 Thread Andrew Stubbs
This patch series is a rework of the v2 series I posted in August: https://patchwork.sourceware.org/project/gcc/list/?series=23763&state=%2A&archive=both This version addresses most of the review comments from Tobias, but after discussion with Tobias and Thomas we've decided to skip the nice-to-h

[PATCH v3 1/6] libgomp: basic pinned memory on Linux

2023-12-11 Thread Andrew Stubbs
Implement the OpenMP pinned memory trait on Linux hosts using the mlock syscall. Pinned allocations are performed using mmap, not malloc, to ensure that they can be unpinned safely when freed. This implementation will work OK for page-scale allocations, and finer-grained allocations will be impl

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

2023-12-11 Thread Patrick Palka
We accept this testcase since r12-4453-g79802c5dcc043a. PR c++/63378 gcc/testsuite/ChangeLog: * g++.dg/template/fnspec3.C: New test. --- gcc/testsuite/g++.dg/template/fnspec3.C | 20 1 file changed, 20 insertions(+) create mode 100644 gcc/testsuite/g++.dg/t

Re: Ping: [PATCH] Add a late-combine pass [PR106594]

2023-12-11 Thread Robin Dapp
Hi Richard, I have tested the new pass on riscv64 and while it did exhibit some regressions, none of them are critical. Mostly, test expectations will need to be adjusted - no new execution failures. As mentioned in the initial discussion it does help us get the behavior we want but, as of now,

Re: [RFC] RISC-V: Support RISC-V Profiles in -march option.

2023-12-11 Thread Jeff Law
On 11/20/23 12:14, Jiawei wrote: Supports RISC-V profiles[1] in -march option. Default input set the profile is before other formal extensions. [1]https://github.com/riscv/riscv-profiles/blob/main/profiles.adoc gcc/ChangeLog: * common/config/riscv/riscv-common.cc (struct riscv_pro

Re: [RFC PATCH 1/1] nix: add a simple flake nix shell

2023-12-11 Thread Vincenzo Palazzo
Hi all, >Are you backing down from that opinion and deciding that this proposal is, indeed, after all specific to NixOS and only NixOS and is neither needed nor used on any other distro? I may be misreading the conversation, so let's restart it. Why should my RFC be inside the distro's repositor

Re: [PATCH] Treat "p" in asms as addressing VOIDmode

2023-12-11 Thread Maciej W. Rozycki
On Mon, 11 Dec 2023, Jeff Law wrote: > > This happened with the late-combine pass that I posted in October: > > https://gcc.gnu.org/pipermail/gcc-patches/2023-October/634166.html > > which in turn triggered an error from aarch64_print_operand_address. > > > > This patch takes the (hopefully) cons

Re: [PATCH] libgccjit Fix a RTL bug for libgccjit

2023-12-11 Thread Jeff Law
On 11/20/23 16:54, David Malcolm wrote: On Mon, 2023-11-20 at 16:38 -0700, Jeff Law wrote: On 11/20/23 15:46, David Malcolm wrote: On Fri, 2023-11-17 at 14:09 -0700, Jeff Law wrote: On 11/17/23 14:08, Antoni Boucher wrote: In contrast with the other frontends, libgccjit can be executed

Re: [PATCH v2 5/6] libgomp, nvptx: Cuda pinned memory

2023-12-11 Thread Tobias Burnus
On 11.12.23 15:31, Thomas Schwinge wrote: On 2023-12-08T17:44:14+0100, Tobias Burnus wrote: On 08.12.23 15:09, Thomas Schwinge wrote: On 22/11/2023 17:07, Tobias Burnus wrote: Let's start with the patch itself: --- a/libgomp/target.c +++ b/libgomp/target.c ... +static struct gomp_device_desc

Re: [PATCH] untyped calls: enable target switching [PR112334]

2023-12-11 Thread Jeff Law
On 12/1/23 08:10, Alexandre Oliva wrote: On Dec 1, 2023, Alexandre Oliva wrote: Also tested on arm-eabi, but it's *not* enough (or needed) to fix the PR, there's another bug lurking there, with a separate patch coming up. Here it is. The computation of apply_args_size and apply_re

Re: [PATCH] aarch64: Fix wrong code for bfloat when f16 is enabled [PR 111867]

2023-12-11 Thread Richard Sandiford
Andrew Pinski writes: > The problem here is when f16 is enabled, movbf_aarch64 accepts `Ufc` > as a constraint: > [ w, Ufc ; fconsts , fp16 ] fmov\t%h0, %1 > But that is for fmov values and in this case fmov represents f16 rather than > bfloat16 values. > This means we would get

Re: [PATCH] treat argp-based mem as frame related in dse

2023-12-11 Thread Jeff Law
On 12/11/23 02:26, Jiufu Guo wrote: Hi, Thanks for your quick reply! Jeff Law writes: On 12/10/23 20:07, Jiufu Guo wrote: I'm having a bit of a hard time convincing myself this is correct though. I can't see how rewriting the load to read the source of the prior store is unsafe. If t

Re: [PATCH] wrong code on m68k with -mlong-jump-table-offsets and -malign-int (PR target/112413)

2023-12-11 Thread Jeff Law
On 12/11/23 05:51, Mikael Pettersson wrote: On m68k the compiler assumes that the PC-relative jump-via-jump-table instruction and the jump table are adjacent with no padding in between. When -mlong-jump-table-offsets is combined with -malign-int, a 2-byte nop may be inserted before the jump t

Re: [PATCH] Treat "p" in asms as addressing VOIDmode

2023-12-11 Thread Jeff Law
On 11/27/23 05:12, Richard Sandiford wrote: check_asm_operands was inconsistent about how it handled "p" after RA compared to before RA. Before RA it tested the address with a void (unknown) memory mode: case CT_ADDRESS: /* Every address operand can be reloaded to f

Ping: [PATCH] Add a late-combine pass [PR106594]

2023-12-11 Thread Richard Sandiford
Ping --- This patch adds a combine pass that runs late in the pipeline. There are two instances: one between combine and split1, and one after postreload. The pass currently has a single objective: remove definitions by substituting into all uses. The pre-RA version tries to restrict itself to

Ping: [PATCH] Treat "p" in asms as addressing VOIDmode

2023-12-11 Thread Richard Sandiford
Ping --- check_asm_operands was inconsistent about how it handled "p" after RA compared to before RA. Before RA it tested the address with a void (unknown) memory mode: case CT_ADDRESS: /* Every address operand can be reloaded to fit. */ result = result

Re: [pushed] configure, libquadmath: Remove unintended AC_CHECK_LIBM [PR111928]

2023-12-11 Thread Jakub Jelinek
On Mon, Oct 23, 2023 at 02:18:39PM +0100, Iain Sandoe wrote: > This is a partial reversion of r14-4825-g6a6d3817afa02b to remove an > unintended change. > > Tested with x86_64-linux X arm-none-eabi (and x86_64-darwin X arm-non-eabi > and native x86_64-darwin bootstrap. Also reported by the OP to

[PATCH v4] aarch64: SVE/NEON Bridging intrinsics

2023-12-11 Thread Richard Ball
ACLE has added intrinsics to bridge between SVE and Neon. The NEON_SVE Bridge adds intrinsics that allow conversions between NEON and SVE vectors. This patch adds support to GCC for the following 3 intrinsics: svset_neonq, svget_neonq and svdup_neonq gcc/ChangeLog: * config.gcc: Adds ne

Re: Re: [PATCH 2/3] RISC-V: setmem for RISCV with V extension

2023-12-11 Thread Sergei Lewis
...oh, and keep the current approach if riscv-autovec-lmul=dynamic. Makes perfect sense - thanks! On Mon, Dec 11, 2023 at 3:01 PM 钟居哲 wrote: > I think we should leave it to user choice. > > --param=riscv-autovec-lmul=m1/m2/m4/m8/dynamic. > > So use TARGET_MAX_LMUL should be more reasonable. > >

Re: Re: [PATCH 2/3] RISC-V: setmem for RISCV with V extension

2023-12-11 Thread 钟居哲
I think we should leave it to user choice. --param=riscv-autovec-lmul=m1/m2/m4/m8/dynamic. So use TARGET_MAX_LMUL should be more reasonable. juzhe.zh...@rivai.ai From: Sergei Lewis Date: 2023-12-11 22:58 To: juzhe.zh...@rivai.ai CC: gcc-patches; Robin Dapp; Kito.cheng; jeffreyalaw Subject: R

Re: [PATCH 2/3] RISC-V: setmem for RISCV with V extension

2023-12-11 Thread Sergei Lewis
The thinking here is that using the largest possible LMUL when we know the operation will fit in fewer registers potentially leaves performance on the table - indirectly, due to the unnecessarily increased register pressure, and also directly, depending on the implementation. On Mon, Dec 11, 2023

Re: [PATCH v2 5/6] libgomp, nvptx: Cuda pinned memory

2023-12-11 Thread Thomas Schwinge
Hi! On 2023-12-08T17:44:14+0100, Tobias Burnus wrote: > On 08.12.23 15:09, Thomas Schwinge wrote: >>> On 22/11/2023 17:07, Tobias Burnus wrote: Let's start with the patch itself: > --- a/libgomp/target.c > +++ b/libgomp/target.c > ... > +static struct gomp_device_descr *

[PATCH] Add myself to write after approval

2023-12-11 Thread Paul Iannetta
Hi, I would like to add myself to write after approval, is it ok for master? Thanks, Paul Iannetta ---8<--- ChangeLog: * MAINTAINERS: Add myself to write after approval Signed-off-by: Paul Iannetta --- MAINTAINERS | 1 + 1 file

Re: [PATCH 1/2] analyzer: Remove check of unsigned_char in maybe_undo_optimize_bit_field_compare.

2023-12-11 Thread David Malcolm
On Mon, 2023-12-11 at 09:04 +0100, Richard Biener wrote: > On Sun, Dec 10, 2023 at 8:57 PM Andrew Pinski > wrote: > > > > From: Andrew Pinski > > > > The check for the type seems unnecessary and gets in the way > > sometimes. > > Also with a patch I am working on for match.pd, it causes a failu

Re: [PATCH V3 4/4] OpenMP: Permit additional selector properties

2023-12-11 Thread Tobias Burnus
This patch LGTM. Likewise 'LGTM' are patches 1/4 and 2/4, in line with my previous comments. (Those are unchanged to previous round.) Thanks for the patches! I still have to look at 3/4, which is large and did see some changes between v2 and v3. (Overall they seem to be really nice!) Tobias O

Re: [PATCH v2] testsuite: adjust call to abort in excess-precision-12

2023-12-11 Thread Jakub Jelinek
On Mon, Dec 11, 2023 at 02:35:52PM +0100, Marc Poulhiès wrote: > On non-hosted targets, cstdlib may not be sufficient to have abort > defined, but it should be for std::abort. > > gcc/testsuite/ChangeLog: > > * g++.target/i386/excess-precision-12.C: call std::abort instead of > abort. > --

[PATCH v2] testsuite: adjust call to abort in excess-precision-12

2023-12-11 Thread Marc Poulhiès
On non-hosted targets, cstdlib may not be sufficient to have abort defined, but it should be for std::abort. gcc/testsuite/ChangeLog: * g++.target/i386/excess-precision-12.C: call std::abort instead of abort. --- Changed from calling __builtin_abort to std::abort, as advised. Ok for mas

Re: [PATCH] testsuite: adjust call to abort in excess-precision-12

2023-12-11 Thread Marc Poulhiès
Hello, > Why wouldn't they have abort and what else does __builtin_abort () expand > to? It expands to abort but works around the "abort is undeclared" error. > There are 2000+ other tests in gcc.target/i386/ which call abort (), > not __builtin_abort (), after including directly or indirectly

  1   2   >