[PATCH v5 02/12] LoongArch Port: gcc build

2022-01-21 Thread Chenghua Xu
From: chenglulu gcc/ * common/config/loongarch/loongarch-common.cc: New file. * config/loongarch/genopts/genstr.sh: New file. * config/loongarch/genopts/loongarch-strings: New file. * config/loongarch/genopts/loongarch.opt.in: New file. *

[PATCH v5 10/12] LoongArch Port: libgomp

2022-01-21 Thread Chenghua Xu
From: chenglulu libgomp/ * configure.tgt: Add LoongArch triplet. --- libgomp/configure.tgt | 4 1 file changed, 4 insertions(+) diff --git a/libgomp/configure.tgt b/libgomp/configure.tgt index d4f1e741b5a..2cd7272fcd8 100644 --- a/libgomp/configure.tgt +++ b/libgomp/configure.tgt

[PATCH v5 09/12] LoongArch Port: Regenerate libgcc/configure.

2022-01-21 Thread Chenghua Xu
From: chenglulu --- libgcc/configure | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libgcc/configure b/libgcc/configure index 4919a56f518..ce04c4f529f 100755 --- a/libgcc/configure +++ b/libgcc/configure @@ -2412,6 +2412,9 @@ case "${host}" in # sets the default

[PATCH v5 07/12] LoongArch Port: Builtin macros.

2022-01-21 Thread Chenghua Xu
From: chenglulu gcc/ *config/loongarch/loongarch-c.cc --- gcc/config/loongarch/loongarch-c.cc | 109 1 file changed, 109 insertions(+) create mode 100644 gcc/config/loongarch/loongarch-c.cc diff --git a/gcc/config/loongarch/loongarch-c.cc

[PATCH v5 03/12] LoongArch Port: Regenerate gcc/configure.

2022-01-21 Thread Chenghua Xu
From: chenglulu --- gcc/configure | 66 ++- 1 file changed, 60 insertions(+), 6 deletions(-) diff --git a/gcc/configure b/gcc/configure index bd4d4721868..3823bc4e783 100755 --- a/gcc/configure +++ b/gcc/configure @@ -5442,6 +5442,9 @@ case

[PATCH v5 01/12] LoongArch Port: Regenerate configure

2022-01-21 Thread Chenghua Xu
From: chenglulu * config/picflag.m4: Default add build option '-fpic' for LoongArch. * configure: Add LoongArch tuples. * configure.ac: Like wise. --- config/picflag.m4 | 3 +++ configure | 10 +- configure.ac | 10 +- 3 files changed, 21

[PATCH v5 00/12] Add LoongArch support

2022-01-21 Thread Chenghua Xu
The LoongArch architecture (LoongArch) is an Instruction Set Architecture (ISA) that has a Reduced Instruction Set Computer (RISC) style. The documents are on https://loongson.github.io/LoongArch-Documentation/README-EN.html The ELF ABI Documents are on:

[PATCH] fortran: Extend -fconvert= option for ppc64le r16_ieee and r16_ibm

2022-01-21 Thread Jakub Jelinek via Gcc-patches
Hi! This patch on top of the previously posted option handling changes patch allows specifying -fconvert=swap,r16_ieee etc. (but will error on it when not on powerpc64le because in the library such swapping is only implemented for HAVE_REAL_17). Bootstrapped/regtested on x86_64-linux and

[PATCH] options: Fix up -fsanitize-coverage= [PR104158]

2022-01-21 Thread Jakub Jelinek via Gcc-patches
Hi! This is incremental patch to fix up -fsanitize-coverage= option handling, allow -fno-sanitize-coverage= again, allow both options together in one option or make -fsanitize-coverage=trace-pc -fsanitize-coverage=trace-cmp actually enable both suboptions rather than the last one.

[PATCH] options: Add EnumSet and Set property support [PR104158]

2022-01-21 Thread Jakub Jelinek via Gcc-patches
Hi! The following patch is infrastructure support for at least 3 different options that need changes: 1) PR104158 talks about a regression with the -fsanitizer-coverage= option; in GCC 11 and older and on trunk prior to r12-1177, this option behaved similarly to

Re: [PATCH] libgccjit: Add support for bitcasts [PR104071]

