Re: [wwwdocs] gcc-13/changes.html: Document C++ -fexcess-precision=standard

2023-02-10 Thread Gerald Pfeifer
On Thu, 9 Feb 2023, Jakub Jelinek wrote: > Martin Liska mentioned that porting_to.html doesn't mention > the C++ excess precision changes. Not really sure if porting_to > should document those, but I think changes.html certainly should. Do you think this is a widely spread issue for existing soft

Re: [PATCH 3/3] vect: inbranch SIMD clones

2023-02-10 Thread Jakub Jelinek via Gcc-patches
On Fri, Jan 06, 2023 at 12:20:33PM +, Andrew Stubbs wrote: > > > +/* Ensure the the in-branch simd clones are used on targets that support > > > + them. These counts include all call and definitions. */ > > > + > > > +/* { dg-skip-if "" { x86_64-*-* } { "-flto" } { "" } } */ > > > > Drop l

Re: [PATCH] Add x86_64-gnu target to contrib/config-list.mk

2023-02-10 Thread Thomas Schwinge
Hi! On 2023-02-02T00:55:01-0500, Flavio Cruz wrote: > contrib/ChangeLog: > * config-list.mk: Add x86_64-gnu to list of archs. > > Signed-off-by: Flavio Cruz Thanks, pushed to GCC master branch in commit e635681dd26abf8243b49f6fd39d3582d57225ba "Add x86_64-gnu target to contrib/config-list

[PATCH] tree-optimization/106722 - fix CD-DCE edge marking

2023-02-10 Thread Richard Biener via Gcc-patches
The following fixes a latent issue when we mark control edges but end up with marking a block with no stmts necessary. In this case we fail to mark dependent control edges of that block. Bootstrapped and tested on x86_64-unknown-linux-gnu. Does this look OK? Thanks, Richard. PR tree-op

[GCC] In 'contrib/config-list.mk', clarify i686-symbolics-gnu to i686-gnu (was: RFA: Add makefile for cross-configuration torture test)

