Re: [PATCH 1/2 v2] Ada: Synchronized private extensions are always limited

2023-09-13 Thread Arnaud Charlet via Gcc-patches
> No worries, and sorry for the trouble. I’m going to try using a different > client for the gcc mailing list, it doesn’t seem to like Outlook. Thanks for > catching that mistake! > > Please advise how I can get this patch actually applied, given my lack of > commit privilege. You first need t

Re: [PATCH] RISC-V: Support cond vnsrl/vnsra

2023-09-13 Thread Kito Cheng via Gcc-patches
LGTM On Wed, Sep 13, 2023 at 12:25 AM Lehua Ding wrote: > > This patch add combine patterns to combine vnsra.w[vxi] + vcond_mask > to a mask vnsra.w[vxi]. > > gcc/ChangeLog: > > * config/riscv/autovec-opt.md > (*cond_vtrunc): > New combine pattern. > (*cond_trunc): Ditto.

[PATCH] tree-optimization/111397 - missed copy propagation involving abnormal dest

2023-09-13 Thread Richard Biener via Gcc-patches
The following extends the previous enhancement to copy propagation involving abnormals. We can easily replace abnormal uses by not abnormal uses and only need to preserve the abnormals in PHI arguments flowing in from abnormal edges. This changes the may_propagate_copy argument indicating we are

Re: [PATCH] RISC-V: Support cond vfsgnj.vv autovec pattern

2023-09-13 Thread Kito Cheng via Gcc-patches
LGTM On Wed, Sep 13, 2023 at 12:25 AM Lehua Ding wrote: > > This patch add combine patterns to combine vfsgnj.vv + vcond_mask > to mask vfsgnj.vv. For vfsgnjx.vv, it can not be produced in midend > currently. We will send another patch to take this issue. > > gcc/ChangeLog: > > * config/r

Re: [PATCH] RISC-V: Support cond vmulh.vv and vmulu.vv

2023-09-13 Thread Kito Cheng via Gcc-patches
LGTM, thanks :) On Wed, Sep 13, 2023 at 12:25 AM Lehua Ding wrote: > > This patch adds combine patterns to combine vmulh[u].vv + vcond_mask > to mask vmulh[u].vv. For vmulsu.vv, it can not be produced in midend > currently. We will send another patch to take this issue. > > gcc/ChangeLog: > >

[PATCH] LoongArch: Reimplement multilib build option handling.

2023-09-13 Thread Yang Yujie
Library build options from --with-multilib-list used to be processed with *self_spec, which missed the driver's initial canonicalization. This caused limitations on CFLAGS override and the use of driver-only options like -m[no]-lsx. The problem is solved by promoting the injection rules of --with

Re: [PATCH] Tweak language choice in config-list.mk

2023-09-13 Thread Christophe Lyon via Gcc-patches
Hi! On Thu, 7 Sept 2023 at 11:30, Richard Sandiford via Gcc-patches < gcc-patches@gcc.gnu.org> wrote: > When I tried to use config-list.mk, the build for every triple except > the build machine's failed for m2. This is because, unlike other > languages, m2 builds target objects during all-gcc.

Re: [PATCH] RISC-V: Support cond vfsgnj.vv autovec pattern

2023-09-13 Thread Lehua Ding
Committed, thanks Kito. On 2023/9/13 16:49, Kito Cheng wrote: LGTM On Wed, Sep 13, 2023 at 12:25 AM Lehua Ding wrote: This patch add combine patterns to combine vfsgnj.vv + vcond_mask to mask vfsgnj.vv. For vfsgnjx.vv, it can not be produced in midend currently. We will send another patch to

Re: [PATCH] RISC-V: Support cond vnsrl/vnsra

2023-09-13 Thread Lehua Ding
Committed, thanks Kito. On 2023/9/13 15:56, Kito Cheng wrote: LGTM On Wed, Sep 13, 2023 at 12:25 AM Lehua Ding wrote: This patch add combine patterns to combine vnsra.w[vxi] + vcond_mask to a mask vnsra.w[vxi]. gcc/ChangeLog: * config/riscv/autovec-opt.md (*cond_vtrunc):

Re: [PATCH] RISC-V: Support cond vmulh.vv and vmulu.vv

2023-09-13 Thread Lehua Ding
Committed, thanks Kito. On 2023/9/13 16:50, Kito Cheng wrote: LGTM, thanks :) On Wed, Sep 13, 2023 at 12:25 AM Lehua Ding wrote: This patch adds combine patterns to combine vmulh[u].vv + vcond_mask to mask vmulh[u].vv. For vmulsu.vv, it can not be produced in midend currently. We will send a

[PATCH] tree-optimization/111387 - BB SLP and irreducible regions

2023-09-13 Thread Richard Biener via Gcc-patches
When we split an irreducible region for BB vectorization analysis the defensive handling of external backedge defs in vect_get_and_check_slp_defs doesn't work since that relies on dominance info to identify a backedge. The testcase also shows we are iterating over the function in a sub-optimal way

gimple-match: Do not try UNCOND optimization with COND_LEN.