2022-01-21 Thread Antoni Boucher via Gcc-patches
Hi. Here's the updated patch. See comments below. Le mardi 18 janvier 2022 à 18:06 -0500, David Malcolm a écrit : > On Mon, 2022-01-17 at 19:30 -0500, Antoni Boucher via Gcc-patches > wrote: > > I was missing the define, so I added it. > > Here's the new patch with it. > > Thanks for the patch.

Re: Ping: [PATCH] PR 103763, Fix fold-vec-splat-floatdouble on power10.

2022-01-21 Thread David Edelsohn via Gcc-patches
On Fri, Jan 21, 2022 at 2:56 PM Michael Meissner wrote: > > Ping patch > https://gcc.gnu.org/pipermail/gcc-patches/2022-January/587924.html > > | Date: Fri, 7 Jan 2022 16:05:53 -0500 > | From: Michael Meissner > | Subject: [PATCH] PR 103763, Fix fold-vec-splat-floatdouble on power10. > |

Re: [PATCH v3 07/15] arm: Implement MVE predicates as vectors of booleans

2022-01-21 Thread Christophe Lyon via Gcc-patches
Hi Andre, On Fri, Jan 21, 2022 at 12:23 PM Andre Vieira (lists) via Gcc-patches < gcc-patches@gcc.gnu.org> wrote: > Hi Christophe, > > On 13/01/2022 14:56, Christophe Lyon via Gcc-patches wrote: > > diff --git a/gcc/config/arm/arm-simd-builtin-types.def >

Re: [PATCH v2] x86: Properly disable -fsplit-stack support on non-glibc targets

2022-01-21 Thread Jakub Jelinek via Gcc-patches
On Fri, Jan 21, 2022 at 01:57:57PM -0800, H.J. Lu wrote: > Revert x86 changes in > > commit c163647ffbc9a20c8feb6e079dbecccfe016c82e > Author: Soren Tempel > Date: Fri Jan 21 19:22:46 2022 + > > Disable -fsplit-stack support on non-glibc targets > > and change

[PATCH v2] x86: Properly disable -fsplit-stack support on non-glibc targets

2022-01-21 Thread H.J. Lu via Gcc-patches
On Fri, Jan 21, 2022 at 10:42:03PM +0100, Jakub Jelinek wrote: > On Fri, Jan 21, 2022 at 01:31:32PM -0800, H.J. Lu wrote: > > On Fri, Jan 21, 2022 at 09:18:41PM +0100, Jakub Jelinek via Gcc-patches > > wrote: > > > On Fri, Jan 21, 2022 at 08:16:11PM +0100, soeren--- via Gcc-patches wrote: > > > >

Re: [PATCH] x86: Properly disable -fsplit-stack support on non-glibc targets

2022-01-21 Thread Jakub Jelinek via Gcc-patches
On Fri, Jan 21, 2022 at 01:31:32PM -0800, H.J. Lu wrote: > On Fri, Jan 21, 2022 at 09:18:41PM +0100, Jakub Jelinek via Gcc-patches wrote: > > On Fri, Jan 21, 2022 at 08:16:11PM +0100, soeren--- via Gcc-patches wrote: > > > gcc/ChangeLog: > > > > > > * common/config/s390/s390-common.c

Re: [PATCH] c-family: Fix up a -Wformat regression [PR104148]

2022-01-21 Thread Joseph Myers
On Fri, 21 Jan 2022, Jakub Jelinek via Gcc-patches wrote: > 2022-01-21 Jakub Jelinek > > PR c++/104148 > * c-common.h (check_function_arguments_recurse): Add for_format > arg. > * c-common.cc (check_function_nonnull): Pass false to >

Re: [PATCH] Mark XXSPLTIW/XXSPLTIDP as prefixed -- PR 104136

2022-01-21 Thread Segher Boessenkool
Hi! On Fri, Jan 21, 2022 at 02:49:26PM -0500, Michael Meissner wrote: > If you compile module_advect_em.F90 with -Ofast -mcpu=power10, one module > is large enough that we can't use a single conditional jump to span the > function. Instead, GCC has to reverse the condition, and do a conditional

[PATCH] x86: Properly disable -fsplit-stack support on non-glibc targets

2022-01-21 Thread H.J. Lu via Gcc-patches
On Fri, Jan 21, 2022 at 09:18:41PM +0100, Jakub Jelinek via Gcc-patches wrote: > On Fri, Jan 21, 2022 at 08:16:11PM +0100, soeren--- via Gcc-patches wrote: > > gcc/ChangeLog: > > > > * common/config/s390/s390-common.c (s390_supports_split_stack): > > Only support split-stack on glibc

