Re: [patch][version 6] add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-08-11 Thread Richard Biener via Gcc-patches
On Tue, 10 Aug 2021, Qing Zhao wrote: > > > > On Aug 10, 2021, at 3:16 PM, Qing Zhao via Gcc-patches > > wrote: > > > > Hi, Richard, > > > >> On Aug 10, 2021, at 10:22 AM, Richard Biener wrote: > > Especially in the VLA case but likely also in general (though unlikely > sinc

Re: [PATCH] [i386] Combine avx_vec_concatv16si and avx512f_zero_extendv16hiv16si2_1 to avx512f_zero_extendv16hiv16si2_2.

2021-08-11 Thread Jakub Jelinek via Gcc-patches
On Wed, Aug 11, 2021 at 02:43:06PM +0800, liuhongt wrote: > Add define_insn_and_split to combine avx_vec_concatv16si/2 and > avx512f_zero_extendv16hiv16si2_1 since the latter already zero_extend > the upper bits, similar for other patterns which are related to > pmovzx{bw,wd,dq}. > > It will do

Re: [Patch v3 Fortran] Fix c_float128 and c_float128_complex on targets with 128-bit long double.

2021-08-11 Thread Tobias Burnus
On 11.08.21 00:46, Sandra Loosemore wrote: On 8/10/21 2:29 AM, Tobias Burnus wrote: [snip] To conclude: I like the code changes (LGTM); the '__float128' -> 'TFmode' comment change also matches the code. However, I think both longer comments need to be updated. OK. I used your wording verba

[committed] sanitizer: Cherry-pick realpath fix

2021-08-11 Thread Jakub Jelinek via Gcc-patches
Hi! tsan in some cases starts ignoring interceptors and only calls the intercepted functions. But for realpath the behavior for NULL second argument was only handled in the interceptor and intercepted function was the one found by dlsym which is often one that doesn't handle NULL as second argume

[PATCH] middle-end/101858 - avoid shift of pointer in folding

2021-08-11 Thread Richard Biener via Gcc-patches
This makes sure to not generate a shift of pointer types in simplification of X < (cast) (1 << Y). Bootstrap and regtest pending on x86_64-unknown-linux-gnu. 2021-08-11 Richard Biener PR middle-end/101858 * fold-const.c (fold_binary_loc): Guard simplification of X < (

Re: [PATCH][v2] Adjust volatile handling of the operand scanner

2021-08-11 Thread Eric Botcazou
> build3 currently does no special processing for the FIELD_DECL operand, > it just sets TREE_THIS_VOLATILE from operand zero for tcc_references. > > The C and C++ frontends have repeated patterns like > > ref = build3 (COMPONENT_REF, subtype, datum, subdatum, >

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

2021-08-11 Thread Xionghu Luo via Gcc-patches
On 2021/8/10 22:47, Richard Biener wrote: > On Mon, 9 Aug 2021, Xionghu Luo wrote: > >> Thanks, >> >> On 2021/8/6 19:46, Richard Biener wrote: >>> On Tue, 3 Aug 2021, Xionghu Luo wrote: >>> loop split condition is moved between loop1 and loop2, the split bb's count and probability sho

Re: [patch][version 6] add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-08-11 Thread Richard Sandiford via Gcc-patches
Qing Zhao via Gcc-patches writes: >> On Aug 10, 2021, at 3:16 PM, Qing Zhao via Gcc-patches >> wrote: >> >> Hi, Richard, >> >>> On Aug 10, 2021, at 10:22 AM, Richard Biener wrote: > > Especially in the VLA case but likely also in general (though unlikely > since usually the recei

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

2021-08-11 Thread Richard Biener via Gcc-patches
On Wed, 11 Aug 2021, Xionghu Luo wrote: > > > On 2021/8/10 22:47, Richard Biener wrote: > > On Mon, 9 Aug 2021, Xionghu Luo wrote: > > > >> Thanks, > >> > >> On 2021/8/6 19:46, Richard Biener wrote: > >>> On Tue, 3 Aug 2021, Xionghu Luo wrote: > >>> > loop split condition is moved between

Re: [PATCH][v2] Adjust volatile handling of the operand scanner

2021-08-11 Thread Richard Biener via Gcc-patches
On Wed, 11 Aug 2021, Richard Biener wrote: > On Tue, 10 Aug 2021, Eric Botcazou wrote: > > > > The question is whether we instead want to amend build3 to > > > set TREE_THIS_VOLATILE automatically when the FIELD_DECL has > > > it set. At least for the Fortran FE cases the gimplifier > > > fails

Re: [PATCH] [i386] Combine avx_vec_concatv16si and avx512f_zero_extendv16hiv16si2_1 to avx512f_zero_extendv16hiv16si2_2.

2021-08-11 Thread Hongtao Liu via Gcc-patches
On Wed, Aug 11, 2021 at 3:58 PM Jakub Jelinek wrote: > > On Wed, Aug 11, 2021 at 02:43:06PM +0800, liuhongt wrote: > > Add define_insn_and_split to combine avx_vec_concatv16si/2 and > > avx512f_zero_extendv16hiv16si2_1 since the latter already zero_extend > > the upper bits, similar for other pa

Re: [PATCH] Adding target hook allows to reject initialization of register

2021-08-11 Thread Richard Sandiford via Gcc-patches
Richard Biener writes: > On Tue, Aug 10, 2021 at 10:33 AM Jojo R via Gcc-patches > wrote: >> >> Some target like RISC-V allow to group vector register as a whole, >> and only operate part of it in fact, but the 'init-regs' pass will add >> initialization >> for uninitialized registers. Add this

[PATCH] tree-optimization/101861 - fix gather use for non-gather refs

2021-08-11 Thread Richard Biener via Gcc-patches
My previous change broke the usage of gather for strided loads. The following fixes it. Bootstrapped on x86_64-unknown-linux-gnu, will push as obvious. 2021-08-11 Richard Biener PR tree-optimization/101861 * tree-vect-stmts.c (vectorizable_load): Fix error in previous

Re: [PATCH][v2] Adjust volatile handling of the operand scanner

2021-08-11 Thread Eric Botcazou
> So I'm leaning towards leaving build3 alone and fixing up frontends > as issues pop up. FWIW fine with me. -- Eric Botcazou

Re: [PATCH 05/34] rs6000: Add available-everywhere and ancient builtins

2021-08-11 Thread Segher Boessenkool
On Tue, Aug 10, 2021 at 04:29:10PM -0500, Bill Schmidt wrote: > On 8/10/21 12:34 PM, Segher Boessenkool wrote: > >On Tue, Aug 10, 2021 at 11:17:05AM -0500, will schmidt wrote: > >>On Thu, 2021-07-29 at 08:30 -0500, Bill Schmidt wrote: > >>>+; This will break for long double == _Float128. libgcc hi

Re: [PATCH] Adding target hook allows to reject initialization of register

2021-08-11 Thread Richard Biener via Gcc-patches
On Wed, Aug 11, 2021 at 11:28 AM Richard Sandiford wrote: > > Richard Biener writes: > > On Tue, Aug 10, 2021 at 10:33 AM Jojo R via Gcc-patches > > wrote: > >> > >> Some target like RISC-V allow to group vector register as a whole, > >> and only operate part of it in fact, but the 'init-regs' p

Re: [Patch v3 Fortran] Fix c_float128 and c_float128_complex on targets with 128-bit long double.

2021-08-11 Thread Segher Boessenkool
Hi! On Tue, Aug 10, 2021 at 04:46:11PM -0600, Sandra Loosemore wrote: > OK. I used your wording verbatim for the first one. For the second > one, I'm still pretty confused as I think it is at least theoretically > possible on PowerPC to have a target with 64-bit long double (AIX?) that Some

Re: [PATCH] Extend ldexp{s, d}f3 to vscalefs{s, d} when TARGET_AVX512F and TARGET_SSE_MATH.

2021-08-11 Thread Uros Bizjak via Gcc-patches
On Wed, Aug 11, 2021 at 8:36 AM Uros Bizjak wrote: > > On Tue, Aug 10, 2021 at 2:13 PM liuhongt wrote: > > > > Hi: > > AVX512F supported vscalefs{s,d} which is the same as ldexp except the > > second operand should be floating point. > > Bootstrapped and regtested on x86_64-linux-gnu{-m32,}.

Re: [Patch v3 Fortran] Fix c_float128 and c_float128_complex on targets with 128-bit long double.

2021-08-11 Thread Iain Sandoe via Gcc-patches
Hi Folks > On 11 Aug 2021, at 11:55, Segher Boessenkool > wrote: > On Tue, Aug 10, 2021 at 04:46:11PM -0600, Sandra Loosemore wrote: >> OK. I used your wording verbatim for the first one. For the second >> one, I'm still pretty confused as I think it is at least theoretically >> possible on

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

2021-08-11 Thread CHIGOT, CLEMENT via Gcc-patches
Hi guys, Did you have a chance to take a look at the new version of this patch ? Thanks, Clément From: CHIGOT, CLEMENT Sent: Monday, June 28, 2021 9:16 AM To: Jeff Law ; David Malcolm Cc: gcc-patches@gcc.gnu.org ; David Edelsohn Subject: Re: [PATCH] aix: handl

Re: [Patch v3 Fortran] Fix c_float128 and c_float128_complex on targets with 128-bit long double.

2021-08-11 Thread Segher Boessenkool
Hi! On Wed, Aug 11, 2021 at 12:29:06PM +0100, Iain Sandoe wrote: > > On 11 Aug 2021, at 11:55, Segher Boessenkool > > wrote: > > On Tue, Aug 10, 2021 at 04:46:11PM -0600, Sandra Loosemore wrote: > >> OK. I used your wording verbatim for the first one. For the second > >> one, I'm still pretty

Re: ipa-modref: merge flags when adding escape

2021-08-11 Thread Jan Hubicka
> While working on some function splitting changes, I've got a > miscompilation in stagefeedback that I've tracked down to a > complicated scenario: > > - ipa-modref miscomputes a function parameter as having EAF_DIRECT, > because it's dereferenced and passed on to another function, but > add_

Re: [PATCH] Do not use tuple-like interface for pair in unordered containers

2021-08-11 Thread François Dumont via Gcc-patches
Hi     Sorry for the delay, I had just miss this message.     I think you are clearly more expert than me for the changes you propose. I had a look at the patch and it seems just fine as it keeps the forwarding as expected. Nice simplification in _NodeBuilder<_Select1st>, we indeed only need

Re: [patch][version 6] add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-08-11 Thread Qing Zhao via Gcc-patches
> On Aug 11, 2021, at 2:02 AM, Richard Biener wrote: > > On Tue, 10 Aug 2021, Qing Zhao wrote: > >> >> >>> On Aug 10, 2021, at 3:16 PM, Qing Zhao via Gcc-patches >>> wrote: >>> >>> Hi, Richard, >>> On Aug 10, 2021, at 10:22 AM, Richard Biener wrote: >> >> Especially in the

Small tweak to expand_used_vars

2021-08-11 Thread Eric Botcazou
This completes the replacement of DECL_ATTRIBUTES (current_function_decl) with the attribs local variable. Tested on x86-64/Linux, applied on the mainline as obvious. 2021-08-11 Eric Botcazuo * cfgexpand.c (expand_used_vars): Reuse attribs local variable. -- Eric Botcazoudiff --gi

Re: [patch][version 6] add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-08-11 Thread Richard Biener via Gcc-patches
On Wed, 11 Aug 2021, Qing Zhao wrote: > > > > On Aug 11, 2021, at 2:02 AM, Richard Biener wrote: > > > > On Tue, 10 Aug 2021, Qing Zhao wrote: > > > >> > >> > >>> On Aug 10, 2021, at 3:16 PM, Qing Zhao via Gcc-patches > >>> wrote: > >>> > >>> Hi, Richard, > >>> > On Aug 10, 2021, a

Re: [PATCH] c++: Fix ICE on defaulted spaceship with pointer return type [PR94162]

2021-08-11 Thread Jason Merrill via Gcc-patches
On 8/10/21 4:39 AM, Jakub Jelinek wrote: Hi! The spaceship-synth-neg6.C testcase ICEs because we call cat_tag_for on the explicit return type, but pointer types don't have TYPE_LINKAGE_IDENTIFIER. The patch fixes that. Or should I be checking for if (!CLASS_TYPE_P (type)) return cc_last; instea

Re: [patch][version 6] add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-08-11 Thread Qing Zhao via Gcc-patches
> On Aug 11, 2021, at 4:02 AM, Richard Sandiford > wrote: > > Qing Zhao via Gcc-patches writes: >>> On Aug 10, 2021, at 3:16 PM, Qing Zhao via Gcc-patches >>> wrote: >>> >>> Hi, Richard, >>> On Aug 10, 2021, at 10:22 AM, Richard Biener wrote: >> >> Especially in the VLA cas

Re: [PATCH] c++: Improve memory usage of subsumption [PR100828]

2021-08-11 Thread Jason Merrill via Gcc-patches
On 8/9/21 5:07 PM, Patrick Palka wrote: On Wed, Jul 28, 2021 at 4:42 PM Jason Merrill wrote: On 7/19/21 6:05 PM, Patrick Palka wrote: Constraint subsumption is implemented in two steps. The first step computes the disjunctive (or conjunctive) normal form of one of the constraints, and the se

Re: [patch][version 6] add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-08-11 Thread Qing Zhao via Gcc-patches
> On Aug 11, 2021, at 8:37 AM, Richard Biener wrote: > > On Wed, 11 Aug 2021, Qing Zhao wrote: > >> >> >>> On Aug 11, 2021, at 2:02 AM, Richard Biener wrote: >>> >>> On Tue, 10 Aug 2021, Qing Zhao wrote: >>> > On Aug 10, 2021, at 3:16 PM, Qing Zhao via Gcc-patches >

Re: [patch][version 6] add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-08-11 Thread Richard Biener via Gcc-patches
On Wed, 11 Aug 2021, Qing Zhao wrote: > > > > On Aug 11, 2021, at 8:37 AM, Richard Biener wrote: > > > > On Wed, 11 Aug 2021, Qing Zhao wrote: > > > >> > >> > >>> On Aug 11, 2021, at 2:02 AM, Richard Biener wrote: > >>> > >>> On Tue, 10 Aug 2021, Qing Zhao wrote: > >>> > > >

Re: [patch][version 6] add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-08-11 Thread Qing Zhao via Gcc-patches
> On Aug 11, 2021, at 8:58 AM, Richard Biener wrote: > > On Wed, 11 Aug 2021, Qing Zhao wrote: > >> >> >>> On Aug 11, 2021, at 8:37 AM, Richard Biener wrote: >>> >>> On Wed, 11 Aug 2021, Qing Zhao wrote: >>> > On Aug 11, 2021, at 2:02 AM, Richard Biener wrote: >

Re: [PATCH] c++: Fix ICE on defaulted spaceship with pointer return type [PR94162]

2021-08-11 Thread Jakub Jelinek via Gcc-patches
On Wed, Aug 11, 2021 at 09:42:56AM -0400, Jason Merrill wrote: > Checking CLASS_TYPE_P && decl_in_std_namespace (TYPE_MAIN_DECL) before > looking at the name makes sense to me. CLASS_TYPE_P is cheap, but isn't decl_in_std_namespace, especially when it needs to walk inline namespaces, better done o

Re: [PATCH] arm: Fix multilib mapping for CDE extensions [PR100856]

2021-08-11 Thread Christophe Lyon via Gcc-patches
ping? https://gcc.gnu.org/pipermail/gcc-patches/2021-July/575310.html On Wed, Aug 4, 2021 at 11:13 AM Christophe Lyon via Gcc-patches < gcc-patches@gcc.gnu.org> wrote: > ping? > > On Thu, 15 Jul 2021 at 15:07, Christophe LYON via Gcc-patches > wrote: > > > > This is a followup to Srinath's rece

[patch] Make -no-pie option work for native Windows

2021-08-11 Thread Eric Botcazou
Hi, as already mentioned on the list, binutils 2.36 generates PIE executables by default on native Windows (because --dynamicbase is the default) so it makes sense to have a simple way to counter that and -no-pie seems appropriate, all the more so that it is automatically passed when building the

[PATCH] target/101788 - avoid decomposing hard-register "loads"

2021-08-11 Thread Richard Biener via Gcc-patches
This avoids decomposing hard-register accesses that masquerade as loads. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2021-08-11 Richard Biener PR target/101877 * tree-ssa-forwprop.c (pass_forwprop::execute): Do not decompose hard-register accesses. ---

Re: [PATCH][v2] Adjust volatile handling of the operand scanner

2021-08-11 Thread Richard Biener via Gcc-patches
On Wed, 11 Aug 2021, Eric Botcazou wrote: > > So I'm leaning towards leaving build3 alone and fixing up frontends > > as issues pop up. > > FWIW fine with me. OK, so I pushed the original change (reposted below). Bootstrapped / tested on x86_64-unknown-linux-gnu. Richard. >From e5a23d54d189f3

[PATCH] Fix gcc.dg/lto/pr48622_0.c testcase

2021-08-11 Thread Richard Biener via Gcc-patches
This fixes the testcase to not rely on the reference to ashift_qi_1 being optimized out by RTL optimization via help of the initregs pass that changes comparisons of uninitialized data with a comparison that is always false. Tested on x86_64-unknown-linux-gnu, pushed. 2021-08-11 Richard Biener

[PATCH][RFC] target/61810 - disable init-regs pass on targets using LRA

2021-08-11 Thread Richard Biener via Gcc-patches
This patch disables the init-regs pass on targets using LRA. It's not clear as to what issue the init-regs papers over and most definitely LRA should get it right. This leaves targets still using reload unaffected but will expose any such LRA bug if it exists, allowing it to be identified and fixe

Re: [Patch v3 Fortran] Fix c_float128 and c_float128_complex on targets with 128-bit long double.

2021-08-11 Thread Sandra Loosemore
On 8/11/21 2:05 AM, Tobias Burnus wrote: On 11.08.21 00:46, Sandra Loosemore wrote: On 8/10/21 2:29 AM, Tobias Burnus wrote: [snip] To conclude: I like the code changes (LGTM); the '__float128' -> 'TFmode' comment change also matches the code. However, I think both longer comments need to be

Re: [PATCH] c++: Improve memory usage of subsumption [PR100828]

2021-08-11 Thread Patrick Palka via Gcc-patches
On Wed, 11 Aug 2021, Jason Merrill wrote: > On 8/9/21 5:07 PM, Patrick Palka wrote: > > On Wed, Jul 28, 2021 at 4:42 PM Jason Merrill wrote: > > > > > > On 7/19/21 6:05 PM, Patrick Palka wrote: > > > > Constraint subsumption is implemented in two steps. The first step > > > > computes the disju

[PATCH] aarch64: Replace some uses of GET_CODE with RTL predicate macros

2021-08-11 Thread Alistair Lee via Gcc-patches
Hi all, this patch changed some RTL nodes to appropriate macros in Aarch64.c backend using a script. Would this be okay for trunk? Also, this is my first contribution, and I do not yet have commit rights, so if everything is okay could someone commit this for me? Thank you and I would apprec

Re: [patch][version 6] add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-08-11 Thread Qing Zhao via Gcc-patches
I modified the routine “gimple_add_init_for_auto_var” as the following: /* Generate initialization to automatic variable DECL based on INIT_TYPE. Build a call to internal const function DEFERRED_INIT: 1st argument: SIZE of the DECL; 2nd argument: INIT_TYPE; 3rd argument: IS_VLA, 0

Re: [patch][version 6] add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-08-11 Thread Richard Biener via Gcc-patches
On August 11, 2021 5:30:40 PM GMT+02:00, Qing Zhao wrote: >I modified the routine “gimple_add_init_for_auto_var” as the following: > >/* Generate initialization to automatic variable DECL based on INIT_TYPE. > Build a call to internal const function DEFERRED_INIT: > 1st argument: SIZE of t

Re: [PATCH] Adding target hook allows to reject initialization of register

2021-08-11 Thread Richard Sandiford via Gcc-patches
Richard Biener writes: > On Wed, Aug 11, 2021 at 11:28 AM Richard Sandiford > wrote: >> >> Richard Biener writes: >> > On Tue, Aug 10, 2021 at 10:33 AM Jojo R via Gcc-patches >> > wrote: >> >> >> >> Some target like RISC-V allow to group vector register as a whole, >> >> and only operate part o

[committed] libstdc++: Define std::is_pointer_interconvertible_base_of for C++20

2021-08-11 Thread Jonathan Wakely via Gcc-patches
Implement these traits using the new built-ins that Jakub added recently. Signed-off-by: Jonathan Wakely libstdc++-v3/ChangeLog: * include/std/type_traits (__cpp_lib_is_pointer_interconvertible) (is_pointer_interconvertible_base_of_v) (is_pointer_interconvertible_base_of

[PATCH, rs6000 V2] Add store fusion support for Power10

2021-08-11 Thread Pat Haugen via Gcc-patches
Enable store fusion on Power10. Use the SCHED_REORDER hook to implement Power10 specific ready list reordering. As of now this is just store fusion. Things changed in this version of the patch - Separate patch for additional load/store checks - Move option check from is_fusable_store() to caller

Re: [PATCH v3] gcov: Add TARGET_GCOV_TYPE_SIZE target macro

2021-08-11 Thread Joseph Myers
On Wed, 11 Aug 2021, Sebastian Huber wrote: > 64-bit atomic operations. Allow targets to override the default type > size with the new TARGET_GCOV_TYPE_SIZE target macro. Hook, not macro. > diff --git a/gcc/c-family/c-cppbuiltin.c b/gcc/c-family/c-cppbuiltin.c > index f79f939bd10f..e85b60c79f49

Re: [patch][version 6] add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-08-11 Thread Richard Sandiford via Gcc-patches
Qing Zhao writes: >> On Aug 11, 2021, at 4:02 AM, Richard Sandiford >> wrote: >>> I came up with the following solution: >>> >>> Define the IFN_DEFERRED_INIT function as: >>> >>> LHS = DEFERRED_INIT (SIZE of the DECL, INIT_TYPE, IS_VLA); >>> >>> if IS_VLA is false, the LHS is the DECL its

Re: [patch][version 6] add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-08-11 Thread Qing Zhao via Gcc-patches
> On Aug 11, 2021, at 10:53 AM, Richard Biener wrote: > > On August 11, 2021 5:30:40 PM GMT+02:00, Qing Zhao > wrote: >> I modified the routine “gimple_add_init_for_auto_var” as the following: >> >> /* Generate initialization to automatic variable DECL based on INIT_TYPE. >> Build a cal

Re: [PATCH] rs6000: Add missing unsigned info for some P10 bifs

2021-08-11 Thread Bill Schmidt via Gcc-patches
Hi Kewen, On 8/11/21 12:44 AM, Kewen.Lin wrote: Hi, This patch is to make prototypes of some Power10 built-in functions consistent with what's in the documentation, as well as the vector version. Otherwise, useless conversions can be generated in gimple IR, and the vectorized versions will hav

Re: [patch][version 6] add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-08-11 Thread Qing Zhao via Gcc-patches
> On Aug 11, 2021, at 11:15 AM, Richard Sandiford > wrote: > > Qing Zhao writes: >>> On Aug 11, 2021, at 4:02 AM, Richard Sandiford >>> wrote: I came up with the following solution: Define the IFN_DEFERRED_INIT function as: LHS = DEFERRED_INIT (SIZE of the DECL,

Re: [PATCH] rs6000: Make some BIFs vectorized on P10

2021-08-11 Thread Bill Schmidt via Gcc-patches
Hi Kewen, FWIW, it's easier on reviewers if you include the patch inline instead of as an attachment. On 8/11/21 1:56 AM, Kewen.Lin wrote: Hi, This patch is to add the support to make vectorizer able to vectorize scalar version of some built-in functions with its corresponding vector version

Re: [PATCH] rs6000: Fix ICE expanding lxvp and stxvp gimple built-ins [PR101849]

2021-08-11 Thread Bill Schmidt via Gcc-patches
Hi Peter, LGTM.  Still needs maintainer review, of course. :) Bill On 8/10/21 6:37 PM, Peter Bergner wrote: PR101849 shows we ICE on a test case when we pass a non __vector_pair * pointer to the __builtin_vsx_lxvp and __builtin_vsx_stxvp built-ins that is cast to __vector_pair *. The problem

Re: [ARM] PR66791: Replace builtins for vdup_n and vmov_n intrinsics

2021-08-11 Thread Christophe Lyon via Gcc-patches
On Thu, Jun 24, 2021 at 6:29 PM Kyrylo Tkachov via Gcc-patches < gcc-patches@gcc.gnu.org> wrote: > > > > -Original Message- > > From: Prathamesh Kulkarni > > Sent: 24 June 2021 12:11 > > To: gcc Patches ; Kyrylo Tkachov > > > > Subject: [ARM] PR66791: Replace builtins for vdup_n and vmov

Re: [patch][version 6] add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-08-11 Thread Richard Biener via Gcc-patches
On August 11, 2021 6:22:00 PM GMT+02:00, Qing Zhao wrote: > > >> On Aug 11, 2021, at 10:53 AM, Richard Biener wrote: >> >> On August 11, 2021 5:30:40 PM GMT+02:00, Qing Zhao >> wrote: >>> I modified the routine “gimple_add_init_for_auto_var” as the following: >>> >>> /* Generate initializ

Re: [patch][version 6] add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-08-11 Thread Qing Zhao via Gcc-patches
> On Aug 11, 2021, at 11:55 AM, Richard Biener wrote: > > On August 11, 2021 6:22:00 PM GMT+02:00, Qing Zhao > wrote: >> >> >>> On Aug 11, 2021, at 10:53 AM, Richard Biener wrote: >>> >>> On August 11, 2021 5:30:40 PM GMT+02:00, Qing Zhao >>> wrote: I modified the routine “gimple_a

[PATCH 0/8] OpenMP 5.0: Topological sort for OpenMP 5.0 base pointers

2021-08-11 Thread Julian Brown
Hi, This patch series contains a reimplementation of the clause-ordering code in gimplify.c (omp_target_reorder_clauses), in anticipation of extending support for lvalues in mapping clauses for OpenMP 5.0. This builds (or will build) on a series of patches by Chung-Lin and myself that haven't comp

[PATCH 2/8] OpenMP 5.0: Implement relaxation of implicit map vs. existing device mappings

2021-08-11 Thread Julian Brown
From: Chung-Lin Tang This is a version of a patch by Chung-Lin, merged to current mainline. Any errors introduced are my own! It was previously posted here: https://gcc.gnu.org/pipermail/gcc-patches/2021-May/570365.html Chung-Lin's description from the previous submission follows. (Edit: it see

[PATCH 1/8] Improve OpenMP target support for C++ [PR92120 v4b]

2021-08-11 Thread Julian Brown
From: Chung-Lin Tang This is a version "v4b" of a patch by Chung-Lin, merged to current mainline. All errors introduced are my own! Previously posted here: https://gcc.gnu.org/pipermail/gcc-patches/2021-June/573166.html Chung-Lin's description from the last submission follows. This patch is th

[PATCH 4/8] Rewrite GOMP_MAP_ATTACH_DETACH mappings unconditionally

2021-08-11 Thread Julian Brown
It never makes sense for a GOMP_MAP_ATTACH_DETACH mapping to survive beyond gimplify.c, so this patch rewrites such mappings to GOMP_MAP_ATTACH or GOMP_MAP_DETACH unconditionally (rather than checking for a list of types of OpenACC or OpenMP constructs), in cases where it hasn't otherwise been done

[PATCH 3/8] Remove array section base-pointer mapping semantics, and other front-end adjustments (mainline trunk)

2021-08-11 Thread Julian Brown
From: Chung-Lin Tang This is a version of a patch by Chung-Lin, merged to current mainline. Any errors introduced are my own! It was previously posted here: https://gcc.gnu.org/pipermail/gcc-patches/2021-May/571195.html Chung-Lin's description from the previous submission follows (edited a litt

[PATCH 5/8] OpenMP/OpenACC: Move array_ref/indirect_ref handling code out of extract_base_bit_offset

2021-08-11 Thread Julian Brown
This patch slightly cleans up the semantics of extract_base_bit_offset, in that the stripping of ARRAY_REFS/INDIRECT_REFS out of extract_base_bit_offset is moved back into the (two) call sites of the function. This is done in preparation for follow-on patches that extend the function. Previously p

[PATCH 6/8] OpenACC/OpenMP: Refactor struct lowering in gimplify.c

2021-08-11 Thread Julian Brown
(Previously submitted here: https://gcc.gnu.org/pipermail/gcc-patches/2021-May/570398.html) This patch is a second attempt at refactoring struct component mapping handling for OpenACC/OpenMP during gimplification, after the patch I posted here: https://gcc.gnu.org/pipermail/gcc-patches/2018-Nov

[PATCH 7/8] OpenACC: Rework indirect struct handling in gimplify.c

2021-08-11 Thread Julian Brown
(Previously posted here: https://gcc.gnu.org/pipermail/gcc-patches/2021-May/570400.html) This patch reworks indirect struct handling in gimplify.c (i.e. for struct components mapped with "mystruct->a[0:n]", "mystruct->b", etc.), for OpenACC. The key observation leading to these changes was that c

[PATCH 8/8] OpenMP 5.0: [WIP, RFC] Clause ordering for OpenMP 5.0 (topological sorting by base pointer)

2021-08-11 Thread Julian Brown
This patch reimplements the omp_target_reorder_clauses function in anticipation of supporting "deeper" struct mappings (that is, with several structure dereference operators, or similar). The idea is that in place of the (possibly quadratic) algorithm in omp_target_reorder_clauses that greedily mo

Re: [PATCH] c++: recognize class-scope non-template dguides [PR79501]

2021-08-11 Thread Jason Merrill via Gcc-patches
On 8/9/21 1:16 PM, Patrick Palka wrote: It looks like we still don't recognize class-scope non-template deduction guides even after r12-2260. This is because deduction guides are handled in cp_parser_init_declarator after calling cp_parser_declarator, but in the class-scope non-template case we

Re: [PATCH] c++: Improve memory usage of subsumption [PR100828]

2021-08-11 Thread Jason Merrill via Gcc-patches
On 8/11/21 10:53 AM, Patrick Palka wrote: On Wed, 11 Aug 2021, Jason Merrill wrote: On 8/9/21 5:07 PM, Patrick Palka wrote: On Wed, Jul 28, 2021 at 4:42 PM Jason Merrill wrote: On 7/19/21 6:05 PM, Patrick Palka wrote: Constraint subsumption is implemented in two steps. The first step comp

Re: [PATCH] c++: Fix ICE on defaulted spaceship with pointer return type [PR94162]

2021-08-11 Thread Jason Merrill via Gcc-patches
On 8/11/21 10:01 AM, Jakub Jelinek wrote: On Wed, Aug 11, 2021 at 09:42:56AM -0400, Jason Merrill wrote: Checking CLASS_TYPE_P && decl_in_std_namespace (TYPE_MAIN_DECL) before looking at the name makes sense to me. CLASS_TYPE_P is cheap, but isn't decl_in_std_namespace, especially when it need

Re: [PATCH] c++: recognize class-scope non-template dguides [PR79501]

2021-08-11 Thread Patrick Palka via Gcc-patches
On Wed, 11 Aug 2021, Jason Merrill wrote: > On 8/9/21 1:16 PM, Patrick Palka wrote: > > It looks like we still don't recognize class-scope non-template > > deduction guides even after r12-2260. This is because deduction guides > > are handled in cp_parser_init_declarator after calling > > cp_par

Re: [PATCH] c++: most vexing parse and braced CTAD [PR89062]

2021-08-11 Thread Jason Merrill via Gcc-patches
On 8/9/21 1:15 PM, Patrick Palka wrote: Here grokdeclarator is emitting the error error: class template placeholder ‘Foo’ not permitted in this context during the tentative (and ultimately futile) parse of 'x' as a function declaration. This happens because when parsing 'Foo{1}', cp_parser_

Re: [PATCH] c++: recognize class-scope non-template dguides [PR79501]

2021-08-11 Thread Jason Merrill via Gcc-patches
On 8/11/21 2:29 PM, Patrick Palka wrote: On Wed, 11 Aug 2021, Jason Merrill wrote: On 8/9/21 1:16 PM, Patrick Palka wrote: It looks like we still don't recognize class-scope non-template deduction guides even after r12-2260. This is because deduction guides are handled in cp_parser_init_decl

Re: [PATCH] c++: suppress all warnings on memper pointers to work around dICE [PR101219]

2021-08-11 Thread Jason Merrill via Gcc-patches
On 8/6/21 11:34 AM, Sergei Trofimovich wrote: On Thu, 29 Jul 2021 11:41:39 -0400 Jason Merrill wrote: On 7/22/21 7:15 PM, Sergei Trofimovich wrote: From: Sergei Trofimovich r12-1804 ("cp: add support for per-location warning groups.") among other things removed warning suppression from a fe

Re: [PATCH] c++: Optimize constinit thread_local vars [PR101786]

2021-08-11 Thread Jason Merrill via Gcc-patches
On 8/6/21 4:16 AM, Jakub Jelinek wrote: Hi! The paper that introduced constinit mentioned in rationale that constinit can be used on externs as well and that it can be used to avoid the thread_local initialization wrappers, because the standard requires that if constinit is present on any declar

[PATCH] PR fortran/99351 - ICE in gfc_finish_var_decl, at fortran/trans-decl.c:695

2021-08-11 Thread Harald Anlauf via Gcc-patches
Dear all, the checks for the STAT= and ERRMSG= arguments to the coarray SYNC statements did not properly handle several cases, such as named constants (parameters). While fixing this, I adjusted the code similarly to what was recently done for (DE)ALLOCATE. We now also accept function references

*PING* Re: [PATCH] PR fortran/100950 - ICE in output_constructor_regular_field, at varasm.c:5514

2021-08-11 Thread Harald Anlauf via Gcc-patches
*Ping* > Gesendet: Dienstag, 03. August 2021 um 23:17 Uhr > Von: "Harald Anlauf" > An: "Harald Anlauf" > Cc: "Tobias Burnus" , "Bernhard Reutner-Fischer" > , "Harald Anlauf via Gcc-patches" > , "fortran" > Betreff: Re: [PATCH] PR fortran/100950 - ICE in > output_constructor_regular_field, at

*PING* [PATCH, part2] PR fortran/98411 [10/11/12 Regression] Pointless: Array larger than ‘-fmax-stack-var-size=’, ...

2021-08-11 Thread Harald Anlauf via Gcc-patches
*Ping* > Gesendet: Mittwoch, 04. August 2021 um 23:09 Uhr > Von: "Harald Anlauf" > An: "fortran" , "gcc-patches" > Betreff: [PATCH, part2] PR fortran/98411 [10/11/12 Regression] Pointless: > Array larger than ‘-fmax-stack-var-size=’, ... > > Dear all, > > here's the second part that should fix

Re: [PATCH] c++: Fix up parsing of attributes for using-directive

2021-08-11 Thread Jason Merrill via Gcc-patches
On 8/4/21 6:05 AM, Jakub Jelinek wrote: Hi! As I've said earlier and added xfails in gen-attrs-76.C test, https://eel.is/c++draft/namespace.udir#nt:using-directive has attribute-specifier-seq[opt] at the start, not at the end before ; as gcc is expecting. IMHO we should continue parsing at the e

Re: [PATCH] c++: parameterized requires-expr as default argument [PR101725]

2021-08-11 Thread Jason Merrill via Gcc-patches
On 8/3/21 4:04 PM, Patrick Palka wrote: Here we're rejecting the default template argument requires (T t) { x(t); } because we consider the 't' in the requirement to be a local variable (according to local_variable_p), and we generally forbid local variables from appearing inside template ar

Re: [patch][version 6] add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-08-11 Thread Qing Zhao via Gcc-patches
Hi, I met another issue for “address taken” auto variable, see below for details: the testing case: (gcc/testsuite/gcc.dg/uninit-16.c) int foo, bar; static void decode_reloc(int reloc, int *is_alt) { if (reloc >= 20) *is_alt = 1; else if (reloc >= 10) *is_alt = 0; } void

Re: [Patch v3 Fortran] Fix c_float128 and c_float128_complex on targets with 128-bit long double.

2021-08-11 Thread Michael Meissner via Gcc-patches
On Wed, Aug 11, 2021 at 05:55:39AM -0500, Segher Boessenkool wrote: > Hi! > > On Tue, Aug 10, 2021 at 04:46:11PM -0600, Sandra Loosemore wrote: > > OK. I used your wording verbatim for the first one. For the second > > one, I'm still pretty confused as I think it is at least theoretically > >

Re: [PATCH] c++: parameterized requires-expr as default argument [PR101725]

2021-08-11 Thread Jason Merrill via Gcc-patches
On 8/3/21 4:04 PM, Patrick Palka wrote: Here we're rejecting the default template argument requires (T t) { x(t); } because we consider the 't' in the requirement to be a local variable (according to local_variable_p), and we generally forbid local variables from appearing inside template ar

Re: [patch][version 6] add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-08-11 Thread Qing Zhao via Gcc-patches
Hi, I finally decided to take another approach to resolve this issue, it resolved all the potential issues with the “address taken” auto variable. The basic idea is to avoid generating the temporary variable in the beginning. As you mentioned, "The reason is that alt_reloc is memory (because i

gfortran.dg/PR82376.f90: Avoid matching a file-path.

2021-08-11 Thread Hans-Peter Nilsson via Gcc-patches
I had a file-path to sources with the substring "new" in it, and (only) this test regressed compared to results from another build without "new" in the name. The test does ! { dg-final { scan-tree-dump-times "new" 4 "original" } } i.e. the contents of the tree-dump-file .original needs to match t

Re: [PATCH] c++: suppress all warnings on memper pointers to work around dICE [PR101219]

2021-08-11 Thread Sergei Trofimovich via Gcc-patches
On Wed, 11 Aug 2021 15:19:58 -0400 Jason Merrill wrote: > On 8/6/21 11:34 AM, Sergei Trofimovich wrote: > > On Thu, 29 Jul 2021 11:41:39 -0400 > > Jason Merrill wrote: > > > >> On 7/22/21 7:15 PM, Sergei Trofimovich wrote: > >>> From: Sergei Trofimovich > >>> > >>> r12-1804 ("cp: add suppo

[committed] libstdc++: Fix test that fails randomly [PR101866]

2021-08-11 Thread Jonathan Wakely via Gcc-patches
This test assumes that the same sequence of three values cannot occur, which is incorect. It's unlikely, but not impossible. Perform the check in a loop, so that in the unlikely event of an identical sequence, we retry. If the library code is buggy it will keep producing the same sequence and the

Re: [PATCH] c++: constexpr std::construct_at on empty field [PR101663]

2021-08-11 Thread Jason Merrill via Gcc-patches
On 8/3/21 4:04 PM, Patrick Palka wrote: Here during constexpr evaluation of std::construct_at(&a._M_value) we find ourselves in cxx_eval_store_expression where the target object is 'a._M_value' and the initializer is {}. Since _M_value is an empty [[no_unique_address]] member we don't creat

Re: [PATCH] rs6000: Make some BIFs vectorized on P10

2021-08-11 Thread Kewen.Lin via Gcc-patches
Hi Bill, Thanks for your prompt review! on 2021/8/12 上午12:34, Bill Schmidt wrote: > Hi Kewen, > > FWIW, it's easier on reviewers if you include the patch inline instead of as > an attachment. > > On 8/11/21 1:56 AM, Kewen.Lin wrote: >> Hi, >> >> This patch is to add the support to make vectori

Re: [patch] Make -no-pie option work for native Windows

2021-08-11 Thread Jonathan Yong via Gcc-patches
On 8/11/21 2:21 PM, Eric Botcazou wrote: Hi, as already mentioned on the list, binutils 2.36 generates PIE executables by default on native Windows (because --dynamicbase is the default) so it makes sense to have a simple way to counter that and -no-pie seems appropriate, all the more so that it

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

2021-08-11 Thread Xionghu Luo via Gcc-patches
On 2021/8/11 17:16, Richard Biener wrote: On Wed, 11 Aug 2021, Xionghu Luo wrote: On 2021/8/10 22:47, Richard Biener wrote: On Mon, 9 Aug 2021, Xionghu Luo wrote: Thanks, On 2021/8/6 19:46, Richard Biener wrote: On Tue, 3 Aug 2021, Xionghu Luo wrote: loop split condition is moved be

[PATCH] [i386] Introduce a scalar version of avx512f_vmscalef and adjust ldexp3 for it.

2021-08-11 Thread liuhongt via Gcc-patches
Hi: This is the patch i'm going to checkin. Bootstrapped and regtested on x86_64-linux-gnu{-m32,}; 2021-08-12 Uros Bizjak gcc/ChangeLog: PR target/98309 * config/i386/i386.md (avx512f_scalef2): New define_insn. (ldexp3): Adjust for new define_insn.

Re: [PATCH] Extend ldexp{s, d}f3 to vscalefs{s, d} when TARGET_AVX512F and TARGET_SSE_MATH.

2021-08-11 Thread Hongtao Liu via Gcc-patches
On Wed, Aug 11, 2021 at 7:16 PM Uros Bizjak wrote: > > On Wed, Aug 11, 2021 at 8:36 AM Uros Bizjak wrote: > > > > On Tue, Aug 10, 2021 at 2:13 PM liuhongt wrote: > > > > > > Hi: > > > AVX512F supported vscalefs{s,d} which is the same as ldexp except the > > > second operand should be floating

Re: [PATCH] [i386] Introduce a scalar version of avx512f_vmscalef and adjust ldexp3 for it.

2021-08-11 Thread Hongtao Liu via Gcc-patches
On Thu, Aug 12, 2021 at 12:05 PM liuhongt wrote: > > Hi: > This is the patch i'm going to checkin. > Bootstrapped and regtested on x86_64-linux-gnu{-m32,}; > > > 2021-08-12 Uros Bizjak > > gcc/ChangeLog: > > PR target/98309 > * config/i386/i386.md (avx512f_scalef2): New >

[PATCH] [i386] Optimize vec_perm_expr to match vpmov{dw,qd,wb}.

2021-08-11 Thread liuhongt via Gcc-patches
Hi: This is another patch to optimize vec_perm_expr to match vpmov{dw,dq,wb} under AVX512. For scenarios(like pr101846-2.c) where the upper half is not used, this patch generates better code with only one vpmov{wb,dw,qd} instruction. For scenarios(like pr101846-3.c) where the upper half is actu