2023-02-10 Thread Thomas Schwinge
Hi! On 2011-04-13T06:49:31-0400, Joern Rennecke wrote: > [...] > This Makefile is supposed to give coverage of all the main configure targets > and notable variants that enable different config files. > [...] > --- contrib/config-list.mk(revision 0) > +++ contrib/config-list.mk(revision

[PATCH] RISC-V: Add Full 'v' extension predicate to vsmul intrinsic

2023-02-10 Thread juzhe . zhong
From: Ju-Zhe Zhong According to RVV ISA, vsmul are not supported for EEW=64 in Zve64*, so add Full 'V' extension required into predicate of vsmul intrinsics. gcc/ChangeLog: * config/riscv/riscv-vector-builtins-functions.def (vsmul): Change iterators. --- gcc/config/riscv/riscv-vector

RE: [PATCH 2/2]AArch64 Update div-bitmask to implement new optab instead of target hook [PR108583]

2023-02-10 Thread Tamar Christina via Gcc-patches
Oops, realizes I forgot to fill in the test results, there were no issues 😊 > -Original Message- > From: Gcc-patches bounces+tamar.christina=arm@gcc.gnu.org> On Behalf Of Tamar > Christina via Gcc-patches > Sent: Thursday, February 9, 2023 5:22 PM > To: gcc-patches@gcc.gnu.org > Cc: n

RE: [PATCH 1/2]middle-end: Fix wrong overmatching of div-bitmask by using new optabs [PR108583]

2023-02-10 Thread Tamar Christina via Gcc-patches
Oops, realizes I forgot to fill in the test results, there were no issues 😊 > -Original Message- > From: Gcc-patches bounces+tamar.christina=arm@gcc.gnu.org> On Behalf Of Tamar > Christina via Gcc-patches > Sent: Thursday, February 9, 2023 5:17 PM > To: gcc-patches@gcc.gnu.org > Cc: n

[PATCH] tree-optimization/108724 - vectorized code getting piecewise expanded

2023-02-10 Thread Richard Biener via Gcc-patches
This fixes an oversight to when removing the hard limits on using generic vectors for the vectorizer to enable both SLP and BB vectorization to use those. The vectorizer relies on vector lowering to expand plus, minus and negate to bit operations but vector lowering has a hard limit on the minimum

Re: [PATCH] tree-optimization/108724 - vectorized code getting piecewise expanded

2023-02-10 Thread Richard Sandiford via Gcc-patches
Richard Biener via Gcc-patches writes: > This fixes an oversight to when removing the hard limits on using > generic vectors for the vectorizer to enable both SLP and BB > vectorization to use those. The vectorizer relies on vector lowering > to expand plus, minus and negate to bit operations but

Re: [PATCH] tree-optimization/108724 - vectorized code getting piecewise expanded

2023-02-10 Thread Richard Biener via Gcc-patches
On Fri, 10 Feb 2023, Richard Sandiford wrote: > Richard Biener via Gcc-patches writes: > > This fixes an oversight to when removing the hard limits on using > > generic vectors for the vectorizer to enable both SLP and BB > > vectorization to use those. The vectorizer relies on vector lowering >

[Patch][v2] OpenMP/Fortran: Fix loop-iter var privatization with !$OMP LOOP [PR108512]

2023-02-10 Thread Tobias Burnus
Updated version attached. On 31.01.23 12:20, Jakub Jelinek via Gcc-patches wrote: On Tue, Jan 24, 2023 at 04:24:07PM +0100, Tobias Burnus wrote: + if (code->op == EXEC_OMP_LOOP) +; /* Already rejected in resolve_omp_clauses. */ I don't understand why is this needed. Sure, the vast

Re: [PATCH 1/2]middle-end: Fix wrong overmatching of div-bitmask by using new optabs [PR108583]

2023-02-10 Thread Richard Biener via Gcc-patches
On Thu, 9 Feb 2023, Tamar Christina wrote: > Hi All, > > As discussed in the ticket, this replaces the approach for optimizing the > div by bitmask operation from a hook into optabs implemented through > add_highpart. > > In order to be able to use this we need to check whether the current preci

Re: [PATCH 1/2]middle-end: Fix wrong overmatching of div-bitmask by using new optabs [PR108583]

2023-02-10 Thread Richard Sandiford via Gcc-patches
I think I'm misunderstanding, but: it seems like we're treating the add highpart optabs as companions to the mul highpart optabs. But AIUI, the add highpart optab is used such that, for an N-bit mode, we do an N-bit addition followed by a shift by N/2. Is that right? The mul highpart optabs inste

Re: [PATCH 1/2]middle-end: Fix wrong overmatching of div-bitmask by using new optabs [PR108583]

2023-02-10 Thread Richard Biener via Gcc-patches
On Fri, 10 Feb 2023, Richard Sandiford wrote: > I think I'm misunderstanding, but: it seems like we're treating the > add highpart optabs as companions to the mul highpart optabs. But AIUI, > the add highpart optab is used such that, for an N-bit mode, we do > an N-bit addition followed by a shif

Re: [PATCH 2/2]AArch64 Update div-bitmask to implement new optab instead of target hook [PR108583]

2023-02-10 Thread Richard Sandiford via Gcc-patches
I was asking in the 1/2 review whether we need the optab, but that decision doesn't affect the other patterns, so: Tamar Christina writes: > Hi All, > > This replaces the custom division hook with just an implementation through > add_highpart. For NEON we implement the add highpart (Addition + e

RE: [PATCH 1/2]middle-end: Fix wrong overmatching of div-bitmask by using new optabs [PR108583]

2023-02-10 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Richard Sandiford > Sent: Friday, February 10, 2023 1:36 PM > To: Tamar Christina via Gcc-patches > Cc: Tamar Christina ; nd ; > rguent...@suse.de; j...@ventanamicro.com > Subject: Re: [PATCH 1/2]middle-end: Fix wrong overmatching of div-bitmask > by using new

Re: [PATCH 3/5] openmp, nvptx: ompx_unified_shared_mem_alloc

2023-02-10 Thread Thomas Schwinge
Hi Andrew! On 2022-03-08T11:30:57+, Hafiz Abid Qadeer wrote: > From: Andrew Stubbs > > This adds support for using Cuda Managed Memory with omp_alloc. It will be > used as the underpinnings for "requires unified_shared_memory" in a later > patch. > > There are two new predefined allocators,

Re: [PATCH 1/2]middle-end: Fix wrong overmatching of div-bitmask by using new optabs [PR108583]

2023-02-10 Thread Richard Sandiford via Gcc-patches
Tamar Christina writes: >> -Original Message- >> From: Richard Sandiford >> Sent: Friday, February 10, 2023 1:36 PM >> To: Tamar Christina via Gcc-patches >> Cc: Tamar Christina ; nd ; >> rguent...@suse.de; j...@ventanamicro.com >> Subject: Re: [PATCH 1/2]middle-end: Fix wrong overmatchi

Re: [PATCH] PR tree-optimization/108520 - Add function context for querying global ranges.

2023-02-10 Thread Andrew MacLeod via Gcc-patches
On 2/10/23 02:45, Richard Biener wrote: On Fri, Feb 10, 2023 at 1:02 AM Andrew MacLeod via Gcc-patches wrote: I was about to ping on this, and then found it in my drafts.. Doh! get_range_global() can invoke tree.cc::nonnull_arg_p() if the item being queried is a pointer and a parameter. Th

Re: [PATCH 2/2] c++: speculative constexpr and is_constant_evaluated [PR108243]

2023-02-10 Thread Patrick Palka via Gcc-patches
On Thu, 9 Feb 2023, Patrick Palka wrote: > On Thu, 9 Feb 2023, Jason Merrill wrote: > > > On 2/9/23 09:36, Patrick Palka wrote: > > > On Sun, 5 Feb 2023, Jason Merrill wrote: > > > > > > > On 2/3/23 15:51, Patrick Palka wrote: > > > > > On Mon, 30 Jan 2023, Jason Merrill wrote: > > > > > > > >

RE: [PATCH 1/2]middle-end: Fix wrong overmatching of div-bitmask by using new optabs [PR108583]

2023-02-10 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Richard Sandiford > Sent: Friday, February 10, 2023 2:31 PM > To: Tamar Christina > Cc: Tamar Christina via Gcc-patches ; nd > ; rguent...@suse.de; j...@ventanamicro.com > Subject: Re: [PATCH 1/2]middle-end: Fix wrong overmatching of div-bitmask > by using new

Re: [PATCH] libgomp, openmp: pinned memory

2023-02-10 Thread Thomas Schwinge
Hi! Re OpenMP 'pinned' memory allocator trait semantics vs. 'omp_realloc': On 2022-01-13T13:53:03+, Andrew Stubbs wrote: > On 05/01/2022 17:07, Andrew Stubbs wrote: >> [...], I'm working on an implementation using mmap instead of malloc >> for pinned allocations. [...] > This means that la

Re: [PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832]

2023-02-10 Thread Qing Zhao via Gcc-patches
Thanks, Kees. If there is no objection, I will update my patches with this. And send the updated patches soon. Qing > On Feb 9, 2023, at 11:46 AM, Kees Cook wrote: > > On Thu, Feb 09, 2023 at 02:40:57PM +, Qing Zhao wrote: >> So, the major question here is: >> >> in addition to the C99 s

Re: [PATCH 3/5] openmp, nvptx: ompx_unified_shared_mem_alloc

2023-02-10 Thread Andrew Stubbs
On 10/02/2023 14:21, Thomas Schwinge wrote: Is the correct fix the following (conceptually like 'linux_memspace_alloc' cited above), or is there something that I fail to understand? static void * linux_memspace_calloc (omp_memspace_handle_t memspace, size_t size, int pin) {

Re: [PATCH] libgomp, openmp: pinned memory

2023-02-10 Thread Andrew Stubbs
On 10/02/2023 15:11, Thomas Schwinge wrote: Hi! Re OpenMP 'pinned' memory allocator trait semantics vs. 'omp_realloc': On 2022-01-13T13:53:03+, Andrew Stubbs wrote: On 05/01/2022 17:07, Andrew Stubbs wrote: [...], I'm working on an implementation using mmap instead of malloc for pinned a

Re: [PATCH 1/2]middle-end: Fix wrong overmatching of div-bitmask by using new optabs [PR108583]

2023-02-10 Thread Richard Sandiford via Gcc-patches
Tamar Christina writes: >> > a/gcc/tree-vect-patterns.cc b/gcc/tree-vect-patterns.cc index >> > >> 6934aebc69f231af24668f0a1c3d140e97f55487..e39d7e6b362ef44eb2fc467f33 >> 69 >> > de2afea139d6 100644 >> > --- a/gcc/tree-vect-patterns.cc >> > +++ b/gcc/tree-vect-patterns.cc >> > @@ -3914,12 +3914,82

RE: [PATCH 1/2]middle-end: Fix wrong overmatching of div-bitmask by using new optabs [PR108583]

2023-02-10 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Richard Sandiford > Sent: Friday, February 10, 2023 3:57 PM > To: Tamar Christina > Cc: Tamar Christina via Gcc-patches ; nd > ; rguent...@suse.de; j...@ventanamicro.com > Subject: Re: [PATCH 1/2]middle-end: Fix wrong overmatching of div-bitmask > by using new

Re: [RFC/RFT 0/3] Add compiler support for Control Flow Integrity

2023-02-10 Thread Dan Li via Gcc-patches
On 02/09, Hongtao Liu wrote: > On Mon, Dec 19, 2022 at 3:59 PM Dan Li via Gcc-patches > wrote: > > > > This series of patches is mainly used to support the control flow > > integrity protection of the linux kernel [1], which is similar to > > -fsanitize=kcfi in clang 16.0 [2,3]. > > > > I hope tha

Re: [RFC/RFT 0/3] Add compiler support for Control Flow Integrity

2023-02-10 Thread Dan Li via Gcc-patches
On 02/08, Peter Collingbourne wrote: > On Sun, Dec 18, 2022 at 10:06 PM Dan Li wrote: > > > > This series of patches is mainly used to support the control flow > > integrity protection of the linux kernel [1], which is similar to > > -fsanitize=kcfi in clang 16.0 [2,3]. > > > > I hope that this fe

Re: [PATCH 1/2]middle-end: Fix wrong overmatching of div-bitmask by using new optabs [PR108583]

2023-02-10 Thread Richard Sandiford via Gcc-patches
Tamar Christina writes: >> -Original Message- >> From: Richard Sandiford >> Sent: Friday, February 10, 2023 3:57 PM >> To: Tamar Christina >> Cc: Tamar Christina via Gcc-patches ; nd >> ; rguent...@suse.de; j...@ventanamicro.com >> Subject: Re: [PATCH 1/2]middle-end: Fix wrong overmatchi

Re: Ping^3: [PATCH] libcpp: Handle extended characters in user-defined literal suffix [PR103902]

2023-02-10 Thread Jakub Jelinek via Gcc-patches
On Mon, Sep 26, 2022 at 06:27:25PM -0400, Lewis Hyatt via Gcc-patches wrote: > May I please ping this patch again? Joseph suggested that it would be best if > a C++ maintainer has a look at it. This is one of just a few places left where > we don't handle UTF-8 properly in libcpp, it would be reall

RE: [PATCH 1/2]middle-end: Fix wrong overmatching of div-bitmask by using new optabs [PR108583]

2023-02-10 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Richard Sandiford > Sent: Friday, February 10, 2023 4:25 PM > To: Tamar Christina > Cc: Tamar Christina via Gcc-patches ; nd > ; rguent...@suse.de; j...@ventanamicro.com > Subject: Re: [PATCH 1/2]middle-end: Fix wrong overmatching of div-bitmask > by using new

Re: [pushed] [PR103541] RA: Implement reuse of equivalent memory for caller saves optimization (version 2)

2023-02-10 Thread Hans-Peter Nilsson via Gcc-patches
> From: Vladimir Makarov via Gcc-patches > Date: Thu, 9 Feb 2023 22:49:34 +0100 > The patch was successfully bootstrapped (--enable-languages=all) and > tested on x86, x86-64, aarch64 Sorry, but this (also) caused test-suite regressions, perhaps just for cris-elf. I've opened 108754 and will a

[pushed] [PR108500] RA: Use simple LRA for huge functions

2023-02-10 Thread Vladimir Makarov via Gcc-patches
The following patch is for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108500 The patch improves compilation speed.  Compilation time of the biggest test in the PR decreases from 1235s to 709s. The patch was successfully bootstrapped on x86-64. commit 02371cdd755d2b53fb580d3e8209c44e0c45c337

Re: [PATCH 2/2] c++: speculative constexpr and is_constant_evaluated [PR108243]

2023-02-10 Thread Patrick Palka via Gcc-patches
On Fri, 10 Feb 2023, Patrick Palka wrote: > On Thu, 9 Feb 2023, Patrick Palka wrote: > > > On Thu, 9 Feb 2023, Jason Merrill wrote: > > > > > On 2/9/23 09:36, Patrick Palka wrote: > > > > On Sun, 5 Feb 2023, Jason Merrill wrote: > > > > > > > > > On 2/3/23 15:51, Patrick Palka wrote: > > > > >

Re: [PATCH 1/2]middle-end: Fix wrong overmatching of div-bitmask by using new optabs [PR108583]

2023-02-10 Thread Richard Sandiford via Gcc-patches
Tamar Christina writes: >> -Original Message- >> From: Richard Sandiford >> Sent: Friday, February 10, 2023 4:25 PM >> To: Tamar Christina >> Cc: Tamar Christina via Gcc-patches ; nd >> ; rguent...@suse.de; j...@ventanamicro.com >> Subject: Re: [PATCH 1/2]middle-end: Fix wrong overmatchi

Re: Ping^3: [PATCH] libcpp: Handle extended characters in user-defined literal suffix [PR103902]

2023-02-10 Thread Lewis Hyatt via Gcc-patches
On Fri, Feb 10, 2023 at 11:30 AM Jakub Jelinek wrote: > > On Mon, Sep 26, 2022 at 06:27:25PM -0400, Lewis Hyatt via Gcc-patches wrote: > > May I please ping this patch again? Joseph suggested that it would be best > > if > > a C++ maintainer has a look at it. This is one of just a few places left

Re: [PATCH 1/2]middle-end: Fix wrong overmatching of div-bitmask by using new optabs [PR108583]

2023-02-10 Thread Richard Sandiford via Gcc-patches
Richard Sandiford writes: > Final pattern statements (those not in DEF_SEQ) always have the same > type and value as the original statements. We wouldn't see mismatched > precisions if we were only looking at final pattern statements. > > Like you say, the 16-bit addition didn't exist before vect

Re: Ping^3: [PATCH] libcpp: Handle extended characters in user-defined literal suffix [PR103902]

2023-02-10 Thread Jakub Jelinek via Gcc-patches
On Fri, Feb 10, 2023 at 11:58:03AM -0500, Lewis Hyatt wrote: > On Fri, Feb 10, 2023 at 11:30 AM Jakub Jelinek wrote: > > > > On Mon, Sep 26, 2022 at 06:27:25PM -0400, Lewis Hyatt via Gcc-patches wrote: > > > May I please ping this patch again? Joseph suggested that it would be > > > best if > > >

RE: [PATCH 1/2]middle-end: Fix wrong overmatching of div-bitmask by using new optabs [PR108583]

2023-02-10 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Richard Sandiford > Sent: Friday, February 10, 2023 4:57 PM > To: Tamar Christina > Cc: Tamar Christina via Gcc-patches ; nd > ; rguent...@suse.de; j...@ventanamicro.com > Subject: Re: [PATCH 1/2]middle-end: Fix wrong overmatching of div-bitmask > by using new

[pushed] [PR108754] RA: Use caller save equivalent memory only for LRA

2023-02-10 Thread Vladimir Makarov via Gcc-patches
The following patch should  solve   https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108754 The patch simply switches off a new optimization for targets using the old reload pass. The patch was successfully bootstrapped on x86-64. commit 7757567358a84c3774cb972350bd7ea299daaa8d Author: Vladimir

Re: [PATCH 1/2]middle-end: Fix wrong overmatching of div-bitmask by using new optabs [PR108583]

2023-02-10 Thread Richard Sandiford via Gcc-patches
Tamar Christina writes: >> -Original Message- >> From: Richard Sandiford >> Sent: Friday, February 10, 2023 4:57 PM >> To: Tamar Christina >> Cc: Tamar Christina via Gcc-patches ; nd >> ; rguent...@suse.de; j...@ventanamicro.com >> Subject: Re: [PATCH 1/2]middle-end: Fix wrong overmatchi

Re: [PATCH] libstdc++: Add missing free functions for atomic_flag [PR103934]

2023-02-10 Thread Thomas Rodgers via Gcc-patches
This patch did not get committed in a timely manner after it was OK'd. In revisiting the patch some issues were found that have lead me to resubmit for review - Specifically - The original commit to add C++20 atomic_flag::test did not include the free functions for atomic_flag_test[_explicit] The

Re: [PATCH 1/2]middle-end: Fix wrong overmatching of div-bitmask by using new optabs [PR108583]

2023-02-10 Thread Richard Biener via Gcc-patches
> Am 10.02.2023 um 19:12 schrieb Richard Sandiford via Gcc-patches > : > > Tamar Christina writes: >>> -Original Message- >>> From: Richard Sandiford >>> Sent: Friday, February 10, 2023 4:57 PM >>> To: Tamar Christina >>> Cc: Tamar Christina via Gcc-patches ; nd >>> ; rguent...@sus

[pushed] wwwdocs: news/profiledriven: Update a Citeseer link

2023-02-10 Thread Gerald Pfeifer
citeseer.ist.psu.edu stalls, whereas citeseerx.ist.psu.edu responds. Switch to https on the way. Pushed. Gerald --- htdocs/news/profiledriven.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/news/profiledriven.html b/htdocs/news/profiledriven.html index cac172b4..8

Re: [PATCH 1/2]middle-end: Fix wrong overmatching of div-bitmask by using new optabs [PR108583]

2023-02-10 Thread Andrew MacLeod via Gcc-patches
On 2/10/23 13:34, Richard Biener wrote: In any case, if you disagree I don’t' really see a way forward aside from making this its own pattern running it before the overwidening pattern. I think we should look to see if ranger can be persuaded to provide the range of the 16-bit addition, eve

Re: [PATCH] tree-optimization/106722 - fix CD-DCE edge marking

2023-02-10 Thread Jan Hubicka via Gcc-patches
> The following fixes a latent issue when we mark control edges but > end up with marking a block with no stmts necessary. In this case > we fail to mark dependent control edges of that block. > > Bootstrapped and tested on x86_64-unknown-linux-gnu. > > Does this look OK? > > Thanks, > Richard.

[RFC PATCH v1 01/10] docs: Document a canonical RTL for a conditional-zero insns

2023-02-10 Thread Philipp Tomsich
On RISC-V, conditional-zero (i.e., move a register value or zero to a destination register) instructions are part if the Zicond extension. To support architectures that have similar constructs, we define a canonical RTL representation that can be used in if-conversion. Signed-off-by: Philipp Tomsi

[RFC PATCH v1 02/10] RISC-V: Recognize Zicond (conditional operations) extension

2023-02-10 Thread Philipp Tomsich
This adds the RISC-V Zicond extension to the option parsing. gcc/ChangeLog: * common/config/riscv/riscv-common.cc: Recognize "zicond" as part of an architecture string. * config/riscv/riscv-opts.h (MASK_ZICOND): Define. (TARGET_ZICOND): Define. Signed-off-by: Phil

[RFC PATCH v1 03/10] RISC-V: Generate czero.eqz/nez on noce_try_store_flag_mask if-conversion

2023-02-10 Thread Philipp Tomsich
Adds a pattern to map the output of noce_try_store_flag_mask if-conversion in the combiner onto vt.maskc; the input patterns supported are similar to the following: (set (reg/v/f:DI 75 [ ]) (and:DI (neg:DI (ne:DI (reg:DI 82) (const_int 0 [0]))) (reg/v

[RFC PATCH v1 00/10] RISC-V: Support the Zicond (conditional-operations) extension

2023-02-10 Thread Philipp Tomsich
The (proposed, but about to be frozen) Zicond extension adds 2 unconditional R-type instructions that can be used to build branchless sequences that have conditional-arithmetic/bitwise/select semantics and integrate will with the RISC-V architecture. See the Zicond specification for details:

[RFC PATCH v1 09/10] RISC-V: Recognize xventanacondops extension

2023-02-10 Thread Philipp Tomsich
This adds the xventanacondops extension to the option parsing and as a default for the ventana-vt1 core: gcc/Changelog: * common/config/riscv/riscv-common.cc: Recognize "xventanacondops" as part of an architecture string. * config/riscv/riscv-opts.h (MASK_XVENTANACONDOPS

[RFC PATCH v1 05/10] RISC-V: Support noce_try_store_flag_mask as czero.eqz/czero.nez

2023-02-10 Thread Philipp Tomsich
When if-conversion in noce_try_store_flag_mask starts the sequence off with an order-operator, our patterns for czero.eqz/nez will receive the result of the order-operator as a register argument; consequently, they can't know that the result will be either 1 or 0. To convey this information (and m

[RFC PATCH v1 04/10] RISC-V: Support immediates in Zicond

2023-02-10 Thread Philipp Tomsich
When if-conversion encounters sequences using immediates, the sequences can't trivially map back onto czero.eqz/czero.nezt (even if benefitial) due to czero.eqz/czero.nez not having immediate forms. This adds a splitter to rewrite opportunities for Zicond that operate on an immediate by first putt

[RFC PATCH v1 06/10] RISC-V: Recognize sign-extract + and cases for czero.eqz/nez

2023-02-10 Thread Philipp Tomsich
Users might use explicit arithmetic operations to create a mask and then and it, in a sequence like cond = (bits >> SHIFT) & 1; mask = ~(cond - 1); val &= mask; which will present as a single-bit sign-extract. Dependening on what combination of XVentanaCondOps and Zbs are available, th

[RFC PATCH v1 08/10] ifcvt: add if-conversion to conditional-zero instructions

2023-02-10 Thread Philipp Tomsich
Some architectures, as it the case on RISC-V with the proposed ZiCondOps and the vendor-defined XVentanaCondOps, define a conditional-zero instruction that is equivalent to: - the positive form: rd = (rc != 0) ? rs : 0 - the negated form: rd = (rc == 0) ? rs : 0 While noce_try_store_flag_mask

[RFC PATCH v1 07/10] RISC-V: Recognize bexti in negated if-conversion

2023-02-10 Thread Philipp Tomsich
While the positive case "if ((bits >> SHAMT) & 1)" for SHAMT 0..10 can trigger conversion into efficient branchless sequences - with Zbs (bexti + neg + and) - with Zicond (andi + czero.nez) the inverted/negated case results in andi a5,a0,1024 seqz a5,a5 neg a5,a5 and a5,a5,a1 due to how

[RFC PATCH v1 10/10] RISC-V: Support XVentanaCondOps extension

2023-02-10 Thread Philipp Tomsich
The vendor-defined XVentanaCondOps extension adds two instructions with semantics identical to Zicond. This plugs the 2 new instruction in using the canonical RTX, which also matches the combiner-input for noce_try_store_flag_mask and noce_try_store_flag, defined for conditional-zero. For documen

Re: [RFC PATCH v1 08/10] ifcvt: add if-conversion to conditional-zero instructions

2023-02-10 Thread Andrew Pinski via Gcc-patches
On Fri, Feb 10, 2023 at 2:47 PM Philipp Tomsich wrote: > > Some architectures, as it the case on RISC-V with the proposed > ZiCondOps and the vendor-defined XVentanaCondOps, define a > conditional-zero instruction that is equivalent to: > - the positive form: rd = (rc != 0) ? rs : 0 > - the neg

[pushed] analyzer: don't warn for deref-before-check for checks in macros [PR108745]

2023-02-10 Thread David Malcolm via Gcc-patches
Integration testing shows this patch fixes all 9 known false positives from -Wanalyzer-deref-before-check within ImageMagick-7.1.0-57, and eliminates 34 further as-yet unassessed such diagnostics, without eliminating the 1 known true positive. This improves the rate of true positives for the warni

Re: [RFC PATCH v1 01/10] docs: Document a canonical RTL for a conditional-zero insns

2023-02-10 Thread Andrew Pinski via Gcc-patches
On Fri, Feb 10, 2023 at 2:43 PM Philipp Tomsich wrote: > > On RISC-V, conditional-zero (i.e., move a register value or zero to a > destination register) instructions are part if the Zicond extension. > To support architectures that have similar constructs, we define a > canonical RTL representatio

[v3][PATCH 1/2] Handle component_ref to a structre/union field including C99 FAM [PR101832]

2023-02-10 Thread Qing Zhao via Gcc-patches
GCC extension accepts the case when a struct with a C99 flexible array member is embedded into another struct or union (possibly recursively). __builtin_object_size should treat such struct as flexible size. gcc/c/ChangeLog: PR tree-optimization/101832 * c-decl.cc (finish_struct):

[v3][PATCH 2/2] Update documentation to clarify a GCC extension (PR77650)

2023-02-10 Thread Qing Zhao via Gcc-patches
on structure with C99 flexible array member being nested in another structure. This is also fixed PR77650. " GCC extension accepts a structure containing a ISO C99 "flexible array member", or a union containing such a structure (possibly recursively) to be a member of a structure. There are thr

[v3][PATCH 0/2] Handle component_ref to a structure/union field including FAM for builtin_object_size

2023-02-10 Thread Qing Zhao via Gcc-patches
These are the 3rd version of the patches for PR101832, to fix builtin_object_size to correctly handle component_ref to a structure/union field that includes a flexible array member. also includes a documentation update for the GCC extension on embedding a structure/union with flexible array member

Re: [PATCH] libstdc++: Add missing free functions for atomic_flag [PR103934]

2023-02-10 Thread Jonathan Wakely via Gcc-patches
On Fri, 10 Feb 2023 at 18:25, Thomas Rodgers wrote: > > This patch did not get committed in a timely manner after it was OK'd. In > revisiting the patch some issues were found that have lead me to resubmit for > review - > > Specifically - > > The original commit to add C++20 atomic_flag::test d

Re: [PATCH] libstdc++: testsuite: Add char8_t to codecvt_unicode

2023-02-10 Thread Hans-Peter Nilsson
Casual observation from a random reader that's sometimes hit by testresults acting up: On Thu, 9 Feb 2023, Dimitrij Mijoski via Gcc-patches wrote: > libstdc++-v3/ChangeLog: > > * testsuite/22_locale/codecvt/codecvt_unicode.cc: Rename > functions. > * testsuite/22_locale/code

Re: [PATCH] testsuite: adjust patterns in RISC-V tests to skip unwind table directives

2023-02-10 Thread Jeff Law via Gcc-patches
On 2/9/23 02:48, Andreas Schwab via Gcc-patches wrote: PR target/108723 * gcc.target/riscv/shorten-memrefs-1.c: Adjust patterns to skip over cfi directives. * gcc.target/riscv/shorten-memrefs-2.c: Likewise. * gcc.target/riscv/shorten-memrefs-3.c: Likewise. * gcc.target/riscv/shorten-memrefs-4.

[PATCH] RISC-V: Optimize the code gen of VLM/VSM.

2023-02-10 Thread incarnation.p.lee--- via Gcc-patches
From: Pan Li PR 108185 PR 108654 The bytesize of the vbool*_t isn't well defined. This patch adjust the rvv bool modes with actually mode size in bytes. However, only allow mode tieable when exactly equal for the rvv bool types, aka vbool1_t, vbool

Re: realpath() patch to fix symlinks resolution for win32

2023-02-10 Thread Jonathan Yong via Gcc-patches
On 2/6/23 06:40, Jonathan Yong wrote: On 1/18/23 10:44, i.nixman--- via Gcc-patches wrote: hello again! the final version of the path for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108350 successfully bootstraped for x86_64-mingw32 and x86_64-linux. could anyone apply it please? best!

Re: realpath() patch to fix symlinks resolution for win32

2023-02-10 Thread i.nixman--- via Gcc-patches
On 2023-02-11 06:32, Jonathan Yong wrote: On 2/6/23 06:40, Jonathan Yong wrote: On 1/18/23 10:44, i.nixman--- via Gcc-patches wrote: hello again! the final version of the path for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108350 successfully bootstraped for x86_64-mingw32 and x86_64-linu