Re: [PATCH v2] Disable -fsplit-stack support on non-glibc targets

2022-01-21 Thread Sören Tempel via Gcc-patches
"H.J. Lu" wrote: > OPTION_GLIBC can't be used here since OPTION_GLIBC is > evaluated at run-time: > > https://gcc.gnu.org/pipermail/gcc-regression/2022-January/076271.html Oops, my bad, sorry! This accidentally broke in one of the two cleanup commits. Originally I justed use TARGET_GLIBC_MAJOR

Re: [PATCH v3] Disable -fsplit-stack support on non-glibc targets

2022-01-21 Thread Jakub Jelinek via Gcc-patches
On Fri, Jan 21, 2022 at 08:16:11PM +0100, soeren--- via Gcc-patches wrote: > gcc/ChangeLog: > > * common/config/s390/s390-common.c (s390_supports_split_stack): > Only support split-stack on glibc targets. > * config/i386/gnu-user-common.h (STACK_CHECK_STATIC_BUILTIN): Ditto. >

[pushed] c++: explain failing static_assert

2022-01-21 Thread Jason Merrill via Gcc-patches
While looking at another bug I wanted the compiler to tell me what the two unequal values were. Tested x86_64-pc-linux-gnu, applying to trunk. gcc/cp/ChangeLog: * semantics.cc (find_failing_clause): Return expr if not decomposable. (finish_static_assert): Show constant

Re: [PATCH v3] Disable -fsplit-stack support on non-glibc targets

2022-01-21 Thread H.J. Lu via Gcc-patches
On Fri, Jan 21, 2022 at 11:47 AM H.J. Lu wrote: > > On Fri, Jan 21, 2022 at 11:23 AM Richard Sandiford via Gcc-patches > wrote: > > > > soe...@soeren-tempel.net writes: > > > From: Sören Tempel > > > > > > The -fsplit-stack option requires the pthread_t TCB definition in the > > > libc to

Ping, important: [PATCH] Use system default for long double if not specified on PowerPC.

2022-01-21 Thread Michael Meissner via Gcc-patches
Ping patch. https://gcc.gnu.org/pipermail/gcc-patches/2022-January/588292.html | Date: Wed, 12 Jan 2022 13:04:19 -0500 | From: Michael Meissner | Subject: [PATCH] Use system default for long double if not specified on PowerPC. | Message-ID: I believe this patch will be very important when

Ping: [PATCH] PR 103763, Fix fold-vec-splat-floatdouble on power10.

2022-01-21 Thread Michael Meissner via Gcc-patches
Ping patch https://gcc.gnu.org/pipermail/gcc-patches/2022-January/587924.html | Date: Fri, 7 Jan 2022 16:05:53 -0500 | From: Michael Meissner | Subject: [PATCH] PR 103763, Fix fold-vec-splat-floatdouble on power10. | Message-ID: -- Michael Meissner, IBM PO Box 98, Ayer, Massachusetts, USA,

Re: [PATCH v2] Disable -fsplit-stack support on non-glibc targets

2022-01-21 Thread H.J. Lu via Gcc-patches
On Sat, Dec 18, 2021 at 4:20 AM soeren--- via Gcc-patches wrote: > > From: Sören Tempel > > The -fsplit-stack option requires the pthread_t TCB definition in the > libc to provide certain struct fields at specific hardcoded offsets. As > far as I know, only glibc provides these fields at the

[PATCH] Mark XXSPLTIW/XXSPLTIDP as prefixed -- PR 104136

2022-01-21 Thread Michael Meissner via Gcc-patches
Mark XXSPLTIW/XXSPLTIDP as prefixed -- PR 104136 If you compile module_advect_em.F90 with -Ofast -mcpu=power10, one module is large enough that we can't use a single conditional jump to span the function. Instead, GCC has to reverse the condition, and do a conditional jump around an

Re: [PATCH v3] Disable -fsplit-stack support on non-glibc targets

2022-01-21 Thread H.J. Lu via Gcc-patches
On Fri, Jan 21, 2022 at 11:23 AM Richard Sandiford via Gcc-patches wrote: > > soe...@soeren-tempel.net writes: > > From: Sören Tempel > > > > The -fsplit-stack option requires the pthread_t TCB definition in the > > libc to provide certain struct fields at specific hardcoded offsets. As > > far

