Re: [PATCH 3/N] Come up with casm global state.

2021-10-26 Thread Richard Biener via Gcc-patches
On Mon, Oct 25, 2021 at 6:32 PM Segher Boessenkool wrote: > > Hi! > > On Mon, Oct 25, 2021 at 03:36:25PM +0200, Martin Liška wrote: > > --- a/gcc/config/rs6000/rs6000-internal.h > > +++ b/gcc/config/rs6000/rs6000-internal.h > > @@ -189,4 +189,13 @@ extern bool rs6000_passes_vector; > > extern boo

Re: [PATCH] forwprop: Remove incorrect assertion [PR102897]

2021-10-26 Thread Richard Biener via Gcc-patches
On Tue, Oct 26, 2021 at 5:40 AM Kewen.Lin wrote: > > Hi, > > As PR102897 shows, there is one incorrect assertion in function > simplify_permutation, which is based on the wrong assumption that > all cases with op2_type == tgt_type are handled previously, the > proposed fix is to remove this wrong

Re: [PATCH] Add TSVC tests.

2021-10-26 Thread Richard Biener via Gcc-patches
On Tue, Oct 19, 2021 at 8:49 AM Martin Liška wrote: > > On 10/18/21 12:08, Richard Biener wrote: > > Can you please use a subdirectory for the sources, a "toplevel" > > license.txt doesn't make much sense. You can simply amend > > vect.exp to process tsvc/*.c as well as sources so no need for an

Re: [PATCH v4] Improve integer bit test on __atomic_fetch_[or|and]_* returns

2021-10-26 Thread Richard Biener via Gcc-patches
On Thu, Oct 21, 2021 at 1:09 PM Hongtao Liu wrote: > > i is > > On Wed, Oct 13, 2021 at 8:34 PM Richard Biener via Gcc-patches > wrote: > > > > On Sun, Oct 10, 2021 at 3:49 PM H.J. Lu wrote: > > > > > > Changes in v4: > > > > > > 1. Bypass redundant check when inputs have been transformed to th

[PATCH v3 0/1] implement TLS register based stack canary for ARM

2021-10-26 Thread Ard Biesheuvel via Gcc-patches
Bugzilla: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102352 In the Linux kernel, user processes calling into the kernel are essentially threads running in the same address space, of a program that never terminates. This means that using a global variable for the stack protector canary value is p

[PATCH v3 1/1] [ARM] Add support for TLS register based stack protector canary access

2021-10-26 Thread Ard Biesheuvel via Gcc-patches
Add support for accessing the stack canary value via the TLS register, so that multiple threads running in the same address space can use distinct canary values. This is intended for the Linux kernel running in SMP mode, where processes entering the kernel are essentially threads running the same p

Re: [PATCH] hardened conditionals

2021-10-26 Thread Richard Biener via Gcc-patches
On Fri, Oct 22, 2021 at 4:19 AM Alexandre Oliva wrote: > > On Oct 20, 2021, Alexandre Oliva wrote: > > > I suppose it's a latent issue exposed by the patch, > > I was mistaken. Though I even had bisected the -fcompare-debug problem > back to a patch from back in May, that added a new sink_code p

Re: [PATCH v3] detect out-of-bounds stores by atomic functions [PR102453]

2021-10-26 Thread Richard Biener via Gcc-patches
On Mon, Oct 25, 2021 at 4:21 AM Jeff Law wrote: > > > > On 10/24/2021 5:40 PM, Martin Sebor via Gcc-patches wrote: > > Attached is a revised patch for just the access warning pass > > to diagnose out-of-bounds stores by atomic functions, with > > no attr-fnspec changes. > > > > Is this okay for tr

RE: [PATCH] middle-end: fix de-optimizations with bitclear patterns on signed values

2021-10-26 Thread Richard Biener via Gcc-patches
On Mon, 25 Oct 2021, Tamar Christina wrote: > > -Original Message- > > From: Richard Biener > > Sent: Friday, October 15, 2021 12:31 PM > > To: Tamar Christina > > Cc: gcc-patches@gcc.gnu.org; Jakub Jelinek ; nd > > > > Subject: Re: [PATCH] middle-end: fix de-optimizations with bitclear

RE: [PATCH] middle-end: fix de-optimizations with bitclear patterns on signed values

2021-10-26 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Richard Biener > Sent: Tuesday, October 26, 2021 9:26 AM > To: Tamar Christina > Cc: gcc-patches@gcc.gnu.org; Jakub Jelinek ; nd > > Subject: RE: [PATCH] middle-end: fix de-optimizations with bitclear patterns > on signed values > > On Mon, 25 Oct 2021, Tama

RE: [PATCH] middle-end: fix de-optimizations with bitclear patterns on signed values

2021-10-26 Thread Richard Biener via Gcc-patches
On Tue, 26 Oct 2021, Tamar Christina wrote: > > -Original Message- > > From: Richard Biener > > Sent: Tuesday, October 26, 2021 9:26 AM > > To: Tamar Christina > > Cc: gcc-patches@gcc.gnu.org; Jakub Jelinek ; nd > > > > Subject: RE: [PATCH] middle-end: fix de-optimizations with bitclear

[PATCH] Turn vect_create_addr_base_for_vector_ref offset into a byte offset

