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

2021-11-11 Thread Richard Biener via Gcc-patches
On Wed, 10 Nov 2021, Martin Sebor wrote: > 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 > > > >

[PATCH] dwarf2out, v2: Fix up field_byte_offset [PR101378]

2021-11-11 Thread Jakub Jelinek via Gcc-patches
Hi! Bootstrapped/regtested now successfully on x86_64-linux and i686-linux, verified the struct S { int e; int a : 1, b : 7, c : 8, d : 16; } s; struct T { int a : 1, b : 7; long long c : 8; int d : 16; } t; int main () { s.c = 0x55; s.d = 0x; t.c = 0x55; t.d = 0x; s.e++; } test

[PATCH] Remove find_pdom and find_dom

2021-11-11 Thread Richard Biener via Gcc-patches
This removes now useless wrappers around get_immediate_dominator. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2021-11-11 Richard Biener * cfganal.c (find_pdom): Remove. (control_dependences::find_control_dependence): Remove special-casing of entry bloc

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

2021-11-11 Thread Martin Liška
On 11/10/21 18:18, Richard Sandiford wrote: 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

[PATCH v3] c-family: Add __builtin_assoc_barrier

2021-11-11 Thread Matthias Kretz
On Wednesday, 8 September 2021 15:49:27 CET Matthias Kretz wrote: > On Wednesday, 8 September 2021 15:44:28 CEST Jason Merrill wrote: > > On 9/8/21 5:37 AM, Matthias Kretz wrote: > > > On Tuesday, 7 September 2021 19:36:22 CEST Jason Merrill wrote: > > >>> case PAREN_EXPR: > > >>> - RETURN (fi

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

2021-11-11 Thread Richard Biener via Gcc-patches
On Thu, 11 Nov 2021, Jakub Jelinek wrote: > Hi! > > Bootstrapped/regtested now successfully on x86_64-linux and i686-linux, > verified the > struct S { int e; int a : 1, b : 7, c : 8, d : 16; } s; > struct T { int a : 1, b : 7; long long c : 8; int d : 16; } t; > > int > main () > { > s.c = 0x

[PATCH] Adjust CPP_FOR_BUILD

2021-11-11 Thread Pekka Seppänen
Hi. CPP/CPPFLAGS were changed by commit 84401ce5fb4ecab55decb472b168100e7593e01f. That commit uses CPP as a default for CPP_FOR_BUILD. Unless CPP is defined, GNU make defaults CPP as `$(CC) -E'. Given the context, this is now incorrect, since CC_FOR_BUILD should be used. Fixes PR103011.

[committed] openmp: Add support for 2 argument num_teams clause

2021-11-11 Thread Jakub Jelinek via Gcc-patches
Hi! In OpenMP 5.1, num_teams clause can accept either one expression as before, but it in that case changed meaning, rather than create <= expression teams it is now create == expression teams. Or it accepts two expressions separated by :, with the meaning that the first is low bound and second u

Re: [aarch64] PR102376 - Emit better diagnostic for arch extensions in target attr

2021-11-11 Thread Prathamesh Kulkarni via Gcc-patches
On Tue, 9 Nov 2021 at 20:27, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > > On Thu, 4 Nov 2021 at 14:19, Richard Sandiford > > wrote: > >> > >> Prathamesh Kulkarni writes: > >> > On Wed, 20 Oct 2021 at 15:05, Richard Sandiford > >> > wrote: > >> >> > >> >> Prathamesh Kulkarni wr

[PATCH] middle-end/103181 - fix operation_could_trap_p for vector division

2021-11-11 Thread Richard Biener via Gcc-patches
For integer vector division we only checked for all zero vector constants rather than checking whether any element in the constant vector is zero. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2021-11-11 Richard Biener PR middle-end/103181 * tree-eh.c (operation

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

2021-11-11 Thread Jan Hubicka via Gcc-patches
> > > > > > 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 > > > > I get that failure even with d70ef65692f (from before the patches > > I committed today). > > Sorry, you are rig

[PATCH] aarch64: Use type-qualified builtins for unsigned MLA/MLS intrinsics

2021-11-11 Thread Jonathan Wright via Gcc-patches
Hi, This patch declares type-qualified builtins and uses them for MLA/MLS Neon intrinsics that operate on unsigned types. This eliminates lots of casts in arm_neon.h. Bootstrapped and regression tested on aarch64-none-linux-gnu - no issues. Ok for master? Thanks, Jonathan --- gcc/ChangeLog:

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

2021-11-11 Thread Richard Biener via Gcc-patches
On Thu, Nov 11, 2021 at 10:45 AM Jan Hubicka via Gcc-patches wrote: > > > > > > > > > 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 > > > > > > I get that failure even with d70

[PATCH] aarch64: Use type-qualified builtins for PMUL[L] Neon intrinsics

2021-11-11 Thread Jonathan Wright via Gcc-patches
Hi, This patch declares poly type-qualified builtins and uses them for PMUL[L] Neon intrinsics. This removes the need for casts in arm_neon.h. Bootstrapped and regression tested on aarch64-none-linux-gnu - no issues. Ok for master? Thanks, Jonathan --- gcc/ChangeLog: 2021-11-08  Jonathan Wri

[PATCH] aarch64: Use type-qualified builtins for XTN[2] Neon intrinsics

2021-11-11 Thread Jonathan Wright via Gcc-patches
Hi, This patch declares unsigned type-qualified builtins and uses them for XTN[2] Neon intrinsics. This removes the need for casts in arm_neon.h. Bootstrapped and regression tested on aarch64-none-linux-gnu - no issues. Ok for master? Thanks, Jonathan --- gcc/ChangeLog: 2021-11-08  Jonathan

Re: [PATCH] aarch64: Use type-qualified builtins for unsigned MLA/MLS intrinsics

2021-11-11 Thread Richard Sandiford via Gcc-patches
Jonathan Wright writes: > Hi, > > This patch declares type-qualified builtins and uses them for MLA/MLS > Neon intrinsics that operate on unsigned types. This eliminates lots of > casts in arm_neon.h. > > Bootstrapped and regression tested on aarch64-none-linux-gnu - no > issues. > > Ok for master

Re: [PATCH] aarch64: Use type-qualified builtins for PMUL[L] Neon intrinsics

2021-11-11 Thread Richard Sandiford via Gcc-patches
Jonathan Wright writes: > Hi, > > This patch declares poly type-qualified builtins and uses them for > PMUL[L] Neon intrinsics. This removes the need for casts in arm_neon.h. > > Bootstrapped and regression tested on aarch64-none-linux-gnu - no > issues. > > Ok for master? > > Thanks, > Jonathan >

[PATCH] aarch64: Use type-qualified builtins for [R]SHRN[2] Neon intrinsics

2021-11-11 Thread Jonathan Wright via Gcc-patches
Hi, Thus patch declares unsigned type-qualified builtins and uses them for [R]SHRN[2] Neon intrinsics. This removes the need for casts in arm_neon.h. Bootstrapped and regression tested on aarch64-none-linux-gnu - no issues. Ok for master? Thanks, Jonathan --- gcc/ChangeLog: 2021-11-08  Jonat

Re: [PATCH] aarch64: Use type-qualified builtins for XTN[2] Neon intrinsics

2021-11-11 Thread Richard Sandiford via Gcc-patches
Jonathan Wright writes: > Hi, > > This patch declares unsigned type-qualified builtins and uses them for > XTN[2] Neon intrinsics. This removes the need for casts in arm_neon.h. > > Bootstrapped and regression tested on aarch64-none-linux-gnu - no > issues. > > Ok for master? > > Thanks, > Jonatha

[PATCH] aarch64: Use type-qualified builtins for UADD[LW][2] Neon intrinsics

2021-11-11 Thread Jonathan Wright via Gcc-patches
Hi, This patch declares unsigned type-qualified builtins and uses them to implement widening-add Neon intrinsics. This removes the need for many casts in arm_neon.h. Bootstrapped and regression tested on aarch64-none-linux-gnu - no issues. Ok for master? Thanks, Jonathan --- gcc/ChangeLog: 2

[PATCH] aarch64: Use type-qualified builtins for USUB[LW][2] Neon intrinsics

2021-11-11 Thread Jonathan Wright via Gcc-patches
Hi, This patch declares unsigned type-qualified builtins and uses them to implement widening-subtract Neon intrinsics. This removes the need for many casts in arm_neon.h. Bootstrapped and regression tested on aarch64-none-linux-gnu - no issues. Ok for master? Thanks, Jonathan --- gcc/ChangeLo

Re: [PATCH] aarch64: Use type-qualified builtins for [R]SHRN[2] Neon intrinsics

2021-11-11 Thread Richard Sandiford via Gcc-patches
Jonathan Wright writes: > Hi, > > Thus patch declares unsigned type-qualified builtins and uses them for > [R]SHRN[2] Neon intrinsics. This removes the need for casts in > arm_neon.h. > > Bootstrapped and regression tested on aarch64-none-linux-gnu - no > issues. > > Ok for master? > > Thanks, > J

[PATCH] aarch64: Use type-qualified builtins for U[R]HADD Neon intrinsics

2021-11-11 Thread Jonathan Wright via Gcc-patches
Hi, This patch declares unsigned type-qualified builtins and uses them to implement (rounding) halving-add Neon intrinsics. This removes the need for many casts in arm_neon.h. Bootstrapped and regression tested on aarch64-none-linux-gnu - no issues. Ok for master? Thanks, Jonathan --- gcc/Cha

[PATCH] aarch64: Use type-qualified builtins for UHSUB Neon intrinsics

2021-11-11 Thread Jonathan Wright via Gcc-patches
Hi, This patch declares unsigned type-qualified builtins and uses them to implement halving-subtract Neon intrinsics. This removes the need for many casts in arm_neon.h. Bootstrapped and regression tested on aarch64-none-linux-gnu - no issues. Ok for master? Thanks, Jonathan --- gcc/ChangeLog

[PATCH] aarch64: Use type-qualified builtins for [R]ADDHN[2] Neon intrinsics

2021-11-11 Thread Jonathan Wright via Gcc-patches
Hi, This patch declares unsigned type-qualified builtins and uses them to implement (rounding) halving-narrowing-add Neon intrinsics. This removes the need for many casts in arm_neon.h. Bootstrapped and regression tested on aarch64-none-linux-gnu - no issues. Ok for master? Thanks, Jonathan --

Re: [PATCH] aarch64: Use type-qualified builtins for USUB[LW][2] Neon intrinsics

2021-11-11 Thread Richard Sandiford via Gcc-patches
Jonathan Wright writes: > Hi, > > This patch declares unsigned type-qualified builtins and uses them to > implement widening-subtract Neon intrinsics. This removes the need > for many casts in arm_neon.h. > > Bootstrapped and regression tested on aarch64-none-linux-gnu - no > issues. > > Ok for ma

Re: [PATCH] aarch64: Use type-qualified builtins for U[R]HADD Neon intrinsics

2021-11-11 Thread Richard Sandiford via Gcc-patches
Jonathan Wright writes: > Hi, > > This patch declares unsigned type-qualified builtins and uses them to > implement (rounding) halving-add Neon intrinsics. This removes the > need for many casts in arm_neon.h. > > Bootstrapped and regression tested on aarch64-none-linux-gnu - no > issues. > > Ok f

[PATCH] aarch64: Use type-qualified builtins for [R]SUBHN[2] Neon intrinsics

2021-11-11 Thread Jonathan Wright via Gcc-patches
Hi, This patch declares unsigned type-qualified builtins and uses them to implement (rounding) halving-narrowing-subtract Neon intrinsics. This removes the need for many casts in arm_neon.h. Bootstrapped and regression tested on aarch64-none-linux-gnu - no issues. Ok for master? Thanks, Jonatha

Re: [PATCH] aarch64: Use type-qualified builtins for UHSUB Neon intrinsics

2021-11-11 Thread Richard Sandiford via Gcc-patches
Jonathan Wright writes: > Hi, > > This patch declares unsigned type-qualified builtins and uses them to > implement halving-subtract Neon intrinsics. This removes the need for > many casts in arm_neon.h. > > Bootstrapped and regression tested on aarch64-none-linux-gnu - no > issues. > > Ok for mas

[PATCH] aarch64: Use type-qualified builtins for ADDP Neon intrinsics

2021-11-11 Thread Jonathan Wright via Gcc-patches
Hi, This patch declares unsigned type-qualified builtins and uses them to implement the pairwise addition Neon intrinsics. This removes the need for many casts in arm_neon.h. Bootstrapped and regression tested on aarch64-none-linux-gnu - no issues. Ok for master? Thanks, Jonathan --- gcc/Chan

Re: [PATCH] aarch64: Use type-qualified builtins for [R]ADDHN[2] Neon intrinsics

2021-11-11 Thread Richard Sandiford via Gcc-patches
Jonathan Wright writes: > Hi, > > This patch declares unsigned type-qualified builtins and uses them to > implement (rounding) halving-narrowing-add Neon intrinsics. This > removes the need for many casts in arm_neon.h. > > Bootstrapped and regression tested on aarch64-none-linux-gnu - no > issues

Re: [PATCH 1/5] Add IFN_COND_FMIN/FMAX functions

2021-11-11 Thread Richard Biener via Gcc-patches
On Wed, Nov 10, 2021 at 1:44 PM Richard Sandiford via Gcc-patches wrote: > > 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? OK. Thanks, Richard. > Richar

[PATCH] aarch64: Use type-qualified builtins for ADDV Neon intrinsics

2021-11-11 Thread Jonathan Wright via Gcc-patches
Hi, This patch declares unsigned type-qualified builtins and uses them to implement the vector reduction Neon intrinsics. This removes the need for many casts in arm_neon.h. Regression tested and bootstrapped on aarch64-none-linux-gnu - no issues. Ok for master? Thanks, Jonathan --- gcc/Chang

Re: [PATCH] aarch64: Use type-qualified builtins for [R]SUBHN[2] Neon intrinsics

2021-11-11 Thread Richard Sandiford via Gcc-patches
Jonathan Wright writes: > Hi, > > This patch declares unsigned type-qualified builtins and uses them to > implement (rounding) halving-narrowing-subtract Neon intrinsics. This > removes the need for many casts in arm_neon.h. > > Bootstrapped and regression tested on aarch64-none-linux-gnu - no > i

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

2021-11-11 Thread Aldy Hernandez via Gcc-patches
On Thu, Nov 11, 2021 at 8:30 AM Richard Biener wrote: > > 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. Howev

[PATCH] aarch64: Use type-qualified builtins for LD1/ST1 Neon intrinsics

2021-11-11 Thread Jonathan Wright via Gcc-patches
Hi, This patch declares unsigned and polynomial type-qualified builtins and uses them to implement the LD1/ST1 Neon intrinsics. This removes the need for many casts in arm_neon.h. The new type-qualified builtins are also lowered to gimple - as the unqualified builtins are already. Regression tes

[PATCH] aarch64: Use type-qualified builtins for vcombine_* Neon intrinsics

2021-11-11 Thread Jonathan Wright via Gcc-patches
Hi, This patch declares unsigned and polynomial type-qualified builtins for vcombine_* Neon intrinsics. Using these builtins removes the need for many casts in arm_neon.h. Bootstrapped and regression tested on aarch64-none-linux-gnu - no issues. Ok for master? Thanks, Jonathan --- gcc/ChangeL

Re: [PATCH] aarch64: Use type-qualified builtins for ADDP Neon intrinsics

2021-11-11 Thread Richard Sandiford via Gcc-patches
Jonathan Wright writes: > Hi, > > This patch declares unsigned type-qualified builtins and uses them to > implement the pairwise addition Neon intrinsics. This removes the need > for many casts in arm_neon.h. > > Bootstrapped and regression tested on aarch64-none-linux-gnu - no > issues. > > Ok fo

[PATCH] aarch64: Use type-qualified builtins for vget_low/high intrinsics

2021-11-11 Thread Jonathan Wright via Gcc-patches
Hi, This patch declares unsigned and polynomial type-qualified builtins for vget_low_*/vget_high_* Neon intrinsics. Using these builtins removes the need for many casts in arm_neon.h. Bootstrapped and regression tested on aarch64-none-linux-gnu - no issues. Ok for master? Thanks, Jonathan ---

Re: [PATCH] aarch64: Use type-qualified builtins for ADDV Neon intrinsics

2021-11-11 Thread Richard Sandiford via Gcc-patches
Jonathan Wright writes: > Hi, > > This patch declares unsigned type-qualified builtins and uses them to > implement the vector reduction Neon intrinsics. This removes the need > for many casts in arm_neon.h. > > Regression tested and bootstrapped on aarch64-none-linux-gnu - no > issues. > > Ok for

Re: [PATCH] aarch64: Use type-qualified builtins for LD1/ST1 Neon intrinsics

2021-11-11 Thread Richard Sandiford via Gcc-patches
Jonathan Wright writes: > Hi, > > This patch declares unsigned and polynomial type-qualified builtins and > uses them to implement the LD1/ST1 Neon intrinsics. This removes the > need for many casts in arm_neon.h. > > The new type-qualified builtins are also lowered to gimple - as the > unqualifie

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

2021-11-11 Thread Richard Biener via Gcc-patches
On Wed, Nov 10, 2021 at 1:46 PM Richard Sandiford via Gcc-patches wrote: > > 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 aa

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

2021-11-11 Thread Richard Biener via Gcc-patches
On Wed, Nov 10, 2021 at 1:47 PM Richard Sandiford via Gcc-patches wrote: > > 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_co

Re: [PATCH] aarch64: Use type-qualified builtins for vcombine_* Neon intrinsics

2021-11-11 Thread Richard Sandiford via Gcc-patches
Jonathan Wright writes: > Hi, > > This patch declares unsigned and polynomial type-qualified builtins for > vcombine_* Neon intrinsics. Using these builtins removes the need for > many casts in arm_neon.h. > > Bootstrapped and regression tested on aarch64-none-linux-gnu - no > issues. > > Ok for m

Re: [PATCH 2/4] Mark IFN_COMPLEX_MUL as commutative

2021-11-11 Thread Richard Biener via Gcc-patches
On Wed, Nov 10, 2021 at 1:51 PM Richard Sandiford via Gcc-patches wrote: > > Mark IFN_COMPLEX_MUL as commutative. > > Tested on aarch64-linux-gnu and x86_64-linux-gnu. OK to install? OK > Richard > > > gcc/ > * internal-fn.c (commutative_binary_fn_p): Handle IFN_COMPLEX_MUL. > > gcc/tes

Re: [PATCH] aarch64: Use type-qualified builtins for vget_low/high intrinsics

2021-11-11 Thread Richard Sandiford via Gcc-patches
Jonathan Wright writes: > Hi, > > This patch declares unsigned and polynomial type-qualified builtins for > vget_low_*/vget_high_* Neon intrinsics. Using these builtins removes > the need for many casts in arm_neon.h. > > Bootstrapped and regression tested on aarch64-none-linux-gnu - no > issues.

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

2021-11-11 Thread Richard Biener via Gcc-patches
On Wed, Nov 10, 2021 at 1:50 PM Richard Sandiford via Gcc-patches wrote: > > 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? OK. Note the gimple_resimplifyN functions also ca

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

2021-11-11 Thread Richard Biener via Gcc-patches
On Thu, Nov 11, 2021 at 11:33 AM Aldy Hernandez wrote: > > On Thu, Nov 11, 2021 at 8:30 AM Richard Biener > wrote: > > > > 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 loo

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

2021-11-11 Thread Kewen.Lin via Gcc-patches
on 2021/11/10 下午6:03, Segher Boessenkool wrote: > 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

Re: Use modref summary to DSE calls to non-pure functions

2021-11-11 Thread Richard Biener via Gcc-patches
On Wed, Nov 10, 2021 at 1:43 PM Jan Hubicka via Gcc-patches wrote: > > 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 hand

[PATCH 01/15] frv: Fix non-robust split condition in define_insn_and_split

2021-11-11 Thread Kewen Lin via Gcc-patches
This patch is to fix some non-robust split conditions in some define_insn_and_splits, to make each of them applied on top of the corresponding condition for define_insn part, otherwise the splitting could perform unexpectedly. gcc/ChangeLog: * config/frv/frv.md (*abssi2_internal, *minmax_

[PATCH 00/15] Fix non-robust split condition in define_insn_and_split

2021-11-11 Thread Kewen Lin via Gcc-patches
Hi, This trivial patch series is the secondary product from the previous investigation to see how many define_insn_and_split cases where split_condition isn't applied on top of condition for define_insn part and doesn't contain it, when there were some discussions on whether we should warn for emp

[PATCH 03/15] rx: Fix non-robust split condition in define_insn_and_split

2021-11-11 Thread Kewen Lin via Gcc-patches
This patch is to fix one non-robust split condition, to make it applied on top of the corresponding condition for define_insn part, otherwise the splitting could perform unexpectedly. gcc/ChangeLog: * config/rx/rx.md (cstoresf4): Fix split condition. --- gcc/config/rx/rx.md | 2 +- 1 fil

[PATCH 02/15] m32c: Fix non-robust split condition in define_insn_and_split

2021-11-11 Thread Kewen Lin via Gcc-patches
This patch is to fix some non-robust split conditions in some define_insn_and_splits, to make each of them applied on top of the corresponding condition for define_insn part, otherwise the splitting could perform unexpectedly. gcc/ChangeLog: * config/m32c/cond.md (stzx_reversed_, movhicc_

[PATCH 04/15] s390: Fix non-robust split condition in define_insn_and_split

2021-11-11 Thread Kewen Lin via Gcc-patches
This patch is to fix some non-robust split conditions in some define_insn_and_splits, to make each of them applied on top of the corresponding condition for define_insn part, otherwise the splitting could perform unexpectedly. gcc/ChangeLog: * config/s390/s390.md (*cstorecc_z13): Fix spli

[PATCH 05/15] v850: Fix non-robust split condition in define_insn_and_split

2021-11-11 Thread Kewen Lin via Gcc-patches
This patch is to fix some non-robust split conditions in some define_insn_and_splits, to make each of them applied on top of the corresponding condition for define_insn part, otherwise the splitting could perform unexpectedly. gcc/ChangeLog: * config/v850/v850.md (cbranchsf4, cbranchdf4,

[PATCH 07/15] xtensa: Fix non-robust split condition in define_insn_and_split

2021-11-11 Thread Kewen Lin via Gcc-patches
This patch is to fix some non-robust split conditions in some define_insn_and_splits, to make each of them applied on top of the corresponding condition for define_insn part, otherwise the splitting could perform unexpectedly. gcc/ChangeLog: * config/xtensa/xtensa.md (movdi_internal, movd

[PATCH 06/15] visium: Fix non-robust split condition in define_insn_and_split

2021-11-11 Thread Kewen Lin via Gcc-patches
This patch is to fix some non-robust split conditions in some define_insn_and_splits, to make each of them applied on top of the corresponding condition for define_insn part, otherwise the splitting could perform unexpectedly. gcc/ChangeLog: * config/visium/visium.md (*add3_insn, *addsi3_

[PATCH 08/15] alpha: Fix non-robust split condition in define_insn_and_split

2021-11-11 Thread Kewen Lin via Gcc-patches
This patch is to fix some non-robust split conditions in some define_insn_and_splits, to make each of them applied on top of the corresponding condition for define_insn part, otherwise the splitting could perform unexpectedly. gcc/ChangeLog: * config/alpha/alpha.md (*movtf_internal, *movt

[PATCH 09/15] arm: Fix non-robust split condition in define_insn_and_split

2021-11-11 Thread Kewen Lin via Gcc-patches
This patch is to fix one non-robust split condition, to make it applied on top of the corresponding condition for define_insn part, otherwise the splitting could perform unexpectedly. gcc/ChangeLog: * config/arm/arm.md (*minmax_arithsi_non_canon): Fix split condition. --- gcc/config/arm/

[PATCH 10/15] bfin: Fix non-robust split condition in define_insn_and_split

2021-11-11 Thread Kewen Lin via Gcc-patches
This patch is to fix some non-robust split conditions in some define_insn_and_splits, to make each of them applied on top of the corresponding condition for define_insn part, otherwise the splitting could perform unexpectedly. gcc/ChangeLog: * config/bfin/bfin.md (movdi_insn, movdf_insn):

[PATCH 13/15] ia64: Fix non-robust split condition in define_insn_and_split

2021-11-11 Thread Kewen Lin via Gcc-patches
This patch is to fix some non-robust split conditions in some define_insn_and_splits, to make each of them applied on top of the corresponding condition for define_insn part, otherwise the splitting could perform unexpectedly. gcc/ChangeLog: * config/ia64/vect.md (*vec_extractv2sf_0_le, *

[PATCH 12/15] i386: Fix non-robust split condition in define_insn_and_split

2021-11-11 Thread Kewen Lin via Gcc-patches
This patch is to fix some non-robust split conditions in some define_insn_and_splits, to make each of them applied on top of the corresponding condition for define_insn part, otherwise the splitting could perform unexpectedly. gcc/ChangeLog: * config/i386/i386.md (*add3_doubleword, *addv4

[PATCH 14/15] mips: Fix non-robust split condition in define_insn_and_split

2021-11-11 Thread Kewen Lin via Gcc-patches
This patch is to fix some non-robust split conditions in some define_insn_and_splits, to make each of them applied on top of the corresponding condition for define_insn part, otherwise the splitting could perform unexpectedly. gcc/ChangeLog: * config/mips/mips.md (*udivmod4, udivmod4_mips

[PATCH 15/15] sh: Fix non-robust split condition in define_insn_and_split

2021-11-11 Thread Kewen Lin via Gcc-patches
This patch is to fix some non-robust split conditions in some define_insn_and_splits, to make each of them applied on top of the corresponding condition for define_insn part, otherwise the splitting could perform unexpectedly. gcc/ChangeLog: * config/sh/sh.md (call_pcrel, call_value_pcrel

[PATCH 11/15] csky: Fix non-robust split condition in define_insn_and_split

2021-11-11 Thread Kewen Lin via Gcc-patches
This patch is to fix some non-robust split conditions in some define_insn_and_splits, to make each of them applied on top of the corresponding condition for define_insn part, otherwise the splitting could perform unexpectedly. gcc/ChangeLog: * config/csky/csky.md (*cskyv2_adddi3, *ck801_a

Re: Use modref summary to DSE calls to non-pure functions

2021-11-11 Thread Jan Hubicka via Gcc-patches
> > + /* Unlike alias oracle we can not skip subtrees based on TBAA check. > > + Count the size of the whole tree to verify that we will not need too > > many > > + tests. */ > > + FOR_EACH_VEC_SAFE_ELT (summary->stores->bases, i, base_node) > > +FOR_EACH_VEC_SAFE_ELT (base_node->re

Re: Use modref summary to DSE calls to non-pure functions

2021-11-11 Thread Richard Biener via Gcc-patches
On Thu, Nov 11, 2021 at 1:07 PM Jan Hubicka wrote: > > > > + /* Unlike alias oracle we can not skip subtrees based on TBAA check. > > > + Count the size of the whole tree to verify that we will not need > > > too many > > > + tests. */ > > > + FOR_EACH_VEC_SAFE_ELT (summary->stores->ba

Re: Use modref summary to DSE calls to non-pure functions

2021-11-11 Thread Jan Hubicka via Gcc-patches
Hi, > > No, I think if it turns out useful then we want a way to have such ref > represented by an ao_ref. Note that when we come from a > ref tree we know handled-components only will increase offset, > only the base MEM_REF can contain a pointer subtraction (but > the result of that is the base

Basic kill analysis for modref

2021-11-11 Thread Jan Hubicka via Gcc-patches
Hi, This patch enables optimization of stores that are killed by calls. Modref summary is extended by array containing list of access ranges, relative to function parameters, that are known to be killed by the function. This array is collected during local analysis and optimized (so separate stores

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

2021-11-11 Thread Eric Gallager via Gcc-patches
On Tue, Nov 9, 2021 at 8:50 AM 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 returned > by getcwd() may be used as the argument in a subsequent

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

2021-11-11 Thread Segher Boessenkool
On Wed, Nov 10, 2021 at 03:28:18PM -0600, Bill Schmidt wrote: > On 11/10/21 2:33 AM, Segher Boessenkool wrote: > > On Tue, Nov 09, 2021 at 03:46:54PM -0600, Bill Schmidt wrote: > >>* config/rs6000/rs6000-builtin-new.def (CMPB): Flag as no32bit. > >>(BPERMD): Flag as 32bit. So, change this

Re: [committed] openmp: Fix handling of numa_domains(1)

2021-11-11 Thread Thomas Schwinge
Hi! On 2021-10-18T15:03:08+0200, Jakub Jelinek via Gcc-patches wrote: > On Fri, Oct 15, 2021 at 12:26:34PM -0700, sunil.k.pandey wrote: >> 4764049dd620affcd3e2658dc7f03a6616370a29 is the first bad commit >> commit 4764049dd620affcd3e2658dc7f03a6616370a29 >> Author: Jakub Jelinek >> Date: Fri

RE: [PATCH] aarch64: Use type-qualified builtins for UADD[LW][2] Neon intrinsics

2021-11-11 Thread Kyrylo Tkachov via Gcc-patches
Hi Jonathan, > -Original Message- > From: Jonathan Wright > Sent: Thursday, November 11, 2021 10:18 AM > To: gcc-patches@gcc.gnu.org > Cc: Richard Sandiford ; Kyrylo Tkachov > > Subject: [PATCH] aarch64: Use type-qualified builtins for UADD[LW][2] Neon > intrinsics > > Hi, > > This pat

[committed] libgomp: Use TLS storage for omp_get_num_teams()/omp_get_team_num() values

2021-11-11 Thread Jakub Jelinek via Gcc-patches
Hi! When thinking about GOMP_teams3, I've realized that using global variables for the values returned by omp_get_num_teams()/omp_get_team_num() calls is incorrect even with our right now dumb way of implementing host teams. The problems are two, one is if host teams is used from multiple pthread_

Re: Use modref summary to DSE calls to non-pure functions

2021-11-11 Thread Richard Biener via Gcc-patches
On Thu, Nov 11, 2021 at 1:42 PM Jan Hubicka wrote: > > Hi, > > > > No, I think if it turns out useful then we want a way to have such ref > > represented by an ao_ref. Note that when we come from a > > ref tree we know handled-components only will increase offset, > > only the base MEM_REF can co

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

2021-11-11 Thread Tamar Christina via Gcc-patches
Ah yes that particular test checks the vector code. I see that the function wasn't vectorized but that the scalar replacement was done. _15 = _4 > 0; So the test is checking if (-x >> bitsize-1) gets optimized to -(x > 0) I see that the replacement was made on the scalar correctly so I will

Re: Use modref summary to DSE calls to non-pure functions

2021-11-11 Thread Jan Hubicka via Gcc-patches
> > Hmm, I could try to do this, but possibly incrementally? > > You mean handle a &decl argument specially for unknown param offset? > Yeah, I guess so. I think it is also pointer that was allocated and is going to be freed... > > > Basically I want to have > > > > foo (&decl) > > decl = {} > >

Fix noreturn discovery

2021-11-11 Thread Jan Hubicka via Gcc-patches
Hi, this patch fixes ipa-pure-const handling of noreturn flags. It is not safe to set it for interposable symbols and we should also set it for aliases (just like we do for other flags). This patch merely copies other flag handling and implements it here. Bootstrapped/regtested x86_64-linux, wil

Fix recursion discovery in ipa-pure-const

2021-11-11 Thread Jan Hubicka via Gcc-patches
Hi, We make self recursive functions as looping of fear of endless recursion. This is done correctly for local pure/const and for non-trivial SCCs in callgraph, but for trivial SCCs we miss the flag. I think it is bad decision since infinite recursion will run out of stack, but changing it upsets

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

2021-11-11 Thread Segher Boessenkool
Hi! On Wed, Nov 10, 2021 at 06:59:23PM -0300, Raphael Moreira Zinsly wrote: > 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

[PATCH] tree-optimization/103188 - avoid running ranger on not-up-to-date SSA

2021-11-11 Thread Richard Biener via Gcc-patches
The following splits loop header copying into an analysis phase that uses ranger and a transform phase that can do without to avoid running ranger on IL that has SSA form not updated. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2021-11-11 Richard Biener PR tree-optimi

[PATCH v1 1/8] bswap: synthesize HImode bswap from SImode or DImode

2021-11-11 Thread Philipp Tomsich
The RISC-V Zbb extension adds an XLEN (i.e. SImode for rv32, DImode for rv64) bswap instruction (rev8). While, with the current master, SImode is synthesized correctly from DImode, HImode is not. This change adds an appropriate expansion for a HImode bswap, if a wider bswap is available. Without

[PATCH v1 0/8] Improvements to bitmanip-1.0 (Zb[abcs]) support

2021-11-11 Thread Philipp Tomsich
This series provides assorted improvements for the RISC-V Zb[abcs] support collected over the last year and a half and forward-ported to the recently merged upstream support for the Zb[abcs] extensions. Improvements include: - synthesis of HImode bswap from SImode/DImode rev8 - cost-model chan

[PATCH v1 2/8] RISC-V: costs: handle BSWAP

2021-11-11 Thread Philipp Tomsich
The BSWAP operation is not handled in rtx_costs. Add it. gcc/ChangeLog: * config/riscv/riscv.c (rtx_costs): Add BSWAP. Signed-off-by: Philipp Tomsich --- gcc/config/riscv/riscv.c | 8 1 file changed, 8 insertions(+) diff --git a/gcc/config/riscv/riscv.c b/gcc/config/riscv/ri

[PATCH v1 3/8] RISC-V: costs: support shift-and-add in strength-reduction

2021-11-11 Thread Philipp Tomsich
The strength-reduction implementation in expmed.c will assess the profitability of using shift-and-add using a RTL expression that wraps a MULT (with a power-of-2) in a PLUS. Unless the RISC-V rtx_costs function recognizes this as expressing a sh[123]add instruction, we will return an inflated cos

[PATCH v1 4/8] RISC-V: bitmanip: fix constant-loading for (1ULL << 31) in DImode

2021-11-11 Thread Philipp Tomsich
The SINGLE_BIT_MASK_OPERAND() is overly restrictive, triggering for bits above 31 only (to side-step any issues with the negative SImode value 0x8000). This moves the special handling of this SImode value (i.e. the check for -2147483648) to riscv.c and relaxes the SINGLE_BIT_MASK_OPERAND() tes

[PATCH v1 5/8] RISC-V: bitmanip: improvements to rotate instructions

2021-11-11 Thread Philipp Tomsich
This change improves rotate instructions (motivated by a review of the code generated for OpenSSL): rotate-left by a constant are synthesized using a rotate-right-immediate to avoid putting the shift-amount into a temporary; to do so, we allow either a register or an immediate for the expansion of

[PATCH v1 6/8] RISC-V: bitmanip: add splitter to use bexti for "(a & (1 << BIT_NO)) ? 0 : -1"

2021-11-11 Thread Philipp Tomsich
Consider creating a polarity-reversed mask from a set-bit (i.e., if the bit is set, produce all-ones; otherwise: all-zeros). Using Zbb, this can be expressed as bexti, followed by an addi of minus-one. To enable the combiner to discover this opportunity, we need to split the canonical expression

[PATCH v1 7/8] RISC-V: bitmanip: add orc.b as an unspec

2021-11-11 Thread Philipp Tomsich
As a basis for optimized string functions (e.g., the by-pieces implementations), we need orc.b available. This adds orc.b as an unspec, so we can expand to it. gcc/ChangeLog: * config/riscv/bitmanip.md (orcb2): Add orc.b as an unspec. * config/riscv/riscv.md: Add UNSPEC_ORC_B. S

[PATCH v1 8/8] RISC-V: bitmanip: relax minmax to operate on GPR

2021-11-11 Thread Philipp Tomsich
While min/minu/max/maxu instructions are provided for XLEN only, these can safely operate on GPRs (i.e. SImode or DImode for RV64): SImode is always sign-extended, which ensures that the XLEN-wide instructions can be used for signed and unsigned comparisons on SImode yielding a correct ordering of

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

2021-11-11 Thread Raphael M Zinsly via Gcc-patches
Hi Segher, On 11/11/2021 10:43, Segher Boessenkool wrote: Hi! On Wed, Nov 10, 2021 at 06:59:23PM -0300, Raphael Moreira Zinsly wrote: 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 finish

Re: Fix recursion discovery in ipa-pure-const

2021-11-11 Thread Richard Biener via Gcc-patches
On Thu, Nov 11, 2021 at 2:41 PM Jan Hubicka via Gcc-patches wrote: > > Hi, > We make self recursive functions as looping of fear of endless recursion. > This is done correctly for local pure/const and for non-trivial SCCs in > callgraph, but for trivial SCCs we miss the flag. > > I think it is bad

[COMMITTED] Move import population from threader to path solver.

2021-11-11 Thread Aldy Hernandez via Gcc-patches
Imports are our nomenclature for external SSA names to a block that are used to calculate the outgoing edges for said block. For example, in the following snippet: : _1 = b_10 == block_11; _2 = b_10 != -1; _3 = _1 & _2; if (_3 != 0) goto ; [INV] else goto ; [I

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

2021-11-11 Thread Raphael Moreira Zinsly via Gcc-patches
Changes since v1: - Removed -Wmissing-prototypes fix. - Fixed formatting of Changelog and patch. --->8--- 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 occur

Re: Fix recursion discovery in ipa-pure-const

2021-11-11 Thread Jan Hubicka via Gcc-patches
> On Thu, Nov 11, 2021 at 2:41 PM Jan Hubicka via Gcc-patches > wrote: > > > > Hi, > > We make self recursive functions as looping of fear of endless recursion. > > This is done correctly for local pure/const and for non-trivial SCCs in > > callgraph, but for trivial SCCs we miss the flag. > > > >

[committed] Testsuite: Various fixes for nios2.

2021-11-11 Thread Sandra Loosemore
I've pushed the attached patch to clean up some test failures I've seen on nios2-elf. This target defaults to -fno-delete-null-pointer-checks so any optimization tests that depend on assumptions that valid pointers are non-zero have to be marked explicitly. The others ought to be obvious, exc

Fix some side cases of side effects analysis

2021-11-11 Thread Jan Hubicka via Gcc-patches
Hi, I wrote script comparing modref pure/const discovery with ipa-pure-const and found mistakes on both ends. I fixed ipa-pure-const in previous two patches. This plugs the case where modref was too optimistic in handling looping pure consts which were previously missed due to early exits on ECF_

[Patch] Fortran/openmp: Add support for 2 argument num_teams clause

2021-11-11 Thread Tobias Burnus
Just the Fortran FE work + Fortranized version for the C tests. Tobias - Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München;

[PATCH] tree-optimization/103190 - fix assert in reassoc stmt placement with asm

2021-11-11 Thread Richard Biener via Gcc-patches
This makes sure to only assert we don't run into a asm goto when inserting a stmt in reassoc, matching the condition in can_reassociate_p. We can handle EH edges from an asm just like EH edges from any other stmt. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2021-11-11 Richard B

  1   2   >