[pushed] c++: class array new checking [PR104084]

2022-01-21 Thread Jason Merrill via Gcc-patches
My patch for PR20040 made us stop exiting early from build_new_1 in cases of trivial initialization if there's a class operator delete; as a result, code later in the function needs to handle this case properly. Tested x86_64-pc-linux-gnu, applying to trunk. PR c++/104084 PR

Re: [PATCH v3] Disable -fsplit-stack support on non-glibc targets

2022-01-21 Thread Richard Sandiford via Gcc-patches
soe...@soeren-tempel.net writes: > From: Sören Tempel > > The -fsplit-stack option requires the pthread_t TCB definition in the > libc to provide certain struct fields at specific hardcoded offsets. As > far as I know, only glibc provides these fields at the required offsets. > Most notably, musl

[PATCH v3] Disable -fsplit-stack support on non-glibc targets

2022-01-21 Thread soeren--- via Gcc-patches
From: Sören Tempel The -fsplit-stack option requires the pthread_t TCB definition in the libc to provide certain struct fields at specific hardcoded offsets. As far as I know, only glibc provides these fields at the required offsets. Most notably, musl libc does not have these fields. However,

Re: [PATCH] rs6000: Support vector float/double for vec_sldw

2022-01-21 Thread Bill Schmidt via Gcc-patches
Thanks!  Pushed as r12-6806 with the testcase adjusted. Bill On 1/21/22 11:47 AM, Segher Boessenkool wrote: > Hi! > > On Fri, Jan 21, 2022 at 11:31:34AM -0600, Bill Schmidt wrote: >> It was recently discovered that Clang supports a couple of variants of >> vec_sldw that >> GCC does not. After

[pushed] [PR103676] LRA: Calculate and exclude some start hard registers for reload pseudos

2022-01-21 Thread Vladimir Makarov via Gcc-patches
The following patch solves https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103676 The patch was successfully bootstrapped and tested on x86_64, aarch64, and ppc64. commit 85419ac59724b7ce710ebb4acf03dbd747edeea3 Author: Vladimir N. Makarov Date: Fri Jan 21 13:34:32 2022 -0500 [PR103676]

Re: [PATCH v3] c++: ICE with noexcept and canonical types [PR101715]

2022-01-21 Thread Jason Merrill via Gcc-patches
On 1/21/22 12:42, Marek Polacek wrote: On Fri, Jan 21, 2022 at 09:27:17AM -0500, Jason Merrill wrote: On 1/20/22 20:03, Marek Polacek wrote: @@ -2815,12 +2816,23 @@ fixup_deferred_exception_variants (tree type, tree raises) cp_cv_quals var_quals = TYPE_QUALS (variant);

Strengthen a few OpenACC test cases

2022-01-21 Thread Thomas Schwinge
Hi! Pushed to master branch commit 087e545747ca9ee977e84326877b0ce1bc4c383a "Strengthen a few OpenACC test cases", see attached. Grüße Thomas - Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung;

Re: [PATCH] rs6000: Support vector float/double for vec_sldw

2022-01-21 Thread Segher Boessenkool
Hi! On Fri, Jan 21, 2022 at 11:31:34AM -0600, Bill Schmidt wrote: > It was recently discovered that Clang supports a couple of variants of > vec_sldw that > GCC does not. After some discussion, we decided that these variants are > reasonable, > and GCC will also support them. This patch adds

Re: [PATCH] [gfortran] Add support for allocate clause (OpenMP 5.0).

2022-01-21 Thread Tobias Burnus
On 21.01.22 18:15, Thomas Schwinge wrote: source-gcc/libgomp/testsuite/libgomp.fortran/allocate-1.f90:11:47: 11 | integer(c_int) function is_64bit_aligned (a) bind(C) | 1 Warning: Variable ‘a’ at (1) is a dummy

[PATCH v3] c++: ICE with noexcept and canonical types [PR101715]

2022-01-21 Thread Marek Polacek via Gcc-patches
On Fri, Jan 21, 2022 at 09:27:17AM -0500, Jason Merrill wrote: > On 1/20/22 20:03, Marek Polacek wrote: > > @@ -2815,12 +2816,23 @@ fixup_deferred_exception_variants (tree type, tree > > raises) > > cp_cv_quals var_quals = TYPE_QUALS (variant); > > cp_ref_qualifier rqual =