2023-09-13 Thread juzhe.zh...@rivai.ai
Thanks Robin for fixing it. - : cond (cond_in), else_value (else_value_in) + : cond (cond_in), else_value (else_value_in), len (NULL_TREE), +bias (NULL_TREE)It seems that you shouldn't include this fix in the patch? + + if (len) +{ + /* If we had a COND_LEN before we need to ensure

Re: [PATCH 1/2] MATCH: [PR111364] Add some more minmax cmp operand simplifications

2023-09-13 Thread Andrew Pinski via Gcc-patches
On Tue, Sep 12, 2023 at 11:45 PM Richard Biener via Gcc-patches wrote: > > On Tue, Sep 12, 2023 at 5:31 PM Andrew Pinski via Gcc-patches > wrote: > > > > This adds a few more minmax cmp operand simplifications which were missed > > before. > > `MIN(a,b) < a` -> `a > b` > > `MIN(a,b) >= a` -> `a

[PATCH] RISC-V: Support VLS modes VEC_EXTRACT auto-vectorization

2023-09-13 Thread Juzhe-Zhong
This patch support VLS modes VEC_EXTRACT to fix PR111391: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111391 I need VLS modes VEC_EXTRACT to fix this issue. I have run the whole gcc testsuite, notice this patch increase these 4 FAILs: FAIL: c-c++-common/vector-subscript-4.c -std=gnu++14 scan-t

Re: [PATCH] RISC-V: Support VLS modes VEC_EXTRACT auto-vectorization

2023-09-13 Thread Robin Dapp via Gcc-patches
> -(define_expand "vec_extract" > +(define_expand "@vec_extract" Do we need the additional helper function? If not let's rather not add them for build-time reasons. The rest is OK, no need for v2. Regards Robin

[PATCH 2/2] RISC-V: Refactor vector reduction patterns

2023-09-13 Thread Lehua Ding
This patch adjust reduction patterns struct, change it from: (any_reduc:VI (vec_duplicate:VI (vec_select: (match_operand: 4 "register_operand" " vr, vr") (parallel [(const_int 0)]))) (match_operand:VI

[PATCH 1/2] RISC-V: Cleanup redundant reduction patterns after refactor vector mode

2023-09-13 Thread Lehua Ding
This patch cleanups redundant reduction patterns after Juzhe change vector mode from fixed-size to scalable-size. For example, whether it is zvl32b, zvl64b, zvl128b, RVVM1SI indicates that it occupies a vector register. Therefore, it is easy to map vector modes to LMUL1 vector modes with define_mod

[PATCH] libstdc++: Remove some more unconditional uses of atomics

2023-09-13 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux and aarch64-linux. I intend to push this to trunk. -- >8 -- These atomics cause linker errors on arm4t where __sync_synchronize is not defined. For single-threaded targets we don't need the atomics. libstdc++-v3/ChangeLog: * include/experimental/io_context (io_contex

Re: Re: [PATCH] RISC-V: Support VLS modes VEC_EXTRACT auto-vectorization

2023-09-13 Thread juzhe.zh...@rivai.ai
>> Do we need the additional helper function? Yes. We need the additional helper function since I will cal emit_insn (gen_vec_extract (mode, mode) in the following patch which fixes PR111391 ICE. juzhe.zh...@rivai.ai From: Robin Dapp Date: 2023-09-13 20:31 To: Juzhe-Zhong; gcc-patches CC: rd

Re: [PATCH] RISC-V: Support VLS modes VEC_EXTRACT auto-vectorization

2023-09-13 Thread Robin Dapp via Gcc-patches
> Yes. We need the additional helper function since I will cal emit_insn > (gen_vec_extract (mode, mode) > in the following patch which fixes PR111391 ICE. OK. Regards Robin

RE: [PATCH] RISC-V: Support VLS modes VEC_EXTRACT auto-vectorization

2023-09-13 Thread Li, Pan2 via Gcc-patches
Committed, thanks Robin. Pan -Original Message- From: Gcc-patches On Behalf Of Robin Dapp via Gcc-patches Sent: Wednesday, September 13, 2023 8:46 PM To: juzhe.zh...@rivai.ai; gcc-patches Cc: rdapp@gmail.com; kito.cheng ; Kito.cheng ; jeffreyalaw Subject: Re: [PATCH] RISC-V: Supp

[PATCH] RISC-V: Expand VLS mode to scalar mode move[PR111391]

2023-09-13 Thread Juzhe-Zhong
This patch fixes PR111391: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111391 PR target/111391 gcc/ChangeLog: * config/riscv/riscv.cc (riscv_legitimize_move): Expand VLS to scalar move. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/partial/slp-9.c: Adapt tes

Re: [PATCH] Checking undefined_p before using the vr

2023-09-13 Thread Andrew MacLeod via Gcc-patches
On 9/12/23 21:42, Jiufu Guo wrote: Hi, Richard Biener writes: On Thu, 7 Sep 2023, Jiufu Guo wrote: Hi, As discussed in PR111303: For pattern "(X + C) / N": "div (plus@3 @0 INTEGER_CST@1) INTEGER_CST@2)", Even if "X" has value-range and "X + C" does not overflow, "@3" may still be undefi

[PATCH V2] RISC-V: Expand VLS mode to scalar mode move[PR111391]

2023-09-13 Thread Juzhe-Zhong
This patch fixes PR111391: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111391 PR target/111391 gcc/ChangeLog: * config/riscv/riscv.cc (riscv_legitimize_move): Expand VLS to scalar move. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/partial/slp-9.c: Adapt tes

Re: [PATCH] RISC-V: Expand VLS mode to scalar mode move[PR111391]

2023-09-13 Thread juzhe.zh...@rivai.ai
Just realize this patch cause some unexpected ICE FAILs in GCC regression. Now, V2: https://gcc.gnu.org/pipermail/gcc-patches/2023-September/630194.html has fully passed the regression. juzhe.zh...@rivai.ai From: Juzhe-Zhong Date: 2023-09-13 21:01 To: gcc-patches CC: kito.cheng; kito.cheng

[PATCH] AArch64: List official cores before codenames

2023-09-13 Thread Wilco Dijkstra via Gcc-patches
List official cores first so that -cpu=native does not show a codename with -v or in errors/warnings. Passes regress, OK for commit? gcc/ChangeLog: * config/aarch64/aarch64-cores.def (neoverse-n1): Place before ares. (neoverse-v1): Place before zeus. (neoverse-v2): Place b

[AArch64][testsuite] Adjust vect_copy_lane_1.c for new code-gen

2023-09-13 Thread Prathamesh Kulkarni via Gcc-patches
Hi, After 27de9aa152141e7f3ee66372647d0f2cd94c4b90, there's a following regression: FAIL: gcc.target/aarch64/vect_copy_lane_1.c scan-assembler-times ins\\tv0.s\\[1\\], v1.s\\[0\\] 3 This happens because for the following function from vect_copy_lane_1.c: float32x2_t __attribute__((noinline, noclon

[PATCH] AArch64: Fix __sync_val_compare_and_swap [PR111404]

2023-09-13 Thread Wilco Dijkstra via Gcc-patches
__sync_val_compare_and_swap may be used on 128-bit types and either calls the outline atomic code or uses an inline loop. On AArch64 LDXP is only atomic if the value is stored successfully using STXP, but the current implementations do not perform the store if the comparison fails. In this case

Re: [PATCH] libatomic: Improve ifunc selection on AArch64

2023-09-13 Thread Wilco Dijkstra via Gcc-patches
ping From: Wilco Dijkstra Sent: 04 August 2023 16:05 To: GCC Patches ; Richard Sandiford Cc: Kyrylo Tkachov Subject: [PATCH] libatomic: Improve ifunc selection on AArch64   Add support for ifunc selection based on CPUID register.  Neoverse N1 supports atomic 128-bit load/store, so use the F

Re: [PATCH] libatomic: Enable lock-free 128-bit atomics on AArch64 [PR110061]

2023-09-13 Thread Wilco Dijkstra via Gcc-patches
ping From: Wilco Dijkstra Sent: 02 June 2023 18:28 To: GCC Patches Cc: Richard Sandiford ; Kyrylo Tkachov Subject: [PATCH] libatomic: Enable lock-free 128-bit atomics on AArch64 [PR110061]   Enable lock-free 128-bit atomics on AArch64.  This is backwards compatible with existing binaries, g

Re: [PATCH 2/2] libstdc++: Add dg-require-thread-fence in several tests

2023-09-13 Thread Christophe Lyon via Gcc-patches
On Tue, 12 Sept 2023 at 11:07, Jonathan Wakely wrote: > On Tue, 12 Sept 2023 at 08:59, Christophe Lyon > wrote: > > > > > > > > On Mon, 11 Sept 2023 at 18:11, Jonathan Wakely > wrote: > >> > >> On Mon, 11 Sept 2023 at 16:40, Christophe Lyon > >> wrote: > >> > > >> > > >> > > >> > On Mon, 11 Se

Re: [PATCH 2/2] libstdc++: Add dg-require-thread-fence in several tests

2023-09-13 Thread Jonathan Wakely via Gcc-patches
On Wed, 13 Sept 2023 at 16:38, Christophe Lyon via Libstdc++ wrote: > > On Tue, 12 Sept 2023 at 11:07, Jonathan Wakely wrote: > > > On Tue, 12 Sept 2023 at 08:59, Christophe Lyon > > wrote: > > > I've noticed several undefined references to > > __glibcxx_backtrace_create_state too > > > 19_diagn

Re: gcc-patches From rewriting mailman settings (Was: [Linaro-TCWG-CI] gcc patch #75674: FAIL: 68 regressions)

2023-09-13 Thread Iain Sandoe
Hi Mark, > On 12 Sep 2023, at 16:00, Mark Wielaard wrote: > Adding Jeff to CC who is the official gcc-patches mailinglist admin. > > On Tue, 2023-09-12 at 11:08 +0400, Maxim Kuvyrkov wrote: >> Normally, notifications from Linaro TCWG precommit CI are sent only to >> patch author and patch submi

Re: [PATCH] AArch64: List official cores before codenames

2023-09-13 Thread Richard Sandiford via Gcc-patches
Wilco Dijkstra writes: > List official cores first so that -cpu=native does not show a codename with -v > or in errors/warnings. Nice spot. > Passes regress, OK for commit? > > gcc/ChangeLog: > * config/aarch64/aarch64-cores.def (neoverse-n1): Place before ares. > (neoverse-v1):

[PATCH] c++: unifying identical tmpls from current inst [PR108347]

2023-09-13 Thread Patrick Palka via Gcc-patches
Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk? -- >8 -- Here more_specialized_partial_spec considers the two partial specializations to be unordered ultimately because unify for identical parm=arg=A::C returns failure due to C being dependent. This patch fixes th

[PATCH] c++: optimize unification of class specializations [PR89231]

2023-09-13 Thread Patrick Palka via Gcc-patches
Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk? -- >8 -- Since the LHS of a qualified-id is a non-deduced context, it effectively means we can't deduce from outer template arguments of a class template specialization. And checking for equality between the TI_TEMPL

Re: [PATCH v4] i386: Allow -mlarge-data-threshold with -mcmodel=large

2023-09-13 Thread Fangrui Song via Gcc-patches
On Tue, Aug 22, 2023 at 12:19 AM Fangrui Song wrote: > > On Tue, Aug 1, 2023 at 12:51 PM Fangrui Song wrote: > > > > When using -mcmodel=medium, large data objects larger than the > > -mlarge-data-threshold threshold are placed into large data sections > > (.lrodata, .ldata, .lbss and some varian

Re: [PATCH] Allow target attributes in non-gnu namespaces

2023-09-13 Thread Iain Buclaw via Gcc-patches
Excerpts from Richard Sandiford via Gcc-patches's message of September 8, 2023 6:29 pm: > Currently there are four static sources of attributes: > > - LANG_HOOKS_ATTRIBUTE_TABLE > - LANG_HOOKS_COMMON_ATTRIBUTE_TABLE > - LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE > - TARGET_ATTRIBUTE_TABLE > > All of the

Re: [PATCHSET] Reintroduce targetrustm hooks

2023-09-13 Thread Iain Buclaw via Gcc-patches
Excerpts from Arthur Cohen's message of September 7, 2023 3:41 pm: > Alright, was not expecting to mess up this patchset so bad so here we go: > > This patchset reintroduces proper targetrustm hooks without the old > problematic mess of macros we had, which had been removed for the first > merge o

Re: [PATCH][_GLIBCXX_INLINE_VERSION] Fix friend declarations

2023-09-13 Thread François Dumont via Gcc-patches
It's working and what's I've committed. Thanks On 12/09/2023 19:04, Jonathan Wakely wrote: On Tue, 12 Sept 2023 at 17:47, Jonathan Wakely wrote: On Wed, 23 Aug 2023 at 18:35, François Dumont via Libstdc++ wrote: Hi The few tests that are failing in versioned namespace mode are due to those

Re: [PATCH V4, rs6000] Disable generation of scalar modulo instructions

2023-09-13 Thread Segher Boessenkool
Hi! On Fri, Jun 30, 2023 at 02:26:35PM -0500, Pat Haugen wrote: > gcc/ > * config/rs6000/rs6000.cc (rs6000_rtx_costs): Check if disabling > scalar modulo. "Check whether the modulo instruction is disabled?" > * config/rs6000/rs6000.md (mod3, *mod3): Disable. > (define_expand umod

Re: [PATCH][_GLIBCXX_INLINE_VERSION] Fix friend declarations

2023-09-13 Thread Jonathan Wakely via Gcc-patches
On Wed, 13 Sept 2023 at 21:47, François Dumont wrote: > > It's working and what's I've committed. Nice, thanks! > > Thanks > > On 12/09/2023 19:04, Jonathan Wakely wrote: > > On Tue, 12 Sept 2023 at 17:47, Jonathan Wakely wrote: > >> On Wed, 23 Aug 2023 at 18:35, François Dumont via Libstdc++

[PATCH v4] c++: Move consteval folding to cp_fold_r

2023-09-13 Thread Marek Polacek via Gcc-patches
On Tue, Sep 12, 2023 at 05:26:25PM -0400, Jason Merrill wrote: > On 9/8/23 14:24, Marek Polacek wrote: > > + if (!in_immediate_context () > > + /* P2564: a subexpression of a manifestly constant-evaluated > > expression > > +or conversion is an immediate function context. */ > > +

Re: [PATCH 2/2 v2] Ada: Finalization of constrained subtypes of unconstrained synchronized private extensions

2023-09-13 Thread Gary Dismukes via Gcc-patches
Hi Richard, I hope you're doing well. I'm just following up on the patch (second version) that you sent us recently for the problem you ran into with the generation of the address finalization routine for synchronized private extensions. Thanks very much for finding this fix and submitting your

Re: [PATCH v4] c++: Move consteval folding to cp_fold_r

2023-09-13 Thread Jason Merrill via Gcc-patches
On 9/13/23 16:56, Marek Polacek wrote: On Tue, Sep 12, 2023 at 05:26:25PM -0400, Jason Merrill wrote: On 9/8/23 14:24, Marek Polacek wrote: + switch (TREE_CODE (stmt)) +{ +/* Unfortunately we must handle code like +false ? bar () : 42 + where we have to check bar too.

Re: [PATCH] testsuite work-around compound-assignment-1.c C++ failures on various targets [PR111377]

2023-09-13 Thread David Malcolm via Gcc-patches
On Tue, 2023-09-12 at 09:02 +0200, Jakub Jelinek wrote: > On Mon, Sep 11, 2023 at 11:11:30PM +0200, Jakub Jelinek via Gcc- > patches wrote: > > On Mon, Sep 11, 2023 at 07:27:57PM +0200, Benjamin Priour via Gcc- > > patches wrote: > > > Thanks for the report, > > > > > > After investigation it seem

Re: [WIP RFC] analyzer: Move gcc.dg/analyzer tests to c-c++-common (3) [PR96395]

2023-09-13 Thread David Malcolm via Gcc-patches
On Mon, 2023-09-11 at 19:44 +0200, priour...@gmail.com wrote: > From: benjamin priour > > Hi, > > Patch below is mostly done, just have to check the formatting. > Althought, I'd like your feedback on how to manage named_constants > from enum in C++. > > I've checked and the analyzer works as ex

[PATCH] Improve error message for if with an else part while in switch

2023-09-13 Thread Andrew Pinski via Gcc-patches
While writing some match.pd code, I was trying to figure out why I was getting an `expected ), got (` error message while writing an if statement with an else clause. For switch statements, the if statements cannot have an else clause so it would be better to have a decent error message saying that

[PATCH] libstdc++: Reduce integer std::to/from_chars symbol sizes

2023-09-13 Thread Patrick Palka via Gcc-patches
Tested on x86_64-pc-linux-gnu, does this look OK for trunk? -- >8 -- For std::to_chars: The constrained alias __integer_to_chars_result_type seems unnecessary ever since r10-3080-g28f0075742ed58 got rid of the only public overload which used it. Now only non-public overloads are constrained by

[PATCH v5] c++: Move consteval folding to cp_fold_r

2023-09-13 Thread Marek Polacek via Gcc-patches
On Wed, Sep 13, 2023 at 05:57:47PM -0400, Jason Merrill wrote: > On 9/13/23 16:56, Marek Polacek wrote: > > On Tue, Sep 12, 2023 at 05:26:25PM -0400, Jason Merrill wrote: > > > On 9/8/23 14:24, Marek Polacek wrote: > > > > + switch (TREE_CODE (stmt)) > > > > +{ > > > > +/* Unfortunately we

Re:[pushed] [PATCH v4 00/23] Add tests for SX vector instructions.

2023-09-13 Thread chenglulu
Pushed to r14-3928. 在 2023/9/13 上午11:31, Xiaolong Chen 写道: v3 -> v4: Modify the name of the patch file. In order to better test the function of the vector instruction, the 128 bit test cases are further split according to the function of the instruction. Xiaolong Chen (23): LoongArch

Re:[pushed] [PATCH v4 00/22] Added support for ASX vector instructions.

2023-09-13 Thread chenglulu
Pushed to r14-3951. 在 2023/9/13 上午11:38, Xiaolong Chen 写道: In order to better test the function of the vector instruction, the 256 bit test cases are further split according to the function of the instruction. Xiaolong Chen (22): LoongArch: Add tests for ASX vector xvadd/xvadda/xvaddi/xv

Re: [pushed][PATCH v2] LoongArch: Fix bug of 'di3_fake'.

2023-09-13 Thread chenglulu
Pushed to r14-3974. 在 2023/9/13 上午8:54, Lulu Cheng 写道: PR 111334 gcc/ChangeLog: * config/loongarch/loongarch.md: Fix bug of 'di3_fake'. gcc/testsuite/ChangeLog: * gcc.target/loongarch/pr111334.c: New test. --- v1 -> v2: Modify the template "*3", the S

Re: [PING][PATCH v2] Add clang's invalid-noreturn warning flag

2023-09-13 Thread Julian Waters via Gcc-patches
Pinging again, this is needed for the Windows Java VM to compile under gcc On Wed, Sep 13, 2023 at 11:09 AM Julian Waters wrote: > Second desperate ping for patch > https://gcc.gnu.org/pipermail/gcc-patches/2023-August/627913.html >

Re: [PATCH] xtensa: Optimize several boolean evaluations of EQ/NE against constant zero

2023-09-13 Thread Max Filippov via Gcc-patches
On Fri, Sep 8, 2023 at 1:49 AM Takayuki 'January June' Suwa wrote: > > An idiomatic implementation of boolean evaluation of whether a register is > zero or not in Xtensa is to assign 0 and 1 to the temporary and destination, > and then issue the MOV[EQ/NE]Z machine instruction > (See 8.3.2 Instruc

[PATCH 00/10] vect: Move costing next to the transform for vect store

2023-09-13 Thread Kewen Lin via Gcc-patches
This patch series is a follow up for the previous patch series for vector load [1]. Some of associated test cases show the benefits of this kind of structuring. Like the one on vect load, this patch series makes costing not call function vect_model_store_cost any more but next to the transform.

[PATCH 02/10] vect: Move vect_model_store_cost next to the transform in vectorizable_store

2023-09-13 Thread Kewen Lin via Gcc-patches
This patch is an initial patch to move costing next to the transform, it still adopts vect_model_store_cost for costing but moves and duplicates it down according to the handlings of different vect_memory_access_types or some special handling need, hope it can make the subsequent patches easy to re

[PATCH 04/10] vect: Simplify costing on vectorizable_scan_store

2023-09-13 Thread Kewen Lin via Gcc-patches
This patch is to simplify the costing on the case vectorizable_scan_store without calling function vect_model_store_cost any more. I considered if moving the costing into function vectorizable_scan_store is a good idea, for doing that, we have to pass several variables down which are only used for

[PATCH 05/10] vect: Adjust vectorizable_store costing on VMAT_ELEMENTWISE and VMAT_STRIDED_SLP

2023-09-13 Thread Kewen Lin via Gcc-patches
This patch adjusts the cost handling on VMAT_ELEMENTWISE and VMAT_STRIDED_SLP in function vectorizable_store. We don't call function vect_model_store_cost for them any more. Like what we improved for PR82255 on load side, this change helps us to get rid of unnecessary vec_to_scalar costing for so

[PATCH 06/10] vect: Adjust vectorizable_store costing on VMAT_LOAD_STORE_LANES

2023-09-13 Thread Kewen Lin via Gcc-patches
This patch adjusts the cost handling on VMAT_LOAD_STORE_LANES in function vectorizable_store. We don't call function vect_model_store_cost for it any more. It's the case of interleaving stores, so it skips all stmts excepting for first_stmt_info, consider the whole group when costing first_stmt_i

[PATCH 01/10] vect: Ensure vect store is supported for some VMAT_ELEMENTWISE case

2023-09-13 Thread Kewen Lin via Gcc-patches
When making/testing patches to move costing next to the transform code for vectorizable_store, some ICEs got exposed when I further refined the costing handlings on VMAT_ELEMENTWISE. The apparent cause is triggering the assertion in rs6000 specific function for costing rs6000_builtin_vectorization

[PATCH/RFC 08/10] aarch64: Don't use CEIL for vector_store in aarch64_stp_sequence_cost

2023-09-13 Thread Kewen Lin via Gcc-patches
This costing adjustment patch series exposes one issue in aarch64 specific costing adjustment for STP sequence. It causes the below test cases to fail: - gcc/testsuite/gcc.target/aarch64/ldp_stp_15.c - gcc/testsuite/gcc.target/aarch64/ldp_stp_16.c - gcc/testsuite/gcc.target/aarch64/ldp_stp_

[PATCH 07/10] vect: Adjust vectorizable_store costing on VMAT_CONTIGUOUS_PERMUTE

2023-09-13 Thread Kewen Lin via Gcc-patches
This patch adjusts the cost handling on VMAT_CONTIGUOUS_PERMUTE in function vectorizable_store. We don't call function vect_model_store_cost for it any more. It's the case of interleaving stores, so it skips all stmts excepting for first_stmt_info, consider the whole group when costing first_stmt

[PATCH 03/10] vect: Adjust vectorizable_store costing on VMAT_GATHER_SCATTER

2023-09-13 Thread Kewen Lin via Gcc-patches
This patch adjusts the cost handling on VMAT_GATHER_SCATTER in function vectorizable_store (all three cases), then we won't depend on vect_model_load_store for its costing any more. This patch shouldn't have any functional changes. gcc/ChangeLog: * tree-vect-stmts.cc (vect_model_store_co

[PATCH 09/10] vect: Get rid of vect_model_store_cost

2023-09-13 Thread Kewen Lin via Gcc-patches
This patch is to eventually get rid of vect_model_store_cost, it adjusts the costing for the remaining memory access types VMAT_CONTIGUOUS{, _DOWN, _REVERSE} by moving costing close to the transform code. Note that in vect_model_store_cost, there is one special handling for vectorizing a store int

[PATCH 10/10] vect: Consider vec_perm costing for VMAT_CONTIGUOUS_REVERSE

2023-09-13 Thread Kewen Lin via Gcc-patches
For VMAT_CONTIGUOUS_REVERSE, the transform code in function vectorizable_store generates a VEC_PERM_EXPR stmt before storing, but it's never considered in costing. This patch is to make it consider vec_perm in costing, it adjusts the order of transform code a bit to make it easy to early return fo

Re: [PATCH v1] rs6000: unnecessary clear after vctzlsbb in vec_first_match_or_eos_index

2023-09-13 Thread Kewen.Lin via Gcc-patches
Hi, on 2023/9/13 00:39, Ajit Agarwal wrote: > This patch removes zero extension from vctzlsbb as it already zero extends. > Bootstrapped and regtested on powerpc64-linux-gnu. > > Thanks & Regards > Ajit > > rs6000: unnecessary clear after vctzlsbb in vec_first_match_or_eos_index > > For rs6000

[PATCH] RISC-V: Fix ICE in get_avl_or_vl_reg[PR111395]

2023-09-13 Thread Juzhe-Zhong
This patch fix https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111395 ICE PR target/111395 gcc/ChangeLog: * config/riscv/riscv-vsetvl.cc (avl_info::operator==): Fix bug. (vector_insn_info::global_merge): Ditto. (vector_insn_info::get_avl_or_vl_reg): Ditto. (p

[committed] Limit header synopsis test to normal namespace

2023-09-13 Thread François Dumont via Gcc-patches
Committed as trivial.     libstdc++: Limit synopsis test to normal namespace     libstdc++-v3/ChangeLog     * testsuite/19_diagnostics/stacktrace/synopsis.cc: Add     { dg-require-normal-namespace "" }. François diff --git a/libstdc++-v3/testsuite/19_diagnostics/stacktrace/syn

Re: [PATCH] [11/12/13/14 Regression] ABI break in _Hash_node_value_base since GCC 11 [PR 111050]

2023-09-13 Thread François Dumont via Gcc-patches
Author: TC Date:   Wed Sep 6 19:31:55 2023 +0200     libstdc++: Force _Hash_node_value_base methods inline to fix abi (PR111050) https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=1b6f0476837205932613ddb2b3429a55c26c409d     changed _Hash_node_value_base to no longer derive from _Hash_node_base,

[PATCH] MATCH: Support `(a != (CST+1)) & (a > CST)` optimizations

2023-09-13 Thread Andrew Pinski via Gcc-patches
Even though this is done via reassocation, match can support these with a simple change to detect that the difference is just one. This allows to optimize these earlier and even during phiopt for an example. This patch adds the following cases: (a != (CST+1)) & (a > CST) -> a > (CST+1) (a != (CST-

[PATCH] debug/111409 - don't generate COMDAT macro sections for split DWARF

2023-09-13 Thread Omar Sandoval
Split DWARF files aren't processed by the linker, so DW_MACRO_import offsets aren't relocated and the .debug_macro.dwo sections aren't deduplicated and merged. There's no clear way for this to work for split DWARF, so disable it. gcc/ChangeLog: PR debug/111409 * dwarf2out.cc (out

[PATCH v11 00/40] Optimize type traits performance

2023-09-13 Thread Ken Matsui via Gcc-patches
This patch series optimizes type traits performance by implementing built-in type traits and using them in libstdc++. This patch version is bumped from the highest version among my separated patches. Changes in v11: * Merge all patches into one patch series * Rebase on top of trun

[PATCH v11 13/40] libstdc++: Optimize is_scoped_enum trait performance

2023-09-13 Thread Ken Matsui via Gcc-patches
This patch optimizes the performance of the is_scoped_enum trait by dispatching to the new __is_scoped_enum built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_scoped_enum): Use __is_scoped_enum built-in trait. (is_scoped_enum_v): Likewise. Signed-off-by

[PATCH v11 36/40] libstdc++: Optimize is_unsigned trait performance

2023-09-13 Thread Ken Matsui via Gcc-patches
This patch optimizes the performance of the is_unsigned trait by dispatching to the new __is_unsigned built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_unsigned): Use __is_unsigned built-in trait. (is_unsigned_v): Likewise. Signed-off-by: Ken Matsui -

[PATCH v11 37/40] c++, libstdc++: Implement __is_signed built-in trait

2023-09-13 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_signed. gcc/cp/ChangeLog: * cp-trait.def: Define __is_signed. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_SIGNED. * semantics.cc (trait_expr_value): Likewise. (finish_trait_expr): Likewise. gcc/testsuite/C

[PATCH v11 03/40] libstdc++: Optimize is_const trait performance

2023-09-13 Thread Ken Matsui via Gcc-patches
This patch optimizes the performance of the is_const trait by dispatching to the new __is_const built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_const): Use __is_const built-in trait. (is_const_v): Likewise. Signed-off-by: Ken Matsui --- libstdc++-v3/includ

[PATCH v11 24/40] c++: Implement __is_function built-in trait

2023-09-13 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_function. gcc/cp/ChangeLog: * cp-trait.def: Define __is_function. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_FUNCTION. * semantics.cc (trait_expr_value): Likewise. (finish_trait_expr): Likewise. gcc/tests

[PATCH v11 19/40] libstdc++: Optimize is_member_function_pointer trait performance

2023-09-13 Thread Ken Matsui via Gcc-patches
This patch optimizes the performance of the is_member_function_pointer trait by dispatching to the new __is_member_function_pointer built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_member_function_pointer): Use __is_member_function_pointer built-in trait.

[PATCH v11 18/40] c++: Implement __is_member_function_pointer built-in trait

2023-09-13 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_member_function_pointer. gcc/cp/ChangeLog: * cp-trait.def: Define __is_member_function_pointer. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_MEMBER_FUNCTION_POINTER. * semantics.cc (trait_expr_value): Likewi

[PATCH v11 38/40] libstdc++: Optimize is_signed trait performance

2023-09-13 Thread Ken Matsui via Gcc-patches
This patch optimizes the performance of the is_signed trait by dispatching to the new __is_signed built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_signed): Use __is_signed built-in trait. (is_signed_v): Likewise. Signed-off-by: Ken Matsui --- libstdc++-v3/i

[PATCH v11 17/40] c-family: Fix C_SET_RID_CODE to handle 16-bit rid code correctly

2023-09-13 Thread Ken Matsui via Gcc-patches
This patch fixes incorrect handling for the new 16-bit rid code. Unsigned char was previously used for the 8-bit rid code, but unsigned short is now required. gcc/c-family/ChangeLog: * c-common.h (C_SET_RID_CODE): Use unsigned short instead of unsigned char. Ref: Initial discussi

[PATCH v11 29/40] c++, libstdc++: Implement __is_pointer built-in trait

2023-09-13 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_pointer. gcc/cp/ChangeLog: * cp-trait.def: Define __is_pointer. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_POINTER. * semantics.cc (trait_expr_value): Likewise. (finish_trait_expr): Likewise. gcc/testsuit

[PATCH v11 31/40] c++, libstdc++: Implement __is_arithmetic built-in trait

2023-09-13 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_arithmetic. gcc/cp/ChangeLog: * cp-trait.def: Define __is_arithmetic. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_ARITHMETIC. * semantics.cc (trait_expr_value): Likewise. (finish_trait_expr): Likewise. gcc

[PATCH v11 39/40] c++, libstdc++: Implement __is_scalar built-in trait

2023-09-13 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_scalar. The existent __is_scalar codes were replaced with __is_scalar_type to avoid unintentional macro replacement by the new built-in. gcc/cp/ChangeLog: * cp-trait.def: Define __is_scalar. * constraint.cc (diagnose_trait_expr): Ha

[PATCH v11 26/40] libstdc++: Optimize is_object trait performance

2023-09-13 Thread Ken Matsui via Gcc-patches
This patch optimizes the performance of the is_object trait by dispatching to the new __is_function and __is_reference built-in traits. libstdc++-v3/ChangeLog: * include/std/type_traits (is_object): Use __is_function and __is_reference built-in traits. (is_object_v): Likewi

[PATCH v11 22/40] c++: Implement __is_reference built-in trait

2023-09-13 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_reference. gcc/cp/ChangeLog: * cp-trait.def: Define __is_reference. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_REFERENCE. * semantics.cc (trait_expr_value): Likewise. (finish_trait_expr): Likewise. gcc/te

[PATCH v11 35/40] c++: Implement __is_unsigned built-in trait

2023-09-13 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_unsigned. gcc/cp/ChangeLog: * cp-trait.def: Define __is_unsigned. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_UNSIGNED. * semantics.cc (trait_expr_value): Likewise. (finish_trait_expr): Likewise. gcc/tests

[PATCH v11 10/40] c++: Implement __is_bounded_array built-in trait

2023-09-13 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_bounded_array. gcc/cp/ChangeLog: * cp-trait.def: Define __is_bounded_array. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_BOUNDED_ARRAY. * semantics.cc (trait_expr_value): Likewise. (finish_trait_expr): Likew

[PATCH v11 34/40] libstdc++: Optimize is_compound trait performance

2023-09-13 Thread Ken Matsui via Gcc-patches
This patch optimizes the performance of the is_compound trait by dispatching to the new __is_arithmetic built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_compound): Do not use __not_. (is_compound_v): Use is_fundamental_v instead. Signed-off-by: Ken Matsui --

[PATCH v11 15/40] libstdc++: Optimize is_member_pointer trait performance

2023-09-13 Thread Ken Matsui via Gcc-patches
This patch optimizes the performance of the is_member_pointer trait by dispatching to the new __is_member_pointer built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_member_pointer): Use __is_member_pointer built-in trait. (is_member_pointer_v): Likewise.

[PATCH v11 33/40] libstdc++: Optimize is_fundamental trait performance

2023-09-13 Thread Ken Matsui via Gcc-patches
This patch optimizes the performance of the is_fundamental trait by dispatching to the new __is_arithmetic built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_fundamental_v): Use __is_arithmetic built-in trait. (is_fundamental): Likewise. Optimize the ori

[PATCH v11 32/40] libstdc++: Optimize is_arithmetic trait performance

2023-09-13 Thread Ken Matsui via Gcc-patches
This patch optimizes the performance of the is_arithmetic trait by dispatching to the new __is_arithmetic built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_arithmetic): Use __is_arithmetic built-in trait. (is_arithmetic_v): Likewise. Signed-off-by: Ken

[PATCH v11 21/40] libstdc++: Optimize is_member_object_pointer trait performance

2023-09-13 Thread Ken Matsui via Gcc-patches
This patch optimizes the performance of the is_member_object_pointer trait by dispatching to the new __is_member_object_pointer built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_member_object_pointer): Use __is_member_object_pointer built-in trait. (is_

[PATCH v11 02/40] c++: Implement __is_const built-in trait

2023-09-13 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_const. gcc/cp/ChangeLog: * cp-trait.def: Define __is_const. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_CONST. * semantics.cc (trait_expr_value): Likewise. (finish_trait_expr): Likewise. gcc/testsuite/Chan