2021-10-26 Thread Richard Biener via Gcc-patches
This changes the offset in elements for vect_create_addr_base_for_vector_ref and vect_create_data_ref_ptr to an offset in bytes, easing a following refactoring. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2021-10-26 Richard Biener * tree-vect-data-refs.c (vect_create_

[committed] Fortran: Fix character(len=cst) dummies with bind(C) [PR102885] (erratum: should be: 'len=noncst')

2021-10-26 Thread Tobias Burnus
I forgot to handle len= correctly. This patch does the same as for non-BIND(C). In the latter case, the call is: gfc_generate_function_code → gfc_trans_deferred_vars → gfc_trans_deferred_array and that function has if (sym->ts.type == BT_CHARACTER && !INTEGER_CST_P (sym->ts.u.cl->bac

Re: [PATCH] libstdc++: Fix 17_intro/names.cc on Solaris

2021-10-26 Thread Jonathan Wakely via Gcc-patches
On Mon, 25 Oct 2021 at 12:55, Rainer Orth wrote: > > 17_intro/names.cc and experimental/names.cc currently FAIL on Solaris > > FAIL: 17_intro/names.cc (test for excess errors) > FAIL: experimental/names.cc (test for excess errors) > > Excess errors: > /usr/include/sys/timespec_util.h:22: error: ex

Re: [PATCH] libstdc++: Fix 28_regex/basic_regex/84110.cc on Solaris

2021-10-26 Thread Jonathan Wakely via Gcc-patches
On Mon, 25 Oct 2021 at 13:09, Rainer Orth wrote: > > 28_regex/basic_regex/84110.cc currently FAILs on Solaris: > > FAIL: 28_regex/basic_regex/84110.cc (test for excess errors) > UNRESOLVED: 28_regex/basic_regex/84110.cc compilation failed to produce > executable > > Excess errors: > /vol/gcc/src/h

[PATCH] Move negative stride bias out of dr_misalignment

2021-10-26 Thread Richard Biener via Gcc-patches
This moves applying of a bias for negative stride accesses out of dr_misalignment in favor of a more general optional offset argument. The negative bias is now computed by get_load_store_type and applied accordingly to determine the alignment support scheme. Likewise the peeling/versioning code is

Re: [PATCH,Fortran 3/7] Fortran: make some constructor* functions static

2021-10-26 Thread Tobias Burnus
On 25.10.21 00:30, Bernhard Reutner-Fischer via Fortran wrote: From: Bernhard Reutner-Fischer gfc_constructor_expr_foreach and gfc_constructor_swap were just stubs. gcc/fortran/ChangeLog: * constructor.c (gfc_constructor_get_base): Make static. (gfc_constructor_expr_foreach, (gfc_co

Re: [PATCH,Fortran 1/7] Fortran: make some trans* functions static

2021-10-26 Thread Tobias Burnus
On 25.10.21 00:30, Bernhard Reutner-Fischer via Fortran wrote: From: Bernhard Reutner-Fischer This makes some trans* functions static and deletes declarations of functions that either do not exist anymore like gfc_get_function_decl or that are unused like gfc_check_any_c_kind. gcc/fortran/Cha

Re: [PATCH,Fortran 2/7] Fortran: make some match* functions static

2021-10-26 Thread Tobias Burnus
On 25.10.21 00:30, Bernhard Reutner-Fischer via Gcc-patches wrote: From: Bernhard Reutner-Fischer gfc_match_small_int_expr was unused, delete it. gfc_match_gcc_unroll should use gfc_match_small_literal_int and then (but wasn't in this patch) gfc_match_small_int can be deleted since it will b

Re: [PATCH,Fortran 4/7] Fortran: make some trans-array functions static

2021-10-26 Thread Tobias Burnus
On 25.10.21 00:30, Bernhard Reutner-Fischer via Fortran wrote: From: Bernhard Reutner-Fischer gcc/fortran/ChangeLog: * trans-array.c (gfc_trans_scalarized_loop_end): Make static. * trans-array.h (gfc_trans_scalarized_loop_end, gfc_conv_tmp_ref, gfc_conv_array_transpose): Dele

Re: [PATCH,Fortran 5/7] Fortran: Delete unused decl in trans-stmt.h

2021-10-26 Thread Tobias Burnus
On 25.10.21 00:30, Bernhard Reutner-Fischer via Gcc-patches wrote: From: Bernhard Reutner-Fischer gcc/fortran/ChangeLog: * trans-stmt.h (gfc_trans_deallocate_array): Delete. OK. Thanks! Tobias --- gcc/fortran/trans-stmt.h | 1 - 1 file changed, 1 deletion(-) diff --git a/gcc/for

Re: [PATCH,Fortran 6/7] Fortran: Delete unused decl in trans-types.h

2021-10-26 Thread Tobias Burnus
On 25.10.21 00:30, Bernhard Reutner-Fischer via Fortran wrote: From: Bernhard Reutner-Fischer gcc/fortran/ChangeLog: * trans-types.h (gfc_convert_function_code): Delete. OK. Tobias --- gcc/fortran/trans-types.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/gcc/fortran/tran

[PATCH] target: [PR102941] Fix inline-asm flags with non-REG_P output

2021-10-26 Thread apinski--- via Gcc-patches
From: Andrew Pinski So the problem here is that arm_md_asm_adjust would just create a set directly to the output memory which is wrong. It needs to output to a temp register first and then do a move. OK? Bootstrapped and tested on aarch64-linux-gnu with no regressions. I have no way to test on a

Re: [PATCH] libcody: add mostlyclean Makefile target

2021-10-26 Thread Martin Liška
On 10/25/21 18:10, Eric Gallager wrote: On Mon, Oct 25, 2021 at 7:35 AM Martin Liška wrote: Hello. The patch adds missing Makefile mostlyclean. Ready to be installed? Thanks, Martin Generally the way the various "*clean" targets are arranged, in order of cleanliness, from least clean to m

[PATCH] AVX512FP16: Optimize _Float16 reciprocal for div and sqrt

2021-10-26 Thread Hongyu Wang via Gcc-patches
Hi, For _Float16 type, add insn and expanders to optimize x / y to x * rcp (y), and x / sqrt (y) to x * rsqrt (y). As Half float only have minor precision difference between div and mul * rcp, there is no need for Newton-Rhapson approximation. Bootstrapped/regtested on x86_64-pc-linux-gnu{-m32,}

Re: [PATCH] PR fortran/102917 - PDT type parameters are not restricted to default integer

2021-10-26 Thread Tobias Burnus
Dear Harald, dear all, On 24.10.21 21:00, Harald Anlauf via Fortran wrote: I've created PR 102917 for tracking this issue and packaged the attached patch. Regtested on x86_64-pc-linux-gnu. OK mainline? OK. I wonder whether a valid len/kind example should be added which uses such a PDT with n

Re: [PATCH] PR fortran/102816 - [12 Regression] ICE in resolve_structure_cons, at fortran/resolve.c:1467

2021-10-26 Thread Tobias Burnus
Dear Harald, hi all, On 22.10.21 21:36, Harald Anlauf via Fortran wrote: the recently introduced shape validation for array components in DT constructors did not properly deal with invalid code created by ingenious testers. Obvious solution: replace the gcc_assert by a suitable error message.

Re: [PATCH] forwprop: Remove incorrect assertion [PR102897]

2021-10-26 Thread Kewen.Lin via Gcc-patches
Hi Richi, on 2021/10/26 下午3:50, Richard Biener wrote: > On Tue, Oct 26, 2021 at 5:40 AM Kewen.Lin wrote: >> >> Hi, >> >> As PR102897 shows, there is one incorrect assertion in function >> simplify_permutation, which is based on the wrong assumption that >> all cases with op2_type == tgt_type are

Re: [PATCH] Turn vect_create_addr_base_for_vector_ref offset into a byte offset

2021-10-26 Thread Bernhard Reutner-Fischer via Gcc-patches
On 26 October 2021 10:58:50 CEST, Richard Biener via Gcc-patches wrote: >@@ -2006,6 +2011,7 @@ get_negative_load_store_type (vec_info *vinfo, > dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, >"negative step but alignment required.\n"); > return VMAT_

Re: [PATCH] Turn vect_create_addr_base_for_vector_ref offset into a byte offset

2021-10-26 Thread Richard Biener via Gcc-patches
On Tue, 26 Oct 2021, Bernhard Reutner-Fischer wrote: > On 26 October 2021 10:58:50 CEST, Richard Biener via Gcc-patches > wrote: > > >@@ -2006,6 +2011,7 @@ get_negative_load_store_type (vec_info *vinfo, > > dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, > > "n

[PATCH] Unify offset and byte_offset for vect_create_addr_base_for_vector_ref

2021-10-26 Thread Richard Biener via Gcc-patches
Now that both are measured in bytes we can unify the two parameters. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2021-10-26 Richard Biener * tree-vectorizer.h (vect_create_addr_base_for_vector_ref): Remove byte_offset parameter. (vect_create_data_ref_p

Re: [PATCH] Move negative stride bias out of dr_misalignment

2021-10-26 Thread Bernhard Reutner-Fischer via Gcc-patches
On 26 October 2021 11:19:44 CEST, Richard Biener via Gcc-patches wrote: >@@ -2010,6 +2010,7 @@ get_negative_load_store_type (vec_info *vinfo, > if (dump_enabled_p ()) > dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, >"negative step but alignment r

Re: [PATCH] Fix loop split incorrect count and probability

2021-10-26 Thread Richard Biener via Gcc-patches
On Tue, 26 Oct 2021, Xionghu Luo wrote: > > > On 2021/10/21 18:55, Richard Biener wrote: > > On Thu, 21 Oct 2021, Xionghu Luo wrote: > > > >> > >> > >> On 2021/10/15 13:51, Xionghu Luo via Gcc-patches wrote: > >>> > >>> > >>> On 2021/9/23 20:17, Richard Biener wrote: > On Wed, 22 Sep 2021,

Re: [PATCH] PR fortran/102816 - [12 Regression] ICE in resolve_structure_cons, at fortran/resolve.c:1467

2021-10-26 Thread Harald Anlauf via Gcc-patches
Hi Tobias, > In other cases, it requires some careful weighting whether error should > have the error location "use m" or where the symbol is used. (Here, it > cannot occur as the module won't get generated and an error is already > printed at the proper location.) I had though about this but cou

Re: [PATCH] PR fortran/102917 - PDT type parameters are not restricted to default integer

2021-10-26 Thread Harald Anlauf via Gcc-patches
Hi Tobias, > OK. I wonder whether a valid len/kind example should be added which uses > such a PDT with non-default-kind integer. the testcase pdt_4.f03 did actually check for the error message that gets removed and had to be adjusted. Removing just the dg-error does that job :-) Thanks, Harald

RE: [PATCH]AArch64 Lower intrinsics shift to GIMPLE when possible.

2021-10-26 Thread Tamar Christina via Gcc-patches
Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. Ok for master? Thanks, Tamar gcc/ChangeLog: * config/aarch64/aarch64-builtins.c (aarch64_general_gimple_fold_builtin): Add ashl, sshl, ushl, ashr, ashr_simd, lshr, lshr_simd. * config/aarch64/aarch64

[PATCH v3] bpf: Add support to eBPF atomic instructions

2021-10-26 Thread Guillermo E. Martinez via Gcc-patches
Hello people, This patch v3 to add support for atomics instructions in eBPF target, the rtl for eBPF atomics was splitted in a new file: atomic.md, Thanks Andrew for the comments, Kind Regards, Guillermo eBPF add support for atomic instructions, the following gcc built-in functions are

Re: [PATCH] Move negative stride bias out of dr_misalignment

2021-10-26 Thread Richard Biener via Gcc-patches
On Tue, 26 Oct 2021, Bernhard Reutner-Fischer wrote: > On 26 October 2021 11:19:44 CEST, Richard Biener via Gcc-patches > wrote: > > > > >@@ -2010,6 +2010,7 @@ get_negative_load_store_type (vec_info *vinfo, > > if (dump_enabled_p ()) > > dump_printf_loc (MSG_MISSED_OPTIMIZATION, ve

RE: [PATCH] middle-end: fix de-optimizations with bitclear patterns on signed values

2021-10-26 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Richard Biener > Sent: Tuesday, October 26, 2021 9:46 AM > To: Tamar Christina > Cc: gcc-patches@gcc.gnu.org; Jakub Jelinek ; nd > > Subject: RE: [PATCH] middle-end: fix de-optimizations with bitclear patterns > on signed values > > On Tue, 26 Oct 2021, Ta

Re: [PATCH] Fix loop split incorrect count and probability

2021-10-26 Thread Jan Hubicka via Gcc-patches
> On Tue, 26 Oct 2021, Xionghu Luo wrote: > > > > > > > On 2021/10/21 18:55, Richard Biener wrote: > > > On Thu, 21 Oct 2021, Xionghu Luo wrote: > > > > > >> > > >> > > >> On 2021/10/15 13:51, Xionghu Luo via Gcc-patches wrote: > > >>> > > >>> > > >>> On 2021/9/23 20:17, Richard Biener wrote: >

Re: [PATCH] Move negative stride bias out of dr_misalignment

2021-10-26 Thread Bernhard Reutner-Fischer via Gcc-patches
On Tue, 26 Oct 2021 14:10:05 +0200 (CEST) Richard Biener wrote: > I agree in general, where I would diagnose this is when we build the > CFG I would diagnose unreachable blocks - the above does not have > any path to the second *poffset store. Like with the prototype patch > below we warn for >

[PATCH v3] bpf: Add support to eBPF atomic instructions

2021-10-26 Thread Guillermo E. Martinez via Gcc-patches
Apologies, I forgot update the ChangeLog(s) Kind Regards, Guillermo eBPF add support for atomic instructions, the following gcc built-in functions are implemented for bpf target using both: 32 and 64 bits data types: __atomic_fetch_add __atomic_fetch_sub __atomic_fetc

[PATCH 1/4] Makefile.in: Ensure build CPP is used for build targets

2021-10-26 Thread Richard Purdie via Gcc-patches
During cross compiling, CPP is being set to the target compiler even for build targets. As an example, when building a cross compiler targetting mingw, the config.log for libiberty in build.x86_64-pokysdk-mingw32.i586-poky-linux/build-x86_64-linux/libiberty/config.log shows: configure:3786: checki

[PATCH 2/4] gcc: Fix "argument list too long" from install-plugins

2021-10-26 Thread Richard Purdie via Gcc-patches
When building in longer build paths (200+ characters), the "echo $(PLUGIN_HEADERS)" from the install-plugins target would cause an "argument list too long error" on some systems. Avoid this by calling make's sort function on the list which removes duplicates and stops the overflow from reaching th

[PATCH 4/4] gcc/nios2: Define the musl linker

2021-10-26 Thread Richard Purdie via Gcc-patches
Add a definition of the musl linker used on the nios2 platform. 2021-10-26 Richard Purdie gcc/ChangeLog: * config/nios2/linux.h (MUSL_DYNAMIC_LINKER): Add musl linker Signed-off-by: Richard Purdie --- gcc/config/nios2/linux.h | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/config

[PATCH 3/4] gcc: Add --nostdlib++ option

2021-10-26 Thread Richard Purdie via Gcc-patches
OpenEmbedded/Yocto Project builds libgcc and the other gcc runtime libraries separately from the compiler and slightly differently to the standard gcc build. In general this works well but in trying to build them separately we run into an issue since we're using our gcc, not xgcc and there is no w

Re: [PATCH 1/4] Makefile.in: Ensure build CPP is used for build targets

2021-10-26 Thread Richard Biener via Gcc-patches
On Tue, Oct 26, 2021 at 2:45 PM Richard Purdie via Gcc-patches wrote: > > During cross compiling, CPP is being set to the target compiler even for > build targets. As an example, when building a cross compiler targetting > mingw, the config.log for libiberty in > build.x86_64-pokysdk-mingw32.i586-

Re: [PATCH 1/4] Makefile.in: Ensure build CPP is used for build targets

2021-10-26 Thread Richard Purdie via Gcc-patches
On Tue, 2021-10-26 at 14:55 +0200, Richard Biener wrote: > On Tue, Oct 26, 2021 at 2:45 PM Richard Purdie via Gcc-patches > wrote: > > > > During cross compiling, CPP is being set to the target compiler even for > > build targets. As an example, when building a cross compiler targetting > > mingw

RE: [PATCH 2/2]AArch64: Add better costing for vector constants and operations

2021-10-26 Thread Tamar Christina via Gcc-patches
Hi, Following the discussion below here's a revised patch. Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. Ok for master? Thanks, Tamar gcc/ChangeLog: * config/arm/aarch-common-protos.h (struct vector_cost_table): Add movi, dup and extract costing fields.

Re: [RFC] Partial vectors for s390

2021-10-26 Thread Robin Dapp via Gcc-patches
Hi Richard, We already have code to probe the predicates of the underlying define_expands/insns to see whether they support certain constant IFN arguments; see e.g. internal_gather_scatter_fn_supported_p. We could do something similar here: add an extra operand to the optab, and an extra argumen

Re: [PATCH] Fix loop split incorrect count and probability

2021-10-26 Thread Jan Hubicka via Gcc-patches
> > > That said, likely the profile update cannot be done uniformly > for all blocks of a loop? For the loop: for (i = 0; i < n; i = inc (i)) { if (ga) ga = do_something (); } to: for (i = 0; i < x; i = inc (i)) { if (true) ga = do_something (); if (!ga

RE: [PATCH] middle-end: fix de-optimizations with bitclear patterns on signed values

2021-10-26 Thread Richard Biener via Gcc-patches
On Tue, 26 Oct 2021, Tamar Christina wrote: > > > > -Original Message- > > From: Richard Biener > > Sent: Tuesday, October 26, 2021 9:46 AM > > To: Tamar Christina > > Cc: gcc-patches@gcc.gnu.org; Jakub Jelinek ; nd > > > > Subject: RE: [PATCH] middle-end: fix de-optimizations with bi

Re: [PATCH] middle-end: fix de-optimizations with bitclear patterns on signed values

2021-10-26 Thread Jakub Jelinek via Gcc-patches
On Tue, Oct 26, 2021 at 03:13:29PM +0200, Richard Biener wrote: > try > auto c = ...; > signed char c2 = c; > return c2 >= ... > then That won't work, at least when using , which is what we with the optimization want to deal with primarily. Because std::partial_ordering etc. aren't implicitl

Re: [RFC] Don't move cold code out of loop by checking bb count

2021-10-26 Thread Richard Biener via Gcc-patches
On Mon, Oct 18, 2021 at 6:29 AM Xionghu Luo wrote: > > > > On 2021/10/15 16:11, Richard Biener wrote: > > On Sat, Oct 9, 2021 at 5:45 AM Xionghu Luo wrote: > >> > >> Hi, > >> > >> On 2021/9/28 20:09, Richard Biener wrote: > >>> On Fri, Sep 24, 2021 at 8:29 AM Xionghu Luo wrote: > > Upd

Re: [PATCH] middle-end: fix de-optimizations with bitclear patterns on signed values

2021-10-26 Thread Richard Biener via Gcc-patches
On Tue, 26 Oct 2021, Jakub Jelinek wrote: > On Tue, Oct 26, 2021 at 03:13:29PM +0200, Richard Biener wrote: > > try > > auto c = ...; > > signed char c2 = c; > > return c2 >= ... > > then > > That won't work, at least when using , which is what we with the > optimization want to deal with p

Re: [PATCH]AArch64 Lower intrinsics shift to GIMPLE when possible.

2021-10-26 Thread Richard Sandiford via Gcc-patches
Tamar Christina writes: > Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. > > Ok for master? > > Thanks, > Tamar > > gcc/ChangeLog: > > * config/aarch64/aarch64-builtins.c > (aarch64_general_gimple_fold_builtin): Add ashl, sshl, ushl, ashr, > ashr_simd, lshr, lshr

Re: [PATCH 1/4] Makefile.in: Ensure build CPP is used for build targets

2021-10-26 Thread Richard Biener via Gcc-patches
On Tue, Oct 26, 2021 at 2:57 PM Richard Purdie wrote: > > On Tue, 2021-10-26 at 14:55 +0200, Richard Biener wrote: > > On Tue, Oct 26, 2021 at 2:45 PM Richard Purdie via Gcc-patches > > wrote: > > > > > > During cross compiling, CPP is being set to the target compiler even for > > > build targets

Re: [PATCH] middle-end: fix de-optimizations with bitclear patterns on signed values

2021-10-26 Thread Jakub Jelinek via Gcc-patches
On Tue, Oct 26, 2021 at 03:21:55PM +0200, Richard Biener wrote: > On Tue, 26 Oct 2021, Jakub Jelinek wrote: > > > On Tue, Oct 26, 2021 at 03:13:29PM +0200, Richard Biener wrote: > > > try > > > auto c = ...; > > > signed char c2 = c; > > > return c2 >= ... > > > then > > > > That won't work

Re: [PATCH] middle-end: fix de-optimizations with bitclear patterns on signed values

2021-10-26 Thread Richard Biener via Gcc-patches
On Tue, 26 Oct 2021, Jakub Jelinek wrote: > On Tue, Oct 26, 2021 at 03:21:55PM +0200, Richard Biener wrote: > > On Tue, 26 Oct 2021, Jakub Jelinek wrote: > > > > > On Tue, Oct 26, 2021 at 03:13:29PM +0200, Richard Biener wrote: > > > > try > > > > auto c = ...; > > > > signed char c2 = c; > >

Re: [RFC] Partial vectors for s390

2021-10-26 Thread Richard Sandiford via Gcc-patches
Robin Dapp writes: > Hi Richard, > >> We already have code to probe the predicates of the underlying >> define_expands/insns to see whether they support certain constant >> IFN arguments; see e.g. internal_gather_scatter_fn_supported_p. >> We could do something similar here: add an extra operand t

Re: [PATCH v2] c++tools: Fix memory leak

2021-10-26 Thread Jason Merrill via Gcc-patches
On 10/21/21 17:34, Jonathan Wakely wrote: On Thu, 21 Oct 2021 at 20:38, Jason Merrill wrote: On 10/21/21 09:28, Jonathan Wakely wrote: >   #else >     buffer = xmalloc (stat.st_size); >     if (!buffer) >       return -errno; > +  struct Deleter { void operator()(voi

Re: [PATCH v2] c++: P2360R0: Extend init-stmt to allow alias-decl [PR102617]

2021-10-26 Thread Jason Merrill via Gcc-patches
On 10/21/21 18:27, Marek Polacek wrote: On Thu, Oct 21, 2021 at 04:56:57PM -0400, Jason Merrill wrote: On 10/21/21 16:26, Marek Polacek wrote: The following patch implements C++23 P2360R0. This proposal merely extends init-statement to contain alias-declaration. init-statement is used in if/f

Re: [PATCH 2/2]AArch64: Add better costing for vector constants and operations

2021-10-26 Thread Richard Sandiford via Gcc-patches
Tamar Christina writes: > Hi, > > Following the discussion below here's a revised patch. > > Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. > > Ok for master? Looks good functionally, just got some comments about the implementation. > @@ -14006,8 +14007,52 @@ cost_plus: >

Re: [PATCH] aix: handle 64bit inodes for include directories

2021-10-26 Thread CHIGOT, CLEMENT via Gcc-patches
Hi everyone, Gentle ping on this patch. Clément From: CHIGOT, CLEMENT Sent: Tuesday, October 12, 2021 10:35 AM To: Jeff Law ; David Malcolm Cc: gcc-patches@gcc.gnu.org ; David Edelsohn Subject: Re: [PATCH] aix: handle 64bit inodes for include directories Hi J

[PATCH] Fix negative integer range for UInteger.

2021-10-26 Thread Martin Liška
Hello. We should not allow a negative IntegerRange for UInteger options. The negative ranges for the 2 params are default and does not make sense. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin gcc/ChangeLog: * opt-function

[committed] MAINTAINERS: Add myself as a VAX port maintainer

2021-10-26 Thread Maciej W. Rozycki
* MAINTAINERS (CPU Port Maintainers): Add myself as a VAX port maintainer. --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index b22f930583a..901a6305184 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -117,6 +117,7 @@ tilegx port

Re: [committed] MAINTAINERS: Add myself as a VAX port maintainer

2021-10-26 Thread Martin Liška
On 10/26/21 17:26, Maciej W. Rozycki wrote: * MAINTAINERS (CPU Port Maintainers): Add myself as a VAX port maintainer. Congratulations! Please remove your name from Write After Approval: $ make check -k RUNTESTFLAGS="maintainers.exp" ... Running /home/marxin/Programming/gcc/gc

Re: [PATCH] gcc/configure: check for powerpc64le-unknown-freebsd

2021-10-26 Thread Segher Boessenkool
On Sun, Oct 17, 2021 at 02:28:48AM +0200, Piotr Kubaj wrote: > On 21-10-16 18:57:39, Segher Boessenkool wrote: > > On Sat, Oct 16, 2021 at 04:09:05AM +0200, Piotr Kubaj wrote: > > > Only powerpc64-unknown-freebsd was checked for. > > > > > > Signed-off-by: Piotr Kubaj > > > > Thanks! > > > > I

Re: [PATCH v3 1/1] [ARM] Add support for TLS register based stack protector canary access

2021-10-26 Thread Kees Cook via Gcc-patches
On Tue, Oct 26, 2021 at 10:18:36AM +0200, Ard Biesheuvel wrote: > Add support for accessing the stack canary value via the TLS register, > so that multiple threads running in the same address space can use > distinct canary values. This is intended for the Linux kernel running in > SMP mode, where

Re: [PATCH v2 COMMITTED] rs6000: Fixes for tests including only

2021-10-26 Thread Paul A. Clarke via Gcc-patches
On Mon, Oct 25, 2021 at 05:32:51PM -0500, Segher Boessenkool wrote: > On Mon, Oct 25, 2021 at 03:33:21PM -0500, Paul A. Clarke wrote: > > * config/rs6000/x86intrin.h: Move some included headers to new > > headers; include new immintrin.h instead. > > s/; i/. I/ (And instead of what?) >

[PATCH] c++: CTAD within template argument [PR102933]

2021-10-26 Thread Patrick Palka via Gcc-patches
Here when checking for erroneous occurrences of 'auto' inside a template argument (which is allowed by the concepts TS for class templates), extract_autos_r picks up the CTAD placeholder for X{T{0}} which causes check_auto_in_tmpl_args to reject this valid template argument. This patch fixes this

[PATCH] c++: quadratic constexpr behavior for left-assoc logical exprs [PR102780]

2021-10-26 Thread Patrick Palka via Gcc-patches
In the testcase below the two left fold expressions each expand into a logical expression with 1024 terms, for which potential_const_expr_1 takes more than a minute to return true. This is because p_c_e_1 performs trial evaluation of the first operand of a &&/|| in order to determine whether to co

Re: [committed] MAINTAINERS: Add myself as a VAX port maintainer

2021-10-26 Thread Maciej W. Rozycki
On Tue, 26 Oct 2021, Martin Liška wrote: > Please remove your name from Write After Approval: > > $ make check -k RUNTESTFLAGS="maintainers.exp" > ... > Running /home/marxin/Programming/gcc/gcc/testsuite/gcc.src/maintainers.exp ... > Redundant in write approval: Maciej W. Rozycki > FAIL: maintain

Re: [PATCH] c++: quadratic constexpr behavior for left-assoc logical exprs [PR102780]

2021-10-26 Thread Jakub Jelinek via Gcc-patches
On Tue, Oct 26, 2021 at 01:44:18PM -0400, Patrick Palka via Gcc-patches wrote: > In the testcase below the two left fold expressions each expand into a > logical expression with 1024 terms, for which potential_const_expr_1 > takes more than a minute to return true. This is because p_c_e_1 > perfor

[PATCH] powerpc: Remove LINK_OS_EXTRA_SPEC{32, 64} from --with-advance-toolchain

2021-10-26 Thread Lucas A. M. Magalhaes via Gcc-patches
Historically this was added to fill gaps from ld.so.cache on early AT releases. This now are just causing errors and rework. Since AT5.0 the AT's ld.so is using a correctly configured ld.so.cache and sets the DT_INTERP to AT's ld.so. This two factors are sufficient for an AT builded program to get

Re: [committed] MAINTAINERS: Add myself as a VAX port maintainer

2021-10-26 Thread Jakub Jelinek via Gcc-patches
On Tue, Oct 26, 2021 at 06:51:09PM +0100, Maciej W. Rozycki wrote: > On Tue, 26 Oct 2021, Martin Liška wrote: > > > Please remove your name from Write After Approval: > > > > $ make check -k RUNTESTFLAGS="maintainers.exp" > > ... > > Running /home/marxin/Programming/gcc/gcc/testsuite/gcc.src/main

[committed] [PR102842] LRA: Consider all outputs in generation of matching reloads

2021-10-26 Thread Vladimir Makarov via Gcc-patches
The following patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102842 As the patch touches a sensitive LRA code, the patch was bootstrapped tested on x86-64, aarch64, and ppc64. I've committed the patch only in master branch.  Later (after some observation), I'll commit it into gcc-1

Re: [PATCH] c++: quadratic constexpr behavior for left-assoc logical exprs [PR102780]

2021-10-26 Thread Jason Merrill via Gcc-patches
On Tue, Oct 26, 2021 at 2:46 PM Jakub Jelinek via Gcc-patches < gcc-patches@gcc.gnu.org> wrote: > On Tue, Oct 26, 2021 at 01:44:18PM -0400, Patrick Palka via Gcc-patches > wrote: > > In the testcase below the two left fold expressions each expand into a > > logical expression with 1024 terms, for

Re: [PATCH] middle-end: fix de-optimizations with bitclear patterns on signed values

2021-10-26 Thread Jonathan Wakely via Gcc-patches
On Tue, 26 Oct 2021 at 14:36, Jakub Jelinek wrote: > On Tue, Oct 26, 2021 at 03:21:55PM +0200, Richard Biener wrote: > > On Tue, 26 Oct 2021, Jakub Jelinek wrote: > > > > > On Tue, Oct 26, 2021 at 03:13:29PM +0200, Richard Biener wrote: > > > > try > > > > auto c = ...; > > > > signed char c2

Re: [PATCH] middle-end: fix de-optimizations with bitclear patterns on signed values

2021-10-26 Thread Jakub Jelinek via Gcc-patches
On Tue, Oct 26, 2021 at 08:35:40PM +0100, Jonathan Wakely wrote: > We can change __cmp_cat::type if that would result in better code. I picked > signed char because we only need two bits, and preferably have a signed > type as it simplifies some things. Would int make more sense? Or int:2 ? I thin

[PATCH] PR fortran/102956 - PDT KIND and LEN type parameters are mutually exclusive

2021-10-26 Thread Harald Anlauf via Gcc-patches
Dear Fortranners, we were missing a conflict check for PDT KIND and LEN type parameters: F2018: 7.5.3.1 Type parameter definition statement R732 type-param-def-stmt is integer-type-spec, type-param-attr-spec :: type-param-decl-list R734 type-param-attr-spec is KIND or LEN (3) The ty

Re: [PATCH] middle-end: fix de-optimizations with bitclear patterns on signed values

2021-10-26 Thread Jonathan Wakely via Gcc-patches
On Tue, 26 Oct 2021 at 20:40, Jakub Jelinek wrote: > On Tue, Oct 26, 2021 at 08:35:40PM +0100, Jonathan Wakely wrote: > > We can change __cmp_cat::type if that would result in better code. I > picked > > signed char because we only need two bits, and preferably have a signed > > type as it simplif

Re: [PATCH] PR fortran/102956 - PDT KIND and LEN type parameters are mutually exclusive

2021-10-26 Thread Tobias Burnus
On 26.10.21 21:40, Harald Anlauf via Fortran wrote: we were missing a conflict check for PDT KIND and LEN type parameters: F2018: 7.5.3.1 Type parameter definition statement R732 type-param-def-stmt is integer-type-spec, type-param-attr-spec :: type-param-decl-list R734 type-param-

Re: [PING PATCH v4 2/3] rs6000: Support SSE4.1 "round" intrinsics

2021-10-26 Thread Paul A. Clarke via Gcc-patches
Patches 1/3 and 3/3 have been committed. This is only a ping for 2/3. On Mon, Oct 18, 2021 at 08:15:11PM -0500, Paul A. Clarke via Gcc-patches wrote: > Suppress exceptions (when specified), by saving, manipulating, and > restoring the FPSCR. Similarly, save, set, and restore the floating-point >

Re: [PATCH] c++: quadratic constexpr behavior for left-assoc logical exprs [PR102780]

2021-10-26 Thread Jakub Jelinek via Gcc-patches
On Tue, Oct 26, 2021 at 03:29:02PM -0400, Jason Merrill wrote: > On Tue, Oct 26, 2021 at 2:46 PM Jakub Jelinek via Gcc-patches < > gcc-patches@gcc.gnu.org> wrote: > > > On Tue, Oct 26, 2021 at 01:44:18PM -0400, Patrick Palka via Gcc-patches > > wrote: > > > In the testcase below the two left fold

[PATCH, committed] PR fortran/86551 - ICE on invalid code with select type

2021-10-26 Thread Harald Anlauf via Gcc-patches
Dear Fortranners, as has been validated by others before and checked again, the underlying issue of this PR has been fixed before by an unknown commit. To ensure that it doesn't pop up again, and as suggested in the PR, I've packaged the testcase and committed as obvious. Thanks, Harald commit

Re: [committed] MAINTAINERS: Add myself as a VAX port maintainer

2021-10-26 Thread Jeff Law via Gcc-patches
On 10/26/2021 1:06 PM, Jakub Jelinek via Gcc-patches wrote: On Tue, Oct 26, 2021 at 06:51:09PM +0100, Maciej W. Rozycki wrote: On Tue, 26 Oct 2021, Martin Liška wrote: Please remove your name from Write After Approval: $ make check -k RUNTESTFLAGS="maintainers.exp" ... Running /home/marxin

Re: [PATCH, v2] c++: Diagnose taking address of an immediate member function [PR102753]

2021-10-26 Thread Jason Merrill via Gcc-patches
On 10/21/21 07:17, Jakub Jelinek wrote: On Wed, Oct 20, 2021 at 07:16:44PM -0400, Jason Merrill wrote: or an unevaluated operand, or a subexpression of an immediate invocation. Hmm...that suggests that in consteval23.C, bar(foo) should also be OK, Ouch. That opens a big can of worms, see bel

Re: [PATCH] c++: quadratic constexpr behavior for left-assoc logical exprs [PR102780]

2021-10-26 Thread Patrick Palka via Gcc-patches
On Tue, 26 Oct 2021, Jason Merrill wrote: > On Tue, Oct 26, 2021 at 2:46 PM Jakub Jelinek via Gcc-patches > wrote: > On Tue, Oct 26, 2021 at 01:44:18PM -0400, Patrick Palka via Gcc-patches > wrote: > > In the testcase below the two left fold expressions each expand into a > >

Re: [PATCH] c++: quadratic constexpr behavior for left-assoc logical exprs [PR102780]

2021-10-26 Thread Jakub Jelinek via Gcc-patches
On Tue, Oct 26, 2021 at 05:07:43PM -0400, Patrick Palka wrote: > The performance impact of the other calls to cxx_eval_outermost_const_expr > from p_c_e_1 is probably already mostly mitigated by the constexpr call > cache and the fact that we try to evaluate all calls to constexpr > functions durin

[PATCH] gcc/Makefile.in: fix bug in gengtype link rule

2021-10-26 Thread David Malcolm via Gcc-patches
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. OK for trunk? gcc/ChangeLog: * Makefile.in: Fix syntax for reference to LIBDEPS in gengtype link rule. Signed-off-by: David Malcolm --- gcc/Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --gi

[PATCH] assert_streq: add newlines to failure message

2021-10-26 Thread David Malcolm via Gcc-patches
Adding newlines so that the two strings line up makes string equality failures considerably easier to read. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. OK for trunk? gcc/ChangeLog: * selftest.c (assert_streq): Add newlines when emitting non-equal non-NULL string

Go patch committed: Permit compiler directives in parenthesized groups

2021-10-26 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend permits compiler directives in parenthesized groups. The original compiler directive support was only for //line at the start of a line and for //go: comments before function declarations. When support was added for //go:notinheap for types and //go:embed for variabl

Re: [PATCH] Fix loop split incorrect count and probability

2021-10-26 Thread Xionghu Luo via Gcc-patches
On 2021/10/26 21:05, Jan Hubicka wrote: >>> > >> That said, likely the profile update cannot be done uniformly >> for all blocks of a loop? > > For the loop: > > for (i = 0; i < n; i = inc (i)) > { > if (ga) > ga = do_something (); > } > > to: > > for (i = 0; i < x; i =

Re: [RFC] Don't move cold code out of loop by checking bb count

2021-10-26 Thread Xionghu Luo via Gcc-patches
On 2021/10/26 21:20, Richard Biener wrote: > On Mon, Oct 18, 2021 at 6:29 AM Xionghu Luo wrote: >> >> >> >> On 2021/10/15 16:11, Richard Biener wrote: >>> On Sat, Oct 9, 2021 at 5:45 AM Xionghu Luo wrote: Hi, On 2021/9/28 20:09, Richard Biener wrote: > On Fri, Sep 24, 2

RISCV: Add zmmul extension

2021-10-26 Thread shihua
From: Liaoshihua --- gcc/common/config/riscv/riscv-common.c | 3 +++ gcc/config/riscv/riscv-c.c | 2 +- gcc/config/riscv/riscv-opts.h | 3 +++ gcc/config/riscv/riscv.c | 5 - gcc/config/riscv/riscv.md | 30 +- gcc/co

[r12-4726 Regression] FAIL: g++.dg/warn/Wstringop-overflow-4.C -std=gnu++98 (test for excess errors) on Linux/x86_64

2021-10-26 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, 9a27acc30a34b7854db32eac562306cebac6fa1e is the first bad commit commit 9a27acc30a34b7854db32eac562306cebac6fa1e Author: Martin Sebor Date: Tue Oct 26 14:38:11 2021 -0600 Make full use of context-sensitive ranges in access warnings. caused FAIL: g++.dg/warn/Wstringop-ove

[r12-4725 Regression] FAIL: libgomp.c/doacross-1.c (test for excess errors) on Linux/x86_64

2021-10-26 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, 88b504b7a8c5affb0ffa97990d22af2b199e36ed is the first bad commit commit 88b504b7a8c5affb0ffa97990d22af2b199e36ed Author: Martin Sebor Date: Tue Oct 26 14:34:16 2021 -0600 Detect overflow by atomic functions [PR102453]. caused FAIL: gcc.dg/Warray-bounds-90.c (test for exc

Re: [PATCH] Fix negative integer range for UInteger.

2021-10-26 Thread Richard Biener via Gcc-patches
On Tue, Oct 26, 2021 at 5:11 PM Martin Liška wrote: > > Hello. > > We should not allow a negative IntegerRange for UInteger options. > The negative ranges for the 2 params are default and does not make sense. > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Ready to b

[PATCH v2 0/4] loop split fix and functions renaming

2021-10-26 Thread Xionghu Luo via Gcc-patches
This patchset is an followed update from [1]. Patch 1 is expecting review comments from Honza[2]; Patch 2 refactors loop_version to remove loopify call and adjust condition generation later than loopify; Patch 3 and Patch 4 are function renamings to help better understanding. [1] https://gcc.gnu.o

  1   2   >