[PATCH] rs6000: Support vector float/double for vec_sldw

2022-01-21 Thread Bill Schmidt via Gcc-patches
Hi, It was recently discovered that Clang supports a couple of variants of vec_sldw that GCC does not. After some discussion, we decided that these variants are reasonable, and GCC will also support them. This patch adds that support. I updated an existing test and discovered it wasn't

Re: [PATCH] [gfortran] Add support for allocate clause (OpenMP 5.0).

2022-01-21 Thread Thomas Schwinge
Hi Abid! On 2022-01-11T22:31:54+, Hafiz Abid Qadeer wrote: > From d1fb55bff497a20e6feefa50bd03890e7a903c0e Mon Sep 17 00:00:00 2001 > From: Hafiz Abid Qadeer > Date: Fri, 24 Sep 2021 10:04:12 +0100 > Subject: [PATCH] [gfortran] Add support for allocate clause (OpenMP 5.0). > > This patch

[pushed] c++: [[no_unique_address]] and virtual base [PR104139]

2022-01-21 Thread Jason Merrill via Gcc-patches
Fixing a thinko in my patch for 103681: when computing the size of a virtual base, it would help to use its binfo instead of the one for the derived class. Tested x86_64-pc-linux-gnu, applying to trunk. PR c++/104139 PR c++/103681 gcc/cp/ChangeLog: * class.cc

Re: [PATCH] libstdc++: detect mold linker.

2022-01-21 Thread Jonathan Wakely via Gcc-patches
On Fri, 21 Jan 2022 at 16:11, Martin Liška wrote: > > Hi. > > This adds linker detection for mold in libstdc++-v3. > > Ready to be installed? Yes, OK (but please CC the libstdc++ list, not just me). > Thanks, > Martin > > libstdc++-v3/ChangeLog: > > * acinclude.m4: Detect features for

[PATCH] PR101260 regcprop: Add mode change check for copy reg

2022-01-21 Thread Andreas Krebbel via Gcc-patches
When propagating a multi-word register into an access with a smaller mode the can_change_mode backend hook is already consulted for the original register. This however is also required for the intermediate copy in copy_regno which might use a different register class. Bootstrapped on x86_64 and

Re: [PATCH] libgccjit: Add support for sized integer types, including 128-bit integers [PR95325]

2022-01-21 Thread Antoni Boucher via Gcc-patches
David: this is the email I was talking about in my other email. Here's the updated patch. By the way, I find the usage of NUM_GCC_JIT_TYPES brittle. Would it be better to switch to a new enum value for that instead? See comments below. Le jeudi 20 mai 2021 à 15:25 -0400, David Malcolm a écrit :

[PATCH] libstdc++: detect mold linker.

2022-01-21 Thread Martin Liška
Hi. This adds linker detection for mold in libstdc++-v3. Ready to be installed? Thanks, Martin libstdc++-v3/ChangeLog: * acinclude.m4: Detect features for ld.mold linker. * configure: Regenerate. --- libstdc++-v3/acinclude.m4 | 8 +- libstdc++-v3/configure| 52

[committed] libstdc++: Fix typo in comment

2022-01-21 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. libstdc++-v3/ChangeLog: * testsuite/20_util/shared_ptr/cons/array.cc: Fix comment. --- libstdc++-v3/testsuite/20_util/shared_ptr/cons/array.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[committed] libstdc++: Ensure all feature test macros have type long [PR87193]

2022-01-21 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. This defines all the __cpp_lib_xxx macros as type long, as required by the standard. We had an inconsistent mix of int and long, sometimes even for the same macro name. The __cpp_lib_experimental_xxx macros are left as type int, because that's what it

[committed] libstdc++: Fix condition for __cpp_lib_shared_ptr_arrays

2022-01-21 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. I changed the preprocessor condition from <= to < in r12-6574 which meant the macro was not defined by for C++17. libstdc++-v3/ChangeLog: * include/std/version (__cpp_lib_shared_ptr_arrays): Fix condition for C++17 definition. ---

Re: [PATCH] PR middle-end/104140: bootstrap ICE on riscv.

2022-01-21 Thread Richard Biener via Gcc-patches
> Am 21.01.2022 um 15:59 schrieb Roger Sayle : > >  > > This patch resolves the P1 "ice-on-valid-code" regression boostrapping > > GCC on risv-unknown-linux-gnu caused by my recent MULT_HIGHPART_EXPR > > functionality. RISC-V differs from x86_64 and many targets by > > supporting a

