Re: [wwwdocs, patch] gcc-12/changes.html: Update OpenMP status

2021-11-10 Thread Tobias Burnus
Hi Gerald, thanks for the comments, I have incorporated them all. On 11.11.21 00:12, Gerald Pfeifer wrote: + variable, the reproducible and unconstrained + modifiers to the order clause, and, for C/C++ only, the + align- and allocate-modifiers to the allocate clause and

Re: [PATCH] Allow loop header copying when first iteration condition is known.

2021-11-10 Thread Richard Biener via Gcc-patches
On Wed, Nov 10, 2021 at 9:42 PM Jeff Law wrote: > > > > On 11/10/2021 11:20 AM, Aldy Hernandez via Gcc-patches wrote: > > As discussed in the PR, the loop header copying pass avoids doing so > > when optimizing for size. However, sometimes we can determine the > > loop entry conditional

Re: Silence additional warning in gfortran.dg/do_subscript_3.f90

2021-11-10 Thread Richard Biener via Gcc-patches
On Wed, Nov 10, 2021 at 4:00 PM Jan Hubicka via Gcc-patches wrote: > > Hi, > the testcase tests for out of bound accesses warnings and with ipa-modref > improvements > it now triggers a new warning: > > /aux/hubicka/trunk-git/gcc/testsuite/gfortran.dg/do_subscript_3.f90:11:9: > Warning: (1) >

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-11-10 Thread Richard Biener via Gcc-patches
On Wed, Nov 10, 2021 at 2:29 PM Martin Liška wrote: > > On 11/10/21 09:59, Richard Biener wrote: > > On Tue, Nov 9, 2021 at 5:44 PM Martin Liška wrote: > >> > >> On 11/9/21 14:37, Richard Biener wrote: > >>> On Mon, Nov 8, 2021 at 8:45 PM Andrew MacLeod wrote: > > On 11/8/21 10:05 AM,

Re: [PATCH] gimple-fold: Transform stp*cpy_chk to strcpy

2021-11-10 Thread Siddhesh Poyarekar
On 11/11/21 02:06, Jeff Law wrote: On 11/10/2021 10:47 AM, Siddhesh Poyarekar wrote: Use the ignore flag to transform BUILT_IN_STPCPY_CHK to BUILT_IN_STRCPY when set.  This transformation will happen in a subsequent fold anyway but do it right away and save the additional effort.

Re: [PATCH] fixincludes: don't assume getcwd() can handle NULL argument

2021-11-10 Thread Bruce Korb via Gcc-patches
On 11/10/21 4:22 AM, Xi Ruoyao wrote: Isn't this warning actually a glibc bug ? However we can't assume the libc we are using is Glibc. Even if the libc supports getcwd() with NULL argument, we are still leaking memory. You could also free

[committed] RISC-V: Fix wrong zifencei handling in riscv_subset_list::to_string

2021-11-10 Thread Kito Cheng
This issue cause zifencei never correctly appended on the ISA string. gcc/ChangeLog * common/config/riscv/riscv-common.c (riscv_subset_list::to_string): Fix wrong marco checking. --- gcc/common/config/riscv/riscv-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[r12-5113 Regression] FAIL: 18_support/nested_exception/rethrow_if_nested.cc (test for excess errors) on Linux/x86_64