[PATCH] PR middle-end/104140: bootstrap ICE on riscv.

2022-01-21 Thread Roger Sayle
This patch resolves the P1 "ice-on-valid-code" regression boostrapping GCC on risv-unknown-linux-gnu caused by my recent MULT_HIGHPART_EXPR functionality. RISC-V differs from x86_64 and many targets by supporting a usmusidi3 instruction, basically a widening multiply where one operand is

[PATCH][pushed] Enable configure detection of ld.mold.

2022-01-21 Thread Martin Liška
Hello. The patch detects ld.mold linker and use it for comdat_group=yes and gcc_cv_ld_hidden=yes. Tested locally, I'm going to install it. Martin gcc/ChangeLog: * configure.ac: Detect ld_is_mold and use it for comdat_group=yes and gcc_cv_ld_hidden=yes. * configure:

Re: [PATCH v2] c++: ICE with noexcept and canonical types [PR101715]

2022-01-21 Thread Jason Merrill via Gcc-patches
On 1/20/22 20:03, Marek Polacek wrote: On Thu, Jan 20, 2022 at 03:23:24PM -0500, Jason Merrill wrote: On 1/18/22 11:05, Marek Polacek wrote: On Mon, Jan 17, 2022 at 01:48:48PM -0500, Jason Merrill wrote: On 1/14/22 19:22, Marek Polacek wrote: This is a "canonical types differ for identical

Difference between 32-bit SPARCv9 and SPARCv8+?

2022-01-21 Thread John Paul Adrian Glaubitz
Hello! I'm currently trying to solve a problem in LLVM which arises when building the compiler-rt library on 32-bit SPARC [1]. More specifically, I'm getting a linker error which indicates that the target does not 64-bit atomic operations natively and has to use libatomic: /usr/bin/ld:

Re: [committed] aarch64: Adjust spellcheck tests for recent quotation-mark changes

2022-01-21 Thread Martin Liška
On 1/21/22 12:39, Richard Earnshaw wrote: Martin's recent change to the way we handle quotation marks and punctuation in error messages caused some fallout in the testsuite. This patch updates the tests for the new output. Thank you for the patch. Martin

[PATCH] libstdc++: Fix aliasing violation in std::shared_ptr

2022-01-21 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux. Does anybody see a problem with this change? The non-atomic store that sets both reference counts to zero uses a type-punned pointer, which has undefined behaviour. We could use memset to write 8 bytes, but we don't actually need it to be a single store anyway. No other

Re: [PATCH] tree-optimization/100089 - BB vectorization of if-converted loop bodies

2022-01-21 Thread Richard Biener via Gcc-patches
On Fri, 21 Jan 2022, Richard Sandiford wrote: > Richard Biener writes: > > The PR complains that when we only partially BB vectorize an > > if-converted loop body that this can leave unvectorized code > > unconditionally executed and thus effectively slow down code. > > For -O2 we already

[committed] libstdc++: Fix constexpr constructor for atomic>

2022-01-21 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. libstdc++-v3/ChangeLog: * include/bits/shared_ptr_atomic.h (_Sp_atomic::_Atomic_count): Add constexpr. (_Sp_atomic::_M_ptr): Add default member-initializer. * testsuite/20_util/shared_ptr/atomic/atomic_shared_ptr.cc:

[PATCH] sanitizer/99673 - bad -Wstringop-overread diagnostic with asan

2022-01-21 Thread Richard Biener via Gcc-patches
The testcase got fixed by lowering of [ptr + CST] to ptr + CST. Pushed. 2022-01-21 Richard Biener PR sanitizer/99673 * gcc.dg/asan/pr99673.c: New testcase. --- gcc/testsuite/gcc.dg/asan/pr99673.c | 27 +++ 1 file changed, 27 insertions(+) create mode

Re: [PATCH] tree-optimization/100089 - BB vectorization of if-converted loop bodies

2022-01-21 Thread Richard Sandiford via Gcc-patches
Richard Biener writes: > The PR complains that when we only partially BB vectorize an > if-converted loop body that this can leave unvectorized code > unconditionally executed and thus effectively slow down code. > For -O2 we already mitigated the issue by not doing BB vectorization > when not

[PATCH] tree-optimization/100089 - BB vectorization of if-converted loop bodies