2021-11-10 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, d70ef65692fced7ab72e0aceeff7407e5a34d96d is the first bad commit commit d70ef65692fced7ab72e0aceeff7407e5a34d96d Author: Jan Hubicka Date: Wed Nov 10 13:08:41 2021 +0100 Make EAF flags more regular (and expressive) caused FAIL: 20_util/variant/run.cc (test for excess

[r12-5126 Regression] FAIL: gfortran.dg/do_subscript_3.f90 -O (test for excess errors) on Linux/x86_64

2021-11-10 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, 992644c3511acd58248db784f1ac43e2f053ebcc is the first bad commit commit 992644c3511acd58248db784f1ac43e2f053ebcc Author: Jan Hubicka Date: Wed Nov 10 16:00:40 2021 +0100 Extend modref by side-effect analysis caused FAIL: gfortran.dg/do_subscript_3.f90 -O (test for

Re: [wwwdocs, patch] gcc-12/changes.html: Update OpenMP status

2021-11-10 Thread Gerald Pfeifer
On Wed, 10 Nov 2021, Tobias Burnus wrote: > Cumulative update of the OpenMP 5.x changes in GCC 12. Wow - quite a bit! > For the last bullet: the implementation-status documentation is new – > but even if it were not, linking to it makes sense. I kept adding and > removing a 'full' after the

Re: [PATCH] testsuite/102690 - XFAIL g++.dg/warn/Warray-bounds-16.C

2021-11-10 Thread Martin Sebor via Gcc-patches
On 11/10/21 3:09 AM, Richard Biener via Gcc-patches wrote: This XFAILs the bogus diagnostic test and rectifies the expectation on the optimization. Tested on x86_64-unknown-linux-gnu, pushed. 2021-11-10 Richard Biener PR testsuite/102690 * g++.dg/warn/Warray-bounds-16.C:

[PATCH] [COMMITTED] aarch64: [PR103170] Fix aarch64_simd_dup

2021-11-10 Thread apinski--- via Gcc-patches
From: Andrew Pinski The problem here is aarch64_simd_dup use the vw iterator rather than vwcore iterator. This causes problems for the V4SF and V2DF modes. I changed both of aarch64_simd_dup patterns to be consistent. Committed as obvious after a bootstrap/test on aarch64-linux-gnu.

[PATCH] libgcc: fix backtrace fallback on PowerPC Big-endian. [PR103004]

2021-11-10 Thread Raphael Moreira Zinsly via Gcc-patches
At the end of the backtrace stream _Unwind_Find_FDE() may not be able to find the frame unwind info and will later call the backtrace fallback instead of finishing. This occurs when using an old libc on ppc64 due to dl_iterate_phdr() not being able to set the fde in the last trace. When this

Re: [Patch] libcpp: Fix _Pragma in #__VA_ARGS__ [PR103165]

2021-11-10 Thread Joseph Myers
On Wed, 10 Nov 2021, Tobias Burnus wrote: > Disclaimer: While this patch does a step into the right direction, > it probably does help with any of the other _Pragma issues. Neither > with 'gcc -E' when the pragma wasn't registered (still expanded too > early) nor with the 'GCC diagnostic' issues

Re: [PATCH] rs6000: Fix a handful of 32-bit built-in function problems in the new support

2021-11-10 Thread Bill Schmidt via Gcc-patches
On 11/10/21 2:33 AM, Segher Boessenkool wrote: > On Tue, Nov 09, 2021 at 03:46:54PM -0600, Bill Schmidt wrote: >> Hi! Some time ago I realized I hadn't tested the new builtin support >> against 32-bit >> big-endian in quite a while. When I did, I found a handful of errors that >> needed >>

Re: [PATCH] implement -Winfinite-recursion [PR88232]

2021-11-10 Thread Marek Polacek via Gcc-patches
On Tue, Nov 09, 2021 at 09:28:43PM -0700, Martin Sebor via Gcc-patches wrote: > The attached patch adds support to the middle end for detecting > infinitely recursive calls. The warning is controlled by the new > -Winfinite-recursion option. The option name is the same as > Clang's. > > I

Re: [PATCH] Allow loop header copying when first iteration condition is known.

2021-11-10 Thread Jeff Law via Gcc-patches
On 11/10/2021 11:20 AM, Aldy Hernandez via Gcc-patches wrote: As discussed in the PR, the loop header copying pass avoids doing so when optimizing for size. However, sometimes we can determine the loop entry conditional statically for the first iteration of the loop. This patch uses the

Re: [PATCH] gimple-fold: Transform stp*cpy_chk to strcpy

2021-11-10 Thread Jeff Law via Gcc-patches
On 11/10/2021 10:47 AM, Siddhesh Poyarekar wrote: Use the ignore flag to transform BUILT_IN_STPCPY_CHK to BUILT_IN_STRCPY when set. This transformation will happen in a subsequent fold anyway but do it right away and save the additional effort. gcc/ChangeLog: * gimple-fold.c

Re: [PATCH] pch: Add support for PCH for relocatable executables

2021-11-10 Thread Iain Sandoe
Hi Folks, > On 10 Nov 2021, at 08:14, Iain Sandoe wrote: >> On 9 Nov 2021, at 12:18, Jakub Jelinek via Gcc-patches >> wrote: >> >> On Tue, Nov 09, 2021 at 11:40:08AM +, Iain Sandoe wrote: >>> There were two issues, of which one remains and probably affects all >>> targets. >>> 2. This

[r12-5113 Regression] FAIL: 18_support/nested_exception/rethrow_if_nested.cc (test for excess errors) on Linux/x86_64

2021-11-10 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, d70ef65692fced7ab72e0aceeff7407e5a34d96d is the first bad commit commit d70ef65692fced7ab72e0aceeff7407e5a34d96d Author: Jan Hubicka Date: Wed Nov 10 13:08:41 2021 +0100 Make EAF flags more regular (and expressive) caused FAIL:

[Patch] libcpp: Fix _Pragma in #__VA_ARGS__ [PR103165]

2021-11-10 Thread Tobias Burnus
This patch fixes a pseudo regression of my previous _Pragma patch. The issue was that a tokenized '_Pragma' (-> CPP_PRAGMA) could end up as to-be quoted argument ('#__VA_ARG__') and that wasn't never handled and gave an ICE for a GCC after my previous patch and before this patch. The expected

Re: [PATCH][committed]middle-end: Fix signbit tests when ran on ISA with support for masks.

2021-11-10 Thread Sandra Loosemore
On 11/10/21 11:53 AM, Tamar Christina wrote: FAIL: gcc.dg/signbit-2.c scan-tree-dump-times optimized "[file://\\s+]\\s+>\\s+{ 0, 0, 0, 0 }" 1 That's the old test which this patch has changed. Does it still fail with the new patch? My test results are indeed from a couple days ago. But, I

Re: [PATCH] PR fortran/103137 & 103138 - ICEs during simplification after r12-4967-gbcf3728abe848888 (was: [PATCH] PR fortran/103217 & 103218 ...)

2021-11-10 Thread Harald Anlauf via Gcc-patches
Hi Thomas, > > I'd like to commit the attached patch as obvious within the next 24 hours > > unless anybody objects, or earlier if there is positive feedback. > > OK with a ChangeLog entry and the correct PR numbers (I believe > they are 103137 and 103138) :-) I think I had really fat fingers

[PATCH] Add a testcase for PR tree-optimization/102892

2021-11-10 Thread H.J. Lu via Gcc-patches
PR tree-optimization/102892 is fixed by commit 4b3a325f07acebf47e82de227ce1d5ba62f5bcae Author: Aldy Hernandez Date: Thu Oct 28 15:35:21 2021 +0200 Remove VRP threader passes in exchange for better threading pre-VRP. * gcc.dg/pr102892-1.c: New file. * gcc.dg/pr102892-2.c:

Re: [PATCH][committed]middle-end: Fix signbit tests when ran on ISA with support for masks.

2021-11-10 Thread Tamar Christina via Gcc-patches
FAIL: gcc.dg/signbit-2.c scan-tree-dump-times optimized "[file://\\s+]\\s+>\\s+{ 0, 0, 0, 0 }" 1 That's the old test which this patch has changed. Does it still fail with the new patch? From: Sandra Loosemore Sent: Wednesday, November 10, 2021 6:37 PM To: Tamar

Re: [PATCH][committed]middle-end: Fix signbit tests when ran on ISA with support for masks.

2021-11-10 Thread Sandra Loosemore
On 11/10/21 4:54 AM, Tamar Christina via Gcc-patches wrote: Hi All, These test don't work on vector ISAs where the truth type don't match the vector mode of the operation. However I still want the tests to run on these architectures but just turn off the ISA modes that enable masks. This thus

[PATCH] Allow loop header copying when first iteration condition is known.

2021-11-10 Thread Aldy Hernandez via Gcc-patches
As discussed in the PR, the loop header copying pass avoids doing so when optimizing for size. However, sometimes we can determine the loop entry conditional statically for the first iteration of the loop. This patch uses the path solver to determine the outgoing edge out of

Re: Values of WIDE_INT_MAX_ELTS in gcc11 and gcc12 are different

2021-11-10 Thread Qing Zhao via Gcc-patches
Pushed the patch as: https://gcc.gnu.org/pipermail/gcc-cvs/2021-November/356543.html Qing > On Nov 10, 2021, at 2:37 AM, Richard Biener > wrote: > > On Tue, Nov 9, 2021 at 6:48 PM Qing Zhao wrote: >> >> So, based on the discussion so far, is the following patch good to go? > > OK. > >

[PATCH] gimple-fold: Transform stp*cpy_chk to strcpy

2021-11-10 Thread Siddhesh Poyarekar
Use the ignore flag to transform BUILT_IN_STPCPY_CHK to BUILT_IN_STRCPY when set. This transformation will happen in a subsequent fold anyway but do it right away and save the additional effort. gcc/ChangeLog: * gimple-fold.c (gimple_fold_builtin_stxcpy_chk,

Re: [PATCH] vect: Remove vec_outside/inside_cost fields

2021-11-10 Thread Richard Sandiford via Gcc-patches
Martin Liška writes: > On 11/8/21 11:43, Richard Sandiford via Gcc-patches wrote: >> |Tested on aarch64-linux-gnu and x86_64-linux-gnu. OK to install?| > > I think the patch causes the following on x86_64-linux-gnu: > FAIL: gfortran.dg/inline_matmul_17.f90 -O scan-tree-dump-times optimized >

Re: [PATCH] c++: use auto_vec in cp_parser_template_argument_list

2021-11-10 Thread Patrick Palka via Gcc-patches
On Wed, Nov 10, 2021 at 12:16 AM Jason Merrill wrote: > > On 11/9/21 13:42, Patrick Palka wrote: > > On Tue, 9 Nov 2021, Jason Merrill wrote: > > > >> On 11/9/21 11:02, Patrick Palka wrote: > >>> Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? > >> > >> OK, though I wonder about

Re: [PATCH] arm: Initialize vector costing fields

2021-11-10 Thread Christophe Lyon via Gcc-patches
On Wed, Nov 10, 2021 at 4:34 PM Kyrylo Tkachov via Gcc-patches < gcc-patches@gcc.gnu.org> wrote: > Hi Christophe > > > -Original Message- > > From: Gcc-patches > bounces+kyrylo.tkachov=arm@gcc.gnu.org> On Behalf Of Christophe > > Lyon via Gcc-patches > > Sent: Monday, November 8,

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

2021-11-10 Thread Qing Zhao via Gcc-patches
> On Nov 9, 2021, at 4:02 PM, Ard Biesheuvel wrote: > > On Tue, 9 Nov 2021 at 21:45, Qing Zhao wrote: >> >> Hi, Ard, >> >> Sorry for the late reply (since I don’t have the right to approve a patch, I >> has been waiting for any arm port maintainer to review this patch). >> The following is

[PATCH] c++: template-id ADL and partial instantiation [PR99911]

2021-11-10 Thread Patrick Palka via Gcc-patches
Here when partially instantiating the call get(T{}) with T=N::A (for which earlier unqualified name lookup for 'get' found nothing) the arguments after substitution are no longer dependent but the callee still is, so perform_koenig_lookup postpones ADL. But then we go on to diagnose the

Re: [PATCH] vect: Remove vec_outside/inside_cost fields

2021-11-10 Thread Martin Liška
On 11/8/21 11:43, Richard Sandiford via Gcc-patches wrote: |Tested on aarch64-linux-gnu and x86_64-linux-gnu. OK to install?| I think the patch causes the following on x86_64-linux-gnu: FAIL: gfortran.dg/inline_matmul_17.f90 -O scan-tree-dump-times optimized "matmul_r4" 2 Martin

[COMMITTED] path solver: Adjustments for use outside of the backward threader.

2021-11-10 Thread Aldy Hernandez via Gcc-patches
Here are some enhancements to make it easier for other clients to use the path solver. First, I've made the imports to the solver optional since we can calculate them ourselves. However, I've left the ability to set them, since the backward threader adds a few SSA names in addition to the

Re: [PATCH] PR middle-end/103059: reload: Also accept ASHIFT with indexed addressing

2021-11-10 Thread Maciej W. Rozycki
On Mon, 8 Nov 2021, Jeff Law wrote: > > Well, the context of this code (around and including hunk #1) is: > > > >else if (insn_extra_address_constraint > >(lookup_constraint (constraints[i]))) > > { > > address_operand_reloaded[i] > > =

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

2021-11-10 Thread Kyrylo Tkachov via Gcc-patches
Hi Ard, Thanks for working on this, comments inline. > -Original Message- > From: Gcc-patches bounces+kyrylo.tkachov=arm@gcc.gnu.org> On Behalf Of Ard > Biesheuvel via Gcc-patches > Sent: Thursday, October 28, 2021 12:27 PM > To: linux-harden...@vger.kernel.org > Cc:

[COMMITTED] Grow sbr_vector in ranger's on-entry cache as needed.

2021-11-10 Thread Aldy Hernandez via Gcc-patches
From: Andrew MacLeod The on-entry cache does not expect the number of BBs to change. This could happen in various scenarios, recently in the suggestion to use ranger with loop unswitching and also with a work in progress to use the path solver in the loopch pass. This patch fixes both. This

RE: [PATCH] arm: Initialize vector costing fields

2021-11-10 Thread Kyrylo Tkachov via Gcc-patches
Hi Christophe > -Original Message- > From: Gcc-patches bounces+kyrylo.tkachov=arm@gcc.gnu.org> On Behalf Of Christophe > Lyon via Gcc-patches > Sent: Monday, November 8, 2021 6:13 PM > To: gcc-patches@gcc.gnu.org > Subject: [PATCH] arm: Initialize vector costing fields > > The movi,

Silence additional warning in gfortran.dg/do_subscript_3.f90

2021-11-10 Thread Jan Hubicka via Gcc-patches
Hi, the testcase tests for out of bound accesses warnings and with ipa-modref improvements it now triggers a new warning: /aux/hubicka/trunk-git/gcc/testsuite/gfortran.dg/do_subscript_3.f90:11:9: Warning: (1) /aux/hubicka/trunk-git/gcc/testsuite/gfortran.dg/do_subscript_3.f90:10:47: Warning:

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

2021-11-10 Thread Segher Boessenkool
On Tue, Nov 09, 2021 at 04:03:55PM -0300, Lucas A. M. Magalhaes wrote: > Quoting Segher Boessenkool (2021-11-09 11:19:58) > > On Tue, Nov 09, 2021 at 10:39:46AM -0300, Lucas A. M. Magalhaes wrote: > > > Ping. > > > > I did not get the original, and neither did the archives? > > > Strange, it's

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

2021-11-10 Thread Segher Boessenkool
On Wed, Nov 10, 2021 at 11:21:26AM -0300, Lucas A. M. Magalhaes wrote: > 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

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

2021-11-10 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: [PATCH][GCC] arm: enable cortex-a710 CPU

2021-11-10 Thread Przemyslaw Wirkus via Gcc-patches
> > Hi, > > > > This patch is adding support for Cortex-A710 CPU [0]. > > > >   [0] https://www.arm.com/products/silicon-ip-cpu/cortex-a/cortex-a710 > > > > OK for master? > Ok. > Thanks, > Kyrill commit 9701f153f6dfcc365ac0d96cdcf7df69a2de81dc > > > > gcc/ChangeLog: > > > >  *

Re: [Patch 1/8, Arm, AArch64, GCC] Refactor mbranch-protection option parsing and make it common to AArch32 and AArch64 backends. [Was RE: [Patch 2/7, Arm, GCC] Add option -mbranch-protection.]

2021-11-10 Thread Andrea Corallo via Gcc-patches
Tejas Belagod via Gcc-patches writes: [...] > This change refactors all the mbranch-protection option parsing code and types > to make it common to both AArch32 and AArch64 backends. This change also > pulls > in some supporting types from AArch64 to make it common > (aarch_parse_opt_result).

Re: [PATCH]Arm Update missing entries of cost tables

2021-11-10 Thread Christophe Lyon via Gcc-patches
On Wed, Nov 10, 2021 at 1:54 PM Tamar Christina via Gcc-patches < gcc-patches@gcc.gnu.org> wrote: > Hi All, > > My previous patch missed these tuning structures in arm.c as they > are not where the rest of the structure are located. > > This applies the same default values to silence

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-11-10 Thread Martin Liška
On 11/10/21 09:59, Richard Biener wrote: On Tue, Nov 9, 2021 at 5:44 PM Martin Liška wrote: On 11/9/21 14:37, Richard Biener wrote: On Mon, Nov 8, 2021 at 8:45 PM Andrew MacLeod wrote: On 11/8/21 10:05 AM, Martin Liška wrote: On 9/28/21 22:39, Andrew MacLeod wrote: In Theory, modifying

[committed][AArch64] Fix bootstrap failure due to missing ATTRIBUTE_UNUSED,andsim01,Wed 10-Nov-21 12:58 PM,View with a light background,Like,Reply,Reply all,Forward

2021-11-10 Thread Andre Vieira (lists) via Gcc-patches
Hi, Committed this as obvious. My earlier patch removed the need for the GSI to be used. gcc/ChangeLog:     * config/aarch64/aarch64-builtins.c     (aarch64_general_gimple_fold_builtin): Mark argument as unused. diff --git a/gcc/config/aarch64/aarch64-builtins.c

Re: [PATCH 4/4] Mark IFN_ADD/MUL_OVERFLOW as commutative

2021-11-10 Thread Jakub Jelinek via Gcc-patches
On Wed, Nov 10, 2021 at 12:50:09PM +, Richard Sandiford via Gcc-patches wrote: > gcc/ > * internal-fn.c (first_commutative_operand): Handle IFN_ADD_OVERFLOW > and IFN_MUL_OVERFLOW. > > gcc/testsuite/ > * gcc.dg/add-mul-overflow-1.c: New test. Ok. Jakub

Re: [PATCH 3/4] Mark IFN_UBSAN_CHECK_ADD/MUL as commutative

2021-11-10 Thread Jakub Jelinek via Gcc-patches
On Wed, Nov 10, 2021 at 12:49:36PM +, Richard Sandiford via Gcc-patches wrote: > * internal-fn.c (commutative_binary_fn_p): Handle IFN_UBSAN_CHECK_ADD > and IFN_UBSAN_CHECK_MUL. > > gcc/testsuite/ > * gcc.dg/ubsan/commutative-1.c: New test. Ok. Jakub

[PATCH]Arm Update missing entries of cost tables

2021-11-10 Thread Tamar Christina via Gcc-patches
Hi All, My previous patch missed these tuning structures in arm.c as they are not where the rest of the structure are located. This applies the same default values to silence initialization warnings. Bootstrapped Regtested on arm-none-linux-gnueabihf and no issues. Ok for master? Thanks,

[PATCH 4/4] Mark IFN_ADD/MUL_OVERFLOW as commutative

2021-11-10 Thread Richard Sandiford via Gcc-patches
Mark IFN_ADD/MUL_OVERFLOW as commutative. Tested on aarch64-linux-gnu and x86_64-linux-gnu. OK to install? Richard gcc/ * internal-fn.c (first_commutative_operand): Handle IFN_ADD_OVERFLOW and IFN_MUL_OVERFLOW. gcc/testsuite/ * gcc.dg/add-mul-overflow-1.c: New test.

[PATCH 3/4] Mark IFN_UBSAN_CHECK_ADD/MUL as commutative

2021-11-10 Thread Richard Sandiford via Gcc-patches
Mark IFN_UBSAN_CHECK_ADD/MUL as commutative. Tested on aarch64-linux-gnu and x86_64-linux-gnu. OK to install? Richard gcc/ * internal-fn.c (commutative_binary_fn_p): Handle IFN_UBSAN_CHECK_ADD and IFN_UBSAN_CHECK_MUL. gcc/testsuite/ * gcc.dg/ubsan/commutative-1.c: New

[PATCH 2/4] Mark IFN_COMPLEX_MUL as commutative

2021-11-10 Thread Richard Sandiford via Gcc-patches
Mark IFN_COMPLEX_MUL as commutative. Tested on aarch64-linux-gnu and x86_64-linux-gnu. OK to install? Richard gcc/ * internal-fn.c (commutative_binary_fn_p): Handle IFN_COMPLEX_MUL. gcc/testsuite/ * gcc.target/aarch64/sve/complex_mul_1.c: New test. --- gcc/internal-fn.c

[PATCH 1/4] Canonicalize argument order for commutative functions

2021-11-10 Thread Richard Sandiford via Gcc-patches
This patch uses information about internal functions to canonicalize the argument order of calls. Tested on aarch64-linux-gnu and x86_64-linux-gnu. OK to install? Richard gcc/ * gimple-fold.c: Include internal-fn.h. (fold_stmt_1): If a function maps to an internal one, use

[PATCH 5/5] vect: Add support for fmax and fmin reductions

2021-11-10 Thread Richard Sandiford via Gcc-patches
This patch adds support for reductions involving calls to fmax*() and fmin*(), without the -ffast-math flags that allow them to be converted to MAX_EXPR and MIN_EXPR. Tested on aarch64-linux-gnu and x86_64-linux-gnu. OK to install? Richard gcc/ * doc/md.texi (reduc_fmin_scal_@var{m}):

[PATCH 4/5] vect: Make reduction code handle calls

2021-11-10 Thread Richard Sandiford via Gcc-patches
This patch extends the reduction code to handle calls. So far it's a structural change only; a later patch adds support for specific function reductions. Most of the patch consists of using code_helper and gimple_match_op to describe the reduction operations. The other main change is that

[PATCH 3/5] gimple-match: Make code_helper conversions explicit

2021-11-10 Thread Richard Sandiford via Gcc-patches
code_helper provides conversions to tree_code and combined_fn. Now that the codebase is C++11, we can mark these conversions as explicit. This avoids accidentally using code_helpers with functions that take tree_codes, which would previously entail a hidden unchecked conversion. Tested on

[PATCH 2/5] gimple-match: Add a gimple_extract_op function

2021-11-10 Thread Richard Sandiford via Gcc-patches
code_helper and gimple_match_op seem like generally useful ways of summing up a gimple_assign or gimple_call (or gimple_cond). This patch adds a gimple_extract_op function that can be used for that. Tested on aarch64-linux-gnu and x86_64-linux-gnu. OK to install? Richard gcc/ *

[PATCH 1/5] Add IFN_COND_FMIN/FMAX functions

2021-11-10 Thread Richard Sandiford via Gcc-patches
This patch adds conditional forms of FMAX and FMIN, following the pattern for existing conditional binary functions. Tested on aarch64-linux-gnu and x86_64-linux-gnu. OK to install? Richard gcc/ * doc/md.texi (cond_fmin@var{mode}, cond_fmax@var{mode}): Document. * optabs.def

Use modref summary to DSE calls to non-pure functions

2021-11-10 Thread Jan Hubicka via Gcc-patches
Hi, this patch implements DSE using modref summaries: if function has no side effects besides storing to memory pointed to by its argument and if we can prove those stores to be dead, we can optimize out. So we handle for example: volatile int *ptr; struct a { int a,b,c; } a;

Re: [PATCH] lto-wrapper: fix memory corruption.

2021-11-10 Thread Martin Liška
On 11/10/21 12:31, Richard Biener wrote: Is this also latent on branches? No, I made the refactoring early in this stage 1 in r12-741-g227a2ecf663d69972b851f51f1934d18927b62cd Martin

[committed] aarch64: Tweak FMAX/FMIN iterators

2021-11-10 Thread Richard Sandiford via Gcc-patches
There was some duplication between the maxmin_uns (uns for unspec rather than unsigned) int attribute and the optab int attribute. The difficulty for FMAXNM and FMINNM is that the instructions really correspond to two things: the smax/smin optabs for floats (used only for fast-math-like flags) and

RE: [PATCH]AArch64 Remove shuffle pattern for rounding variant.

2021-11-10 Thread Kyrylo Tkachov via Gcc-patches
> -Original Message- > From: Tamar Christina > Sent: Wednesday, November 10, 2021 12:09 PM > To: gcc-patches@gcc.gnu.org > Cc: nd ; Richard Earnshaw ; > Marcus Shawcroft ; Kyrylo Tkachov > ; Richard Sandiford > > Subject: [PATCH]AArch64 Remove shuffle pattern for rounding variant. > >

Re: [PATCH] x86: Update -mtune=alderlake

2021-11-10 Thread Uros Bizjak via Gcc-patches
On Wed, Nov 10, 2021 at 10:09 AM Cui,Lili wrote: > > Hi Uros, > > This patch is to update mtune for alderlake. > > Bootstrap is ok, and no regressions for i386/x86-64 testsuite. > > OK for master? > > Update mtune for alderlake, Alder Lake Intel Hybrid Technology will not > support > Intel®

Re: [PATCH] fixincludes: don't assume getcwd() can handle NULL argument

2021-11-10 Thread Xi Ruoyao via Gcc-patches
On Wed, 2021-11-10 at 00:02 +, Joseph Myers wrote: > On Tue, 9 Nov 2021, Xi Ruoyao via Gcc-patches wrote: > > > POSIX says: > > > >     On some implementations, if buf is a null pointer, getcwd() may > > obtain > >     size bytes of memory using malloc(). In this case, the pointer > >

Re: [PATCH v2] gimple-fold: Smarter optimization of _chk variants

2021-11-10 Thread Siddhesh Poyarekar
On 11/10/21 16:15, Siddhesh Poyarekar wrote: Instead of comparing LEN and SIZE only if they are constants, use their ranges to decide if LEN will always be lower than or same as SIZE. This change ends up putting the stringop-overflow warning line number against the strcpy implementation, so

[PATCH]AArch64 Remove shuffle pattern for rounding variant.

2021-11-10 Thread Tamar Christina via Gcc-patches
Hi All, This removed the patterns to optimize the rounding shift and narrow. The optimization is valid only for the truncating rounding shift and narrow, for the rounding shift and narrow we need a different pattern that I will submit separately. This wasn't noticed before as the benchmarks did

[committed] libstdc++: Fix test for libstdc++ not including [PR100117]

2021-11-10 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. The headers for the C library are not under our control, so we can't prevent them from including . Change the PR 49745 test to only include the C++ library headers, not the ones. To ensure isn't included automatically we need to use no_pch to

[committed] libstdc++: Disable gthreads weak symbols for glibc 2.34 [PR103133]

2021-11-10 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, glibc 2.17 and 2.34, pushed to trunk. We also want something like this for musl-based targets. And Florian has suggested we should also disable the weak symbols for libstdc++.a, but those need more work. ... Since Glibc 2.34 all pthreads symbols are defined directly in

[PATCH] Apply TLC to control dependence compute

2021-11-10 Thread Richard Biener via Gcc-patches
This makes the control dependence compute avoid a find_edge and optimizes allocation by embedding the bitmap head into the vector of control dependences instead of allocating all of them. It also uses a local bitmap obstack. The bitmap changes make it necessary to shuffle some includes.

[PATCH][committed][testsuite]: change vect_long to vect_long_long in complex tests.

2021-11-10 Thread Tamar Christina via Gcc-patches
Hi All, These tests are still failing on SPARC and it looks like this is because I need to use vect_long_long instead of vect_long. Committed under the obvious rule. Thanks, Tamar gcc/testsuite/ChangeLog: PR testsuite/103042 *

Re: [PATH][_GLIBCXX_DEBUG] Fix unordered container merge

2021-11-10 Thread Jonathan Wakely via Gcc-patches
On Tue, 9 Nov 2021 at 16:25, Jonathan Wakely wrote: > > > On Mon, 8 Nov 2021 at 21:36, François Dumont wrote: > >> Yet another version this time with only 1 guard implementation. The >> predicate to invalidate the safe iterators has been externalized. >> >> Ok to commit ? >> > > I like this

Extend modref by side-effect analysis

2021-11-10 Thread Jan Hubicka via Gcc-patches
Hi, this patch makes modref to also collect info whether function has side effects. This allows pure/const function detection and also handling functions which do store some memory in similar way as we handle pure/consts now. The code is symmetric to what ipa-pure-const does. Modref is actually

[PATCH][committed]middle-end: Fix signbit tests when ran on ISA with support for masks.

2021-11-10 Thread Tamar Christina via Gcc-patches
Hi All, These test don't work on vector ISAs where the truth type don't match the vector mode of the operation. However I still want the tests to run on these architectures but just turn off the ISA modes that enable masks. This thus turns off SVE is it's on and turns off AVX512 if it's on.

[PATCH][committed]middle-end vect: remove unused variable in complex numbers detection code.

2021-11-10 Thread Tamar Christina via Gcc-patches
Hi All, This removed an unused variable that clang seems to catch when compiling GCC with Clang. Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. Committed under the obvious rule. Thanks, Tamar gcc/ChangeLog: * tree-vect-slp-patterns.c (complex_mul_pattern::matches):

Re: [PATCH] dwarf2out: Fix up field_byte_offset [PR101378]

2021-11-10 Thread Jakub Jelinek via Gcc-patches
On Wed, Nov 10, 2021 at 12:36:04PM +0100, Richard Biener wrote: > > I'm afraid I forgot the DECL_FIELD_OFFSET vs. DECL_FIELD_BIT_OFFSET stuff > > enough that I'm not sure what is the right fix for that case, maybe it would > > work if we dropped the && TREE_CODE (DECL_FIELD_OFFSET (decl)) == > >

Re: [PATCH] dwarf2out: Fix up field_byte_offset [PR101378]

2021-11-10 Thread Richard Biener via Gcc-patches
On Wed, 10 Nov 2021, Jakub Jelinek wrote: > On Wed, Nov 10, 2021 at 10:52:42AM +0100, Richard Biener wrote: > > > The only thing I'm unsure about is whether the test should be > > > DECL_BIT_FIELD or DECL_BIT_FIELD_TYPE should be tested. I thought it > > > doesn't matter, but it seems

Re: [PATCH] lto-wrapper: fix memory corruption.

2021-11-10 Thread Richard Biener via Gcc-patches
On Wed, Nov 10, 2021 at 11:47 AM Martin Liška wrote: > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Ready to be installed? OK. Is this also latent on branches? > The first argument of merge_and_complain is actually vector where > we merge options and it should

[PATCH][GCC] aarch64: Add new vector mode V8DI

2021-11-10 Thread Przemyslaw Wirkus via Gcc-patches
Hi, This patch is adding new V8DI mode which will be used with new Armv8.7-A LS64 extension intrinsics. Regtested on aarch64-elf and no issues. OK for master? gcc/ChangeLog: 2021-11-10 Przemyslaw Wirkus * config/aarch64/aarch64-modes.def (VECTOR_MODE): New V8DI mode. *

Re: [wwwdocs, patch] gcc-12/changes.html: Update OpenMP status

2021-11-10 Thread Jakub Jelinek via Gcc-patches
On Wed, Nov 10, 2021 at 11:33:09AM +0100, Tobias Burnus wrote: > Cumulative update of the OpenMP 5.x changes in GCC 12. > > I hope it covers all essential changes. Of course, > some other could be added like 'omp target in_reduction', > which was missing before (oversight) and possibly other >

Re: [PATCH] dwarf2out: Fix up field_byte_offset [PR101378]

2021-11-10 Thread Jakub Jelinek via Gcc-patches
On Wed, Nov 10, 2021 at 10:52:42AM +0100, Richard Biener wrote: > > The only thing I'm unsure about is whether the test should be > > DECL_BIT_FIELD or DECL_BIT_FIELD_TYPE should be tested. I thought it > > doesn't matter, but it seems stor-layout.c in some cases clears > > DECL_BIT_FIELD if

[PATCH] lto-wrapper: fix memory corruption.

2021-11-10 Thread Martin Liška
Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? The first argument of merge_and_complain is actually vector where we merge options and it should be propagated to caller properly. Fixes: ==6656== Invalid read of size 8 ==6656==at 0x408056:

[PATCH v2] gimple-fold: Smarter optimization of _chk variants

2021-11-10 Thread Siddhesh Poyarekar
Instead of comparing LEN and SIZE only if they are constants, use their ranges to decide if LEN will always be lower than or same as SIZE. This change ends up putting the stringop-overflow warning line number against the strcpy implementation, so adjust the warning check to be line number

[wwwdocs] projects/gomp/: Add OpenMP 5.2

2021-11-10 Thread Tobias Burnus
This is rather obvious – and unless there are comments, I intent to commit it as obvious later today. I think that's the only place to be updated on the webserver. Tobias - Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit

[wwwdocs, patch] gcc-12/changes.html: Update OpenMP status

2021-11-10 Thread Tobias Burnus
Cumulative update of the OpenMP 5.x changes in GCC 12. I hope it covers all essential changes. Of course, some other could be added like 'omp target in_reduction', which was missing before (oversight) and possibly other things, which I have missed. For the last bullet: the implementation-status

[PATCH] testsuite/102690 - XFAIL g++.dg/warn/Warray-bounds-16.C

2021-11-10 Thread Richard Biener via Gcc-patches
This XFAILs the bogus diagnostic test and rectifies the expectation on the optimization. Tested on x86_64-unknown-linux-gnu, pushed. 2021-11-10 Richard Biener PR testsuite/102690 * g++.dg/warn/Warray-bounds-16.C: XFAIL diagnostic part and optimization. ---

Re: [PATCH] rs6000/doc: Rename future cpu with power10

2021-11-10 Thread Segher Boessenkool
Hi! On Wed, Nov 10, 2021 at 05:39:27PM +0800, Kewen.Lin wrote: > @@ -27779,10 +27779,10 @@ Enable/disable the @var{__float128} keyword for > IEEE 128-bit floating point > and use either software emulation for IEEE 128-bit floating point or > hardware instructions. > > -The VSX instruction set

Re: [PATCH] dwarf2out: Fix up field_byte_offset [PR101378]

2021-11-10 Thread Richard Biener via Gcc-patches
On Wed, 10 Nov 2021, Jakub Jelinek wrote: > Hi! > > For PCC_BITFIELD_TYPE_MATTERS field_byte_offset has quite large code > to deal with it since many years ago (see it e.g. in GCC 3.2, although it > used to be on HOST_WIDE_INTs, then on double_ints, now on offset_ints). > But that code

Re: [PATCH v2] tree-optimization/101186 - extend FRE with "equivalence map" for condition prediction

2021-11-10 Thread Richard Biener via Gcc-patches
On Sun, Oct 24, 2021 at 9:03 PM Di Zhao OS wrote: > > Hi, > > Attached is a new version of the patch, mainly for improving performance > and simplifying the code. The patch doesn't apply anymore, can you update it please? I see the new ssa-fre-101.c test already passing without the patch.

Re: [PATCH] rs6000/doc: Rename future cpu with power10

2021-11-10 Thread Kewen.Lin via Gcc-patches
Hi Segher, on 2021/11/10 下午4:52, Segher Boessenkool wrote: > Hi! > > On Wed, Nov 10, 2021 at 01:41:25PM +0800, Kewen.Lin wrote: >> Commmit 5d9d0c94588 renamed future to power10 and ace60939fd2 >> updated the documentation for "future" renaming. This patch >> is to rename the remaining "future

[PATCH] gimple-fold: Smarter optimization of _chk variants

2021-11-10 Thread Siddhesh Poyarekar
Instead of comparing LEN and SIZE only if they are constants, use their ranges to decide if LEN will always be lower than or same as SIZE. This change ends up putting the stringop-overflow warning line number against the strcpy implementation, so adjust the warning check to be line number

Re: [PATH][_GLIBCXX_DEBUG] Fix unordered container merge

2021-11-10 Thread Jonathan Wakely via Gcc-patches
On Wed, 10 Nov 2021 at 05:47, François Dumont wrote: > On 09/11/21 5:25 pm, Jonathan Wakely wrote: > > > > On Mon, 8 Nov 2021 at 21:36, François Dumont wrote: > >> Yet another version this time with only 1 guard implementation. The >> predicate to invalidate the safe iterators has been

Re: [PATCH] dwarf2out: Fix up field_byte_offset [PR101378]

2021-11-10 Thread Eric Botcazou via Gcc-patches
> I think Ada has bitfields of aggregate types, so CCing Eric, though > I'd hope it doesn't have bitfields where type size is smaller than > field decl size like C++ has. Assuming your sentence is written in the right sense :-) then, no, in Ada bit- fields always have DECL_SIZE (bf) <= TYPE_SIZE

Fix modref_tree::remap_params

2021-11-10 Thread Jan Hubicka via Gcc-patches
Hi, this patch fixes wrong compare in remap_params which triggers a wrong code with my followup patch. This needs backporting to gcc11 as well which I plan to do tomorrow. Bootstrapped/regtested x86_64-linux, comitted. gcc/ChangeLog: * ipa-modref-tree.h (modref_tree::remap_params): Fix

[PATCH] dwarf2out: Fix up field_byte_offset [PR101378]

2021-11-10 Thread Jakub Jelinek via Gcc-patches
Hi! For PCC_BITFIELD_TYPE_MATTERS field_byte_offset has quite large code to deal with it since many years ago (see it e.g. in GCC 3.2, although it used to be on HOST_WIDE_INTs, then on double_ints, now on offset_ints). But that code apparently isn't able to cope with members with empty class

[PATCH] x86: Update -mtune=alderlake

2021-11-10 Thread Cui,Lili via Gcc-patches
Hi Uros, This patch is to update mtune for alderlake. Bootstrap is ok, and no regressions for i386/x86-64 testsuite. OK for master? Update mtune for alderlake, Alder Lake Intel Hybrid Technology will not support Intel® AVX-512. ISA features such as Intel® AVX, AVX-VNNI, Intel® AVX2, and

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-11-10 Thread Richard Biener via Gcc-patches
On Tue, Nov 9, 2021 at 5:44 PM Martin Liška wrote: > > On 11/9/21 14:37, Richard Biener wrote: > > On Mon, Nov 8, 2021 at 8:45 PM Andrew MacLeod wrote: > >> > >> On 11/8/21 10:05 AM, Martin Liška wrote: > >>> On 9/28/21 22:39, Andrew MacLeod wrote: > In Theory, modifying the IL should be

[Ada] Minor cleanup in translation of calls to subprograms

2021-11-10 Thread Pierre-Marie de Rodat via Gcc-patches
This gets rid of the DECL_STUBBED_P macro and adjusts Call_to_gnu. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * gcc-interface/ada-tree.h (DECL_STUBBED_P): Delete. * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set it. * gcc-interface/trans.c

  1   2   >