2022-01-21 Thread Richard Biener via Gcc-patches
The PR complains that when we only partially BB vectorize an if-converted loop body that this can leave unvectorized code unconditionally executed and thus effectively slow down code. For -O2 we already mitigated the issue by not doing BB vectorization when not all if-converted stmts were covered

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

2022-01-21 Thread Kyrylo Tkachov via Gcc-patches
> -Original Message- > From: Ard Biesheuvel > Sent: Friday, January 21, 2022 10:50 AM > To: Kyrylo Tkachov > Cc: linux-harden...@vger.kernel.org; Richard Earnshaw > ; Richard Sandiford > ; thomas.preudho...@celest.fr; Keith > Packard ; gcc-patches@gcc.gnu.org > Subject: Re: [PATCH v6

Re: [PATCH] Reset relations when crossing backedges.

2022-01-21 Thread Aldy Hernandez via Gcc-patches
On Fri, Jan 21, 2022 at 11:56 AM Richard Biener wrote: > > On Fri, Jan 21, 2022 at 11:30 AM Aldy Hernandez wrote: > > > > On Fri, Jan 21, 2022 at 10:43 AM Richard Biener > > wrote: > > > > > > On Fri, Jan 21, 2022 at 9:30 AM Aldy Hernandez via Gcc-patches > > > wrote: > > > > > > > > As

[committed] aarch64: Adjust spellcheck tests for recent quotation-mark changes

2022-01-21 Thread Richard Earnshaw via Gcc-patches
Martin's recent change to the way we handle quotation marks and punctuation in error messages caused some fallout in the testsuite. This patch updates the tests for the new output. Adjust tests for quotation-mark and punctuation changes. gcc/testsuite: *

Re: [PATCH v3 07/15] arm: Implement MVE predicates as vectors of booleans

2022-01-21 Thread Andre Vieira (lists) via Gcc-patches
Hi Christophe, On 13/01/2022 14:56, Christophe Lyon via Gcc-patches wrote: diff --git a/gcc/config/arm/arm-simd-builtin-types.def b/gcc/config/arm/arm-simd-builtin-types.def index 6ba6f211531..920c2a68e4c 100644 --- a/gcc/config/arm/arm-simd-builtin-types.def +++

Re: [PATCH] Reset relations when crossing backedges.

2022-01-21 Thread Richard Biener via Gcc-patches
On Fri, Jan 21, 2022 at 11:30 AM Aldy Hernandez wrote: > > On Fri, Jan 21, 2022 at 10:43 AM Richard Biener > wrote: > > > > On Fri, Jan 21, 2022 at 9:30 AM Aldy Hernandez via Gcc-patches > > wrote: > > > > > > As discussed in PR103721, the problem here is that we are crossing a > > > backedge

[PATCH] tree-optimization/104156 - fix unswitching compare-debug issue

2022-01-21 Thread Richard Biener via Gcc-patches
When hoisting guards the unswitching pass does not properly ignore debug stmts when looking for uses outside of the loop of defs produced in the skipped region. The following rectifies this by instead collecting them and resetting them after the transform. Bootstrapped and tested on

[PATCH] tree-optimization/104152 - add missing check for SLP constant build

2022-01-21 Thread Richard Biener via Gcc-patches
This adds a missing check to verify we can actually build an invariant vector from components when SLP vectorizing an associatable chain. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. Richard. 2022-01-21 Richard Biener PR tree-optimization/104152 *

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

2022-01-21 Thread Ard Biesheuvel via Gcc-patches
On Fri, 21 Jan 2022 at 11:47, Kyrylo Tkachov wrote: > > > -Original Message- > > From: Gcc-patches > bounces+kyrylo.tkachov=arm@gcc.gnu.org> On Behalf Of Ard > > Biesheuvel via Gcc-patches > > Sent: Wednesday, January 19, 2022 5:44 PM > > To: linux-harden...@vger.kernel.org > > Cc:

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

2022-01-21 Thread Kyrylo Tkachov via Gcc-patches
> -Original Message- > From: Gcc-patches bounces+kyrylo.tkachov=arm@gcc.gnu.org> On Behalf Of Ard > Biesheuvel via Gcc-patches > Sent: Wednesday, January 19, 2022 5:44 PM > To: linux-harden...@vger.kernel.org > Cc: Richard Earnshaw ; Richard Sandiford > ; thomas.preudho...@celest.fr;

Re: [PATCH] Reset relations when crossing backedges.

2022-01-21 Thread Aldy Hernandez via Gcc-patches
On Fri, Jan 21, 2022 at 10:43 AM Richard Biener wrote: > > On Fri, Jan 21, 2022 at 9:30 AM Aldy Hernandez via Gcc-patches > wrote: > > > > As discussed in PR103721, the problem here is that we are crossing a > > backedge and causing us to use relations from a previous iteration of a > > loop. >

Re: [PATCH] Update the type of control.base after changed

2022-01-21 Thread Richard Biener via Gcc-patches
On Fri, 21 Jan 2022, Jiufu Guo wrote: > Hi, > > This patch correct the type of niter->control.base, when it is updated > as a PLUS expr. > During build PLUS expr, the result type should align with the type of > the operands. > > Bootstrap and regtest pass on ppc64/ppc64le and x86. > Is this ok

Re: [PATCH] Reset relations when crossing backedges.

2022-01-21 Thread Richard Biener via Gcc-patches
On Fri, Jan 21, 2022 at 9:30 AM Aldy Hernandez via Gcc-patches wrote: > > As discussed in PR103721, the problem here is that we are crossing a > backedge and causing us to use relations from a previous iteration of a > loop. > > This handles the testcases in both PR103721 and PR104067 which are

[PATCH v3, rs6000] Add a combine pattern for CA minus one [PR95737]

2022-01-21 Thread HAO CHEN GUI via Gcc-patches
Hi, This patch adds a combine pattern for "CA minus one". As CA only has two values (0 or 1), we could convert following pattern (sign_extend:DI (plus:SI (reg:SI 98 ca) (const_int -1 [0x] to (plus:DI (reg:DI 98 ca) (const_int -1

[PATCH] Update the type of control.base after changed

2022-01-21 Thread Jiufu Guo via Gcc-patches
Hi, This patch correct the type of niter->control.base, when it is updated as a PLUS expr. During build PLUS expr, the result type should align with the type of the operands. Bootstrap and regtest pass on ppc64/ppc64le and x86. Is this ok for trunk? BR, Jiufu PR

Re: [PATCH] s390: Change costs for load on condition.

2022-01-21 Thread Andreas Krebbel via Gcc-patches
On 1/20/22 11:10, Robin Dapp wrote: > Hi, > > this patch is a follow-up patch to the recent ifcvt changes. It > increased costs for a load on condition to 6. This ensures that we > if-convert sequences of three regular instructions (of cost 4) e.g. a > compare and two SETs into two loads on

[PATCH] Reset relations when crossing backedges.

2022-01-21 Thread Aldy Hernandez via Gcc-patches
As discussed in PR103721, the problem here is that we are crossing a backedge and causing us to use relations from a previous iteration of a loop. This handles the testcases in both PR103721 and PR104067 which are variants of the same thing. Tested on x86-64 Linux with the usual regstrap as well

Re: [PATCH] s390: Split CCSmode into CCSINT and CCSFP

2022-01-21 Thread Andreas Krebbel via Gcc-patches
On 1/20/22 17:13, Robin Dapp wrote: > Hi, > > this patch splits the CCSmode into an integer and a floating point > variant. This allows ifcvt to consider floating point compares which > would be rejected before because they could not be reversed. > > Bootstrapped and regtested on s390x. > > Is

Re: [PATCH v2] Disable -fsplit-stack support on non-glibc targets

2022-01-21 Thread Uros Bizjak via Gcc-patches
On Thu, Jan 20, 2022 at 11:52 PM Richard Sandiford wrote: > > cc:ing the x86 and s390 maintainers > > soeren--- via Gcc-patches writes: > > From: Sören Tempel > > > > The -fsplit-stack option requires the pthread_t TCB definition in the > > libc to provide certain struct fields at specific

Re: [PATCH] Fix alignment of stack slots for overaligned types [PR103500]

2022-01-21 Thread Richard Sandiford via Gcc-patches
Richard Sandiford via Gcc-patches writes: > How about instead: > > (1) Define a new ASLK_* flag for assign_stack_local_1. > > (2) When the flag is set, make: > > if (alignment_in_bits > MAX_SUPPORTED_STACK_ALIGNMENT) > { > alignment_in_bits = MAX_SUPPORTED_STACK_ALIGNMENT;