[PATCH] c++/103326 - fix ICE in tsubst with VECTOR_CST

2021-11-18 Thread Richard Biener via Gcc-patches
This adds missing handling of VECTOR_CST. Bootstrap and regtest pending on x86_64-unknown-linux-gnu, OK? Thanks, Richard. 2021-11-19 Richard Biener PR c++/103326 * pt.c (tsubst_copy): Handle VECTOR_CST. * g++.dg/pr103326.C: New testcase. --- gcc/cp/pt.c

Re: [PATCH] Don't allow mask/sse/mmx mov in TLS code sequences.

2021-11-18 Thread Uros Bizjak via Gcc-patches
On Fri, Nov 19, 2021 at 8:50 AM Uros Bizjak wrote: > > On Fri, Nov 19, 2021 at 2:14 AM liuhongt wrote: > > > > >Why is the above declared as a special memory constraint? Also the > > Change to define_memory_constraint since it's ok for > > reload can make them match by converting the operand to t

Re: [PATCH] Don't allow mask/sse/mmx mov in TLS code sequences.

2021-11-18 Thread Uros Bizjak via Gcc-patches
On Fri, Nov 19, 2021 at 2:14 AM liuhongt wrote: > > >Why is the above declared as a special memory constraint? Also the > Change to define_memory_constraint since it's ok for > reload can make them match by converting the operand to the form > ‘(mem (reg X))’.where X is a base register (from the r

Re: [PATCH] Fix PR 103317, ICE after PHI-OPT, minmax_replacement producing invalid SSA

2021-11-18 Thread Richard Biener via Gcc-patches
On Fri, Nov 19, 2021 at 2:54 AM apinski--- via Gcc-patches wrote: > > From: Andrew Pinski > > The problem is r12-5300-gf98f373dd822b35c allows phiopt to recognize more > basic blocks > but missed one location where the basic block does not need to be empty but > still > needs to have a single p

Re: [PATCH][wwwdocs] remove references to java in htdocs/projects/beginner.html

2021-11-18 Thread Gerald Pfeifer
On Thu, 18 Nov 2021, Eric Gallager wrote: > I'd find it easier to just edit the page linked to in wwwdocs instead, > so I'm going to start seeing what I can do to update it. I figured I'd > start by removing the references to Java in it, since Java has been > removed. A patch to do that is attac

[PATCH] Fix tree-optimization/103314 : Limit folding of (type) X op CST where type is a nop convert to gimple

2021-11-18 Thread apinski--- via Gcc-patches
From: Andrew Pinski There is some re-association code in fold_binary which conflicts with this optimization due keeping around some "constants" which are not INTEGER_CST (1 << -1) so we end up in an infinite loop because of that. So we need to limit this case to GIMPLE level only. OK? Bootstrapp

Re: [PATCH] regrename: Skip renaming if instruction is noop move.

2021-11-18 Thread Jojo R via Gcc-patches
— Jojo 在 2021年11月19日 +0800 AM12:13,Jeff Law ,写道: > > > On 11/16/2021 7:20 PM, Jojo R via Gcc-patches wrote: > > — Jojo > > 在 2021年11月16日 +0800 PM8:12,Richard Biener ,写道: > > > On Tue, Nov 16, 2021 at 12:45 PM Jojo R via Gcc-patches > > > wrote: > > > > Skip renaming if instruction is noop move,

Re: [PING^2 PATCH] rs6000: Add optimizations for _mm_sad_epu8

2021-11-18 Thread Paul A. Clarke via Gcc-patches
On Mon, Nov 08, 2021 at 11:43:26AM -0600, Paul A. Clarke via Gcc-patches wrote: > Gentle ping... Gentle re-ping. > On Fri, Oct 22, 2021 at 12:28:49PM -0500, Paul A. Clarke via Gcc-patches > wrote: > > Power9 ISA added `vabsdub` instruction which is realized in the > > `vec_absd` instrinsic. > >

Re: [PING^2 PATCH] rs6000: Add Power10 optimization for most _mm_movemask*

2021-11-18 Thread Paul A. Clarke via Gcc-patches
On Mon, Nov 08, 2021 at 11:42:56AM -0600, Paul A. Clarke via Gcc-patches wrote: > Gentle ping... Gentle re-ping. > On Thu, Oct 21, 2021 at 12:22:12PM -0500, Paul A. Clarke via Gcc-patches > wrote: > > Power10 ISA added `vextract*` instructions which are realized in the > > `vec_extractm` instrin

Re: [PING^2 PATCH] rs6000: Add Power10 optimization for _mm_blendv*

2021-11-18 Thread Paul A. Clarke via Gcc-patches
On Mon, Nov 08, 2021 at 11:42:27AM -0600, Paul A. Clarke via Gcc-patches wrote: > Gentle ping... Gentile re-ping. > On Wed, Oct 20, 2021 at 08:42:07PM -0500, Paul A. Clarke via Gcc-patches > wrote: > > Power10 ISA added `xxblendv*` instructions which are realized in the > > `vec_blendv` instrins

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

2021-11-18 Thread Paul A. Clarke via Gcc-patches
On Mon, Nov 08, 2021 at 11:40:42AM -0600, Paul A. Clarke via Gcc-patches wrote: > On Tue, Oct 26, 2021 at 03:00:11PM -0500, Paul A. Clarke via Gcc-patches > wrote: > > Patches 1/3 and 3/3 have been committed. > > This is only a ping for 2/3. > > Gentle re-ping. Gentle re-re-ping. > > On Mon, Oc

Re: [PATCH] c++: nested lambda capturing a capture proxy [PR94376]

2021-11-18 Thread Jason Merrill via Gcc-patches
On 11/18/21 17:48, Patrick Palka wrote: On Thu, 18 Nov 2021, Jason Merrill wrote: On 11/2/21 14:06, Patrick Palka wrote: Here when determining the type of the FIELD_DECL for the by-value capture of 'i' in the inner lambda, we incorrectly give it the type const int instead of int since the effe

Re: [PATCH v2] c++: Implement -Wuninitialized for mem-initializers (redux) [PR19808]

2021-11-18 Thread Jason Merrill via Gcc-patches
On 11/18/21 19:24, Marek Polacek wrote: On Thu, Nov 18, 2021 at 05:10:47PM -0500, Jason Merrill wrote: On 11/8/21 18:41, Marek Polacek wrote: @@ -1311,13 +1462,25 @@ emit_mem_initializers (tree mem_inits) if (!COMPLETE_TYPE_P (current_class_type)) return; + /* Keep a set holding fi

[PATCH v2] [AARCH64] Fix PR target/103100 -mstrict-align and memset on not aligned buffers

2021-11-18 Thread apinski--- via Gcc-patches
From: Andrew Pinski The problem here is that aarch64_expand_setmem does not change the alignment for strict alignment case. This is a simplified patch from what I had previously. So constraining copy_limit to the alignment of the mem in the case of strict align fixes the issue without checking

[PATCH] Fix PR 103317, ICE after PHI-OPT, minmax_replacement producing invalid SSA

2021-11-18 Thread apinski--- via Gcc-patches
From: Andrew Pinski The problem is r12-5300-gf98f373dd822b35c allows phiopt to recognize more basic blocks but missed one location where the basic block does not need to be empty but still needs to have a single predecessor. This patch fixes that over sight. OK? Bootstrapped and tested on x86_

[PATCH][wwwdocs] remove references to java in htdocs/projects/beginner.html

2021-11-18 Thread Eric Gallager via Gcc-patches
So, on the wiki page for EasyHacks , it says: "There is also a non-wiki list of beginner projects at http://gcc.gnu.org/projects/beginner.html, however, it is very outdated and the projects are not that easy." Since I don't have an account on the wiki (since crea

[PATCH] Don't allow mask/sse/mmx mov in TLS code sequences.

2021-11-18 Thread liuhongt via Gcc-patches
>Why is the above declared as a special memory constraint? Also the Change to define_memory_constraint since it's ok for reload can make them match by converting the operand to the form ‘(mem (reg X))’.where X is a base register (from the register class specified by BASE_REG_CLASS >predicate comme

Re: [PATCH v2] c++: Implement -Wuninitialized for mem-initializers (redux) [PR19808]

2021-11-18 Thread Marek Polacek via Gcc-patches
On Thu, Nov 18, 2021 at 05:10:47PM -0500, Jason Merrill wrote: > On 11/8/21 18:41, Marek Polacek wrote: > > @@ -1311,13 +1462,25 @@ emit_mem_initializers (tree mem_inits) > > if (!COMPLETE_TYPE_P (current_class_type)) > > return; > > + /* Keep a set holding fields that are not initialize

[committed] d: Use HOST_WIDE_INT for type size temporaries.

2021-11-18 Thread Iain Buclaw via Gcc-patches
Hi, This patch fixes an issue with bootstrap on x86_64-darwin when building with --enable-werror. These couple variables are later used as the value for the format specifier `%wd`, to which the expected type may not match dinteger_t, causing unnecessary -Wformat warnings. Bootstrapped and regres

Re: [PATCH 2/6] Add returns_zero_on_success/failure attributes

2021-11-18 Thread David Malcolm via Gcc-patches
On Thu, 2021-11-18 at 14:08 -0600, Segher Boessenkool wrote: > On Wed, Nov 17, 2021 at 10:43:58PM +, Joseph Myers wrote: > > On Wed, 17 Nov 2021, Prathamesh Kulkarni via Gcc-patches wrote: > > > More generally, would it be a good idea to provide attributes for > > > mod/ref anaylsis ? > > > So

Re: [PATCH] coroutines: Handle initial awaiters with non-void returns [PR 100127].

2021-11-18 Thread Iain Sandoe
> On 18 Nov 2021, at 22:13, Jason Merrill via Gcc-patches > wrote: > > On 11/5/21 11:46, Iain Sandoe wrote: >> The way in which a C++20 coroutine is specified discards any value >> that might be returned from the initial or final await expressions. >> This PR ICE was caused by an initial awai

Re: [PATCH 2/6] Add returns_zero_on_success/failure attributes

2021-11-18 Thread David Malcolm via Gcc-patches
On Wed, 2021-11-17 at 22:43 +, Joseph Myers wrote: > On Wed, 17 Nov 2021, Prathamesh Kulkarni via Gcc-patches wrote: > > > More generally, would it be a good idea to provide attributes for > > mod/ref anaylsis ? > > So sth like: > > void foo(void) __attribute__((modifies(errno))); > > which wo

Re: [PATCH 2/6] Add returns_zero_on_success/failure attributes

2021-11-18 Thread David Malcolm via Gcc-patches
On Wed, 2021-11-17 at 14:53 +0530, Prathamesh Kulkarni wrote: > On Tue, 16 Nov 2021 at 03:42, David Malcolm > wrote: > > > > On Mon, 2021-11-15 at 12:33 +0530, Prathamesh Kulkarni wrote: > > > On Sun, 14 Nov 2021 at 02:07, David Malcolm via Gcc-patches > > > wrote: > > > > > > > > This patch ad

Re: [PATCH] c++: Implement C++23 P0849R8 - auto(x) [PR103049]

2021-11-18 Thread Marek Polacek via Gcc-patches
On Thu, Nov 18, 2021 at 05:36:45PM -0500, Jason Merrill wrote: > On 11/4/21 16:26, Marek Polacek wrote: > > This patch implements P0849R8 which allows auto in a functional cast, > > the result of which is a prvalue. > > > > [expr.type.conv]/1 says that the type is determined by placeholder type >

Re: [PATCH] c++: nested lambda capturing a capture proxy [PR94376]

2021-11-18 Thread Patrick Palka via Gcc-patches
On Thu, 18 Nov 2021, Jason Merrill wrote: > On 11/2/21 14:06, Patrick Palka wrote: > > Here when determining the type of the FIELD_DECL for the by-value > > capture of 'i' in the inner lambda, we incorrectly give it the > > type const int instead of int since the effective initializer is > > the p

Re: [PATCH] c++: Implement C++23 P0849R8 - auto(x) [PR103049]

2021-11-18 Thread Jason Merrill via Gcc-patches
On 11/4/21 16:26, Marek Polacek wrote: This patch implements P0849R8 which allows auto in a functional cast, the result of which is a prvalue. [expr.type.conv]/1 says that the type is determined by placeholder type deduction. We only accept 'auto', not 'decltype(auto)' -- that the type shall be

Re: [PATCH] c++, v2: Fix up -fstrong-eval-order handling of call arguments [PR70796]

2021-11-18 Thread Jason Merrill via Gcc-patches
On 11/5/21 06:07, Jakub Jelinek wrote: On Thu, Nov 04, 2021 at 03:07:57PM +0100, Jakub Jelinek via Gcc-patches wrote: For the METHOD_TYPE first argument I use a temporary always though, that should be always is_gimple_reg_type... Doing so regressed +FAIL: g++.dg/cpp1z/inh-ctor23.C -std=gnu++1

Re: [PATCH] c++: nested lambda capturing a capture proxy [PR94376]

2021-11-18 Thread Jason Merrill via Gcc-patches
On 11/2/21 14:06, Patrick Palka wrote: Here when determining the type of the FIELD_DECL for the by-value capture of 'i' in the inner lambda, we incorrectly give it the type const int instead of int since the effective initializer is the proxy for the outer capture, and this proxy is const qualifi

Re: [PATCH] c++: implicit dummy object in requires clause [PR103198]

2021-11-18 Thread Jason Merrill via Gcc-patches
On 11/18/21 14:49, Patrick Palka wrote: On Thu, 18 Nov 2021, Jason Merrill wrote: On 11/17/21 14:52, Patrick Palka wrote: On Wed, 17 Nov 2021, Jason Merrill wrote: On 11/11/21 20:25, Patrick Palka wrote: In the testcase below satisfaction misbehaves for f and g ultimately because find_templ

Re: [PATCH] coroutines: Handle initial awaiters with non-void returns [PR 100127].

2021-11-18 Thread Jason Merrill via Gcc-patches
On 11/5/21 11:46, Iain Sandoe wrote: The way in which a C++20 coroutine is specified discards any value that might be returned from the initial or final await expressions. This PR ICE was caused by an initial await expression with an await_resume () returning a reference, the function rewrite co

Re: [PATCH v2] c++: Implement -Wuninitialized for mem-initializers (redux) [PR19808]

2021-11-18 Thread Jason Merrill via Gcc-patches
On 11/8/21 18:41, Marek Polacek wrote: On Sun, Nov 07, 2021 at 12:45:24AM -0400, Jason Merrill wrote: On 11/5/21 19:22, Marek Polacek wrote: 2021 update: Last year I posted a version of this patch: but it didn't make it in.

[PATCH][_GLIBCXX_DEBUG] Limit performance impact in __erase_nodes_if

2021-11-18 Thread François Dumont via Gcc-patches
Hi     Here is a proposal to limit performance impact of _GLIBCXX_DEBUG mode on __erase_nodes_if.     As you can see I am adding erase overloads on the Debug container to accept base iterators. So it exposes an additional non-Standard method, do you think it is any issue.     Note that I'v

Re: [PATCH] rs6000: Builtins test changes for BFP scalar tests

2021-11-18 Thread Bill Schmidt via Gcc-patches
Hi! On 11/18/21 3:32 PM, Segher Boessenkool wrote: > On Thu, Nov 18, 2021 at 03:30:48PM -0600, Bill Schmidt wrote: >> On 11/18/21 3:16 PM, Segher Boessenkool wrote: >>> Hi! >>> >>> On Wed, Nov 17, 2021 at 05:06:05PM -0600, Bill Schmidt wrote: > I don't like that at all. The user didn't write

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

2021-11-18 Thread Joseph Myers
On Thu, 18 Nov 2021, Jakub Jelinek via Gcc-patches wrote: > Are we handling the pragma at a wrong phase of preprocessing? I think that converting it to a single preprocessing token (rather than four separate preprocessing tokens), at a stage when stringizing might still occur, does indicate it'

Re: [PATCH 3/4] Darwin : Allow for configuring Darwin to use embedded runpath.

2021-11-18 Thread Joseph Myers
On Wed, 17 Nov 2021, Iain Sandoe via Gcc-patches wrote: > If we are going to try and reconcile GCC’s local libtool for more > generic Darwin use, then I fear that is going to take quite significant > work over a period of time (since it will need much more wide testing > than GCC). The goal is

[r12-5378 Regression] FAIL: gcc.target/i386/avx512fp16-vector-complex-float.c scan-assembler-times vfmaddcph[ \\t] 1 on Linux/x86_64

2021-11-18 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, 4f0a2f5a3ddb1024b885c066a18caae4d733bb6c is the first bad commit commit 4f0a2f5a3ddb1024b885c066a18caae4d733bb6c Author: Tamar Christina Date: Thu Nov 18 17:10:36 2021 + middle-end: check that both sides of complex expression is a mul. caused FAIL: gcc.target/i386/av

[PATCH v2] Do not abort compilation when dump file is /dev/*

2021-11-18 Thread Giuliano Belinassi via Gcc-patches
The `configure` scripts generated with autoconf often tests compiler features by setting output to `/dev/null`, which then sets the dump folder as being /dev/* and the compilation halts with an error because GCC cannot create files in /dev/. This is a problem when configure is testing for compiler

Re: [PATCH] rs6000: Builtins test changes for BFP scalar tests

2021-11-18 Thread Segher Boessenkool
On Thu, Nov 18, 2021 at 03:30:48PM -0600, Bill Schmidt wrote: > > On 11/18/21 3:16 PM, Segher Boessenkool wrote: > > Hi! > > > > On Wed, Nov 17, 2021 at 05:06:05PM -0600, Bill Schmidt wrote: > >>> I don't like that at all. The user didn't write the _vsx thing, and it > >>> isn't documented either

Re: [PATCH] rs6000: Builtins test changes for BFP scalar tests

2021-11-18 Thread Bill Schmidt via Gcc-patches
On 11/18/21 3:16 PM, Segher Boessenkool wrote: > Hi! > > On Wed, Nov 17, 2021 at 05:06:05PM -0600, Bill Schmidt wrote: >>> I don't like that at all. The user didn't write the _vsx thing, and it >>> isn't documented either (neither is the _vec one, but that is a separate >>> issue, specific to th

Re: [PATCH] rs6000: Builtins test changes for byte-in-set-2.c

2021-11-18 Thread Segher Boessenkool
On Thu, Nov 18, 2021 at 07:42:34AM -0600, Bill Schmidt wrote: > gcc/testsuite/ > * gcc.target/powerpc/byte-in-set-2.c: Adjust error message. "Adjust expected error message" maybe? Okay for trunk. Thanks! Segher

Re: [PATCH] rs6000: Builtins test changes for BFP scalar tests

2021-11-18 Thread Segher Boessenkool
On Thu, Nov 18, 2021 at 07:32:27AM -0600, Bill Schmidt wrote: > >>> error: '__builtin_vsx_scalar_extract_sig' requires the '-mcpu=power9' > >>> option and either the '-m64' or '-mpowerpc64' option > >>> note: builtin '__builtin_vec_scalar_extract_sig' requires builtin > >>> '__builtin_vsx_sca

Re: [PATCH] rs6000: Builtins test changes for BFP scalar tests

2021-11-18 Thread Segher Boessenkool
Hi! On Wed, Nov 17, 2021 at 05:06:05PM -0600, Bill Schmidt wrote: > > I don't like that at all. The user didn't write the _vsx thing, and it > > isn't documented either (neither is the _vec one, but that is a separate > > issue, specific to this builtin). > > I feel like I haven't explained this

Re: [PATCH] c++: designated init of char array by string constant [PR55227]

2021-11-18 Thread will wray via Gcc-patches
V2 Patch mailing list post https://gcc.gnu.org/pipermail/gcc-patches/2021-November/584897.html On Thu, Nov 18, 2021 at 10:36 AM Marek Polacek wrote: > > On Wed, Nov 17, 2021 at 10:23:58PM -0500, will wray wrote: > > V2 Patch > > https://gcc.gnu.org/bugzilla/attachment.cgi?id=51828 > > Can you ple

[PATCH v2] c++: designated init of char array by string constant [PR55227]

2021-11-18 Thread Will Wray via Gcc-patches
Also address "FIXME: this code is duplicated from reshape_init" in cp_complete_array_type by always calling reshape_init on init-list. PR c++/55227 gcc/cp/ChangeLog: * decl.c (reshape_init_r): Only call has_designator_check when first_initializer_p or for the inner constru

Re: [PATCH 2/6] Add returns_zero_on_success/failure attributes

2021-11-18 Thread Segher Boessenkool
On Wed, Nov 17, 2021 at 10:43:58PM +, Joseph Myers wrote: > On Wed, 17 Nov 2021, Prathamesh Kulkarni via Gcc-patches wrote: > > More generally, would it be a good idea to provide attributes for > > mod/ref anaylsis ? > > So sth like: > > void foo(void) __attribute__((modifies(errno))); > > whic

Re: [PATCH] c++: implicit dummy object in requires clause [PR103198]

2021-11-18 Thread Patrick Palka via Gcc-patches
On Thu, 18 Nov 2021, Jason Merrill wrote: > On 11/17/21 14:52, Patrick Palka wrote: > > On Wed, 17 Nov 2021, Jason Merrill wrote: > > > > > On 11/11/21 20:25, Patrick Palka wrote: > > > > In the testcase below satisfaction misbehaves for f and g ultimately > > > > because find_template_parameters

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

2021-11-18 Thread Hafiz Abid Qadeer
On 02/11/2021 16:27, Jakub Jelinek wrote: > On Fri, Oct 22, 2021 at 02:05:02PM +0100, Hafiz Abid Qadeer wrote: >> This patch adds support for OpenMP 5.0 allocate clause for fortran. It does >> not >> yet support the allocator-modifier as specified in OpenMP 5.1. The allocate >> clause is already s

[PATCH] PR tree-optimization/103254 - Limit depth for all GORI expressions.

2021-11-18 Thread Andrew MacLeod via Gcc-patches
At issue here is the dynamic approach we currently use for outgoing edge calculations.  It isn't normally a problem, but once you get a very large number of possible outgoing values (ie very long unrolled blocks) with pairs of values on a statement, and individual queries for each one, it becom

Re: [PATCH] c++: cp_walk_subtrees simplification for *_CAST_EXPR

2021-11-18 Thread Jason Merrill via Gcc-patches
On 11/18/21 13:47, Patrick Palka wrote: Let walk_tree_1 do the operand walking for us. Bootstrap and regtest on x86_64-pc-linux-gnu in progress, does this look OK for trunk if successful? OK. gcc/cp/ChangeLog: * tree.c (cp_walk_subtrees) : Simplify. --- gcc/cp/tree.c | 7 ---

Re: [PATCH] c++: implicit dummy object in requires clause [PR103198]

2021-11-18 Thread Jason Merrill via Gcc-patches
On 11/17/21 14:52, Patrick Palka wrote: On Wed, 17 Nov 2021, Jason Merrill wrote: On 11/11/21 20:25, Patrick Palka wrote: In the testcase below satisfaction misbehaves for f and g ultimately because find_template_parameters fails to notice that the constraint 'val.x' depends on the template pa

Re: [RFC] c++: Print function template parms when relevant (was: [PATCH v4] c++: Add gnu::diagnose_as attribute)

2021-11-18 Thread Jason Merrill via Gcc-patches
On 11/17/21 17:51, Matthias Kretz wrote: On Wednesday, 17 November 2021 19:25:46 CET Jason Merrill wrote: On 11/17/21 04:04, Matthias Kretz wrote: On Wednesday, 17 November 2021 07:09:18 CET Jason Merrill wrote: - if (CHECKING_P) -SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT (a, TREE_VEC_LENGTH (a

Re: [PATCH] Fix rs6000 predicates.md use of decl_replaceable_p

2021-11-18 Thread Jan Hubicka via Gcc-patches
> On Thu, Nov 18, 2021 at 2:07 PM Jan Hubicka wrote: > > > > > --- a/gcc/config/rs6000/predicates.md > > > +++ b/gcc/config/rs6000/predicates.md > > > @@ -1086,7 +1086,9 @@ (define_predicate "current_file_function_operand" > > > (match_test "(DEFAULT_ABI != ABI_AIX || SYMBOL_REF_FUNCTION_P

Re: [PATCH] Fix rs6000 predicates.md use of decl_replaceable_p

2021-11-18 Thread David Edelsohn via Gcc-patches
On Thu, Nov 18, 2021 at 2:07 PM Jan Hubicka wrote: > > > --- a/gcc/config/rs6000/predicates.md > > +++ b/gcc/config/rs6000/predicates.md > > @@ -1086,7 +1086,9 @@ (define_predicate "current_file_function_operand" > > (match_test "(DEFAULT_ABI != ABI_AIX || SYMBOL_REF_FUNCTION_P (op)) > >

Re: [PATCH] Fix rs6000 predicates.md use of decl_replaceable_p

2021-11-18 Thread Jan Hubicka via Gcc-patches
> --- a/gcc/config/rs6000/predicates.md > +++ b/gcc/config/rs6000/predicates.md > @@ -1086,7 +1086,9 @@ (define_predicate "current_file_function_operand" > (match_test "(DEFAULT_ABI != ABI_AIX || SYMBOL_REF_FUNCTION_P (op)) > && (SYMBOL_REF_LOCAL_P (op) >

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

2021-11-18 Thread Richard Sandiford via Gcc-patches
Richard Biener writes: > On Tue, Nov 16, 2021 at 4:51 PM Richard Sandiford > wrote: >> >> Richard Biener writes: >> > 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 g

Re: [PATCH][V4] rs6000: Remove unnecessary option manipulation.

2021-11-18 Thread Segher Boessenkool
Hi! On Thu, Nov 18, 2021 at 01:45:30PM +0100, Martin Liška wrote: > @Segher: PING This is the first time I recieved this. Please resend, without line wrapping (format=flawed). Segher

[PATCH] c++: cp_walk_subtrees simplification for *_CAST_EXPR

2021-11-18 Thread Patrick Palka via Gcc-patches
Let walk_tree_1 do the operand walking for us. Bootstrap and regtest on x86_64-pc-linux-gnu in progress, does this look OK for trunk if successful? gcc/cp/ChangeLog: * tree.c (cp_walk_subtrees) : Simplify. --- gcc/cp/tree.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/gcc/c

[PATCH] Fix rs6000 predicates.md use of decl_replaceable_p

2021-11-18 Thread David Edelsohn via Gcc-patches
--- a/gcc/config/rs6000/predicates.md +++ b/gcc/config/rs6000/predicates.md @@ -1086,7 +1086,9 @@ (define_predicate "current_file_function_operand" (match_test "(DEFAULT_ABI != ABI_AIX || SYMBOL_REF_FUNCTION_P (op)) && (SYMBOL_REF_LOCAL_P (op) ||

Re: [PATCH] IPA: fix reproducibility in IPA MOD REF

2021-11-18 Thread Jan Hubicka via Gcc-patches
> > > > > > Isn't problem that the following code > > > > > >past_flags.reserve_exact (summary->arg_flags.length ()); > > >past_flags.splice (summary->arg_flags); > > >past_retslot_flags = summary->retslot_flags; > > > > Aha, that makes sense. Sorr

Re: [PATCH] IPA: fix reproducibility in IPA MOD REF

2021-11-18 Thread Martin Liška
On 11/18/21 19:29, Jan Hubicka wrote: On 11/18/21 19:22, Jan Hubicka wrote: Supported LTO compression algorithms: zlib zstd gcc version 12.0.0 2028 (experimental) (GCC) /usr/bin/ld: ./xxx.ltrans0.ltrans.o: warning: relocation against `lm_read_ctl_dict_size_n_lmclass_used' in read

Re: [PATCH] IPA: fix reproducibility in IPA MOD REF

2021-11-18 Thread Jan Hubicka via Gcc-patches
> On 11/18/21 19:22, Jan Hubicka wrote: > > > Supported LTO compression algorithms: zlib zstd > > > gcc version 12.0.0 2028 (experimental) (GCC) > > > /usr/bin/ld: ./xxx.ltrans0.ltrans.o: warning: relocation against > > > `lm_read_ctl_dict_size_n_lm

Re: [PATCH] IPA: fix reproducibility in IPA MOD REF

2021-11-18 Thread Martin Liška
On 11/18/21 19:22, Jan Hubicka wrote: Supported LTO compression algorithms: zlib zstd gcc version 12.0.0 2028 (experimental) (GCC) /usr/bin/ld: ./xxx.ltrans0.ltrans.o: warning: relocation against `lm_read_ctl_dict_size_n_lmclass_used' in read-only section `.text' /usr/bin/ld: ./x

Re: [PATCH] IPA: fix reproducibility in IPA MOD REF

2021-11-18 Thread Jan Hubicka via Gcc-patches
> Supported LTO compression algorithms: zlib zstd > gcc version 12.0.0 2028 (experimental) (GCC) > /usr/bin/ld: ./xxx.ltrans0.ltrans.o: warning: relocation against > `lm_read_ctl_dict_size_n_lmclass_used' in read-only section `.text' > /usr/bin/ld: ./xxx.ltr

Re: [PATCH] IPA: fix reproducibility in IPA MOD REF

2021-11-18 Thread Martin Liška
x=/home/marxin/bin/gcc --disable-multilib --enable-host-shared --disable-libsanitizer --enable-valgrind-annotations --disable-bootstrap Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 12.0.0 2028 (experimental) (GCC) /usr/bin/ld: ./xxx.ltrans0.ltrans.o: warni

Re: [PATCH] IPA: fix reproducibility in IPA MOD REF

2021-11-18 Thread Jan Hubicka via Gcc-patches
> Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Ready to be installed? > Thanks, > Martin > > gcc/ChangeLog: > > * ipa-modref.c (analyze_function): Do not execute the code > only if dump_file != NULL. > --- > gcc/ipa-modref.c | 14 +++--- > 1 fil

Re: [PATCH] IPA: use cgraph_node instance

2021-11-18 Thread Jan Hubicka via Gcc-patches
> Hi. > > This is a refactoring I noticed. > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Ready to be installed? > Thanks, > Martin > > gcc/ChangeLog: > > * ipa-modref.c (analyze_function): Use fnode instead of repeated > cgraph_node::get (current_fu

[PATCH] IPA: fix reproducibility in IPA MOD REF

2021-11-18 Thread Martin Liška
Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin gcc/ChangeLog: * ipa-modref.c (analyze_function): Do not execute the code only if dump_file != NULL. --- gcc/ipa-modref.c | 14 +++--- 1 file changed, 7 insertio

[PATCH] IPA: use cgraph_node instance

2021-11-18 Thread Martin Liška
Hi. This is a refactoring I noticed. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin gcc/ChangeLog: * ipa-modref.c (analyze_function): Use fnode instead of repeated cgraph_node::get (current_function_decl). --- gcc/

Re: [PATCH] options: Make -Ofast switch off -fsemantic-interposition

2021-11-18 Thread Jan Hubicka via Gcc-patches
> Hi, > > On Fri, Nov 12 2021, Martin Jambor wrote: > > Hi, > > > > using -fno-semantic-interposition has been reported by various people > > to bring about considerable speed up at the cost of strict compliance > > to the ELF symbol interposition rules See for example > > https://fedoraproject.o

Re: [PATCH] Fix IPA modref ubsan.

2021-11-18 Thread Jan Hubicka via Gcc-patches
> > > I don't know what the guidance is on using vec in IPA passes > > > but with respect to existing practice elsewhere, there are > > > existing uses of vec and auto_vec with non-POD types and vec > > > does work with them (see the vec_default_construct and > > > vec_copy_construct templates, fo

Re: [PATCH] middle-end: check that both sides of complex expression is a mul.

2021-11-18 Thread Richard Biener via Gcc-patches
On November 18, 2021 5:57:45 PM GMT+01:00, Tamar Christina wrote: >Hi All, > >Both sides of the VEC_PERM_EXPR need to be a MULT but the check >was accidentally checking if both sides are a mul. > >The FMS case would be handled by the validate_multiplication but >this makes the requirement more ex

[PATCH] middle-end: check that both sides of complex expression is a mul.

2021-11-18 Thread Tamar Christina via Gcc-patches
Hi All, Both sides of the VEC_PERM_EXPR need to be a MULT but the check was accidentally checking if both sides are a mul. The FMS case would be handled by the validate_multiplication but this makes the requirement more explicit and we exit earlier. Bootstrapped Regtested on aarch64-none-linux-g

Summary of outstanding builtins infrastructure patches

2021-11-18 Thread Bill Schmidt via Gcc-patches
Hi! Thanks for all the recent reviews and conversations on the builtins infrastructure patches. I've posted a lot of stuff in the last couple of days, so I thought it might be useful to summarize which patches still need review. No rush, just trying to make it easier to consume... https://gcc.g

Re: [PATCH] Fix IPA modref ubsan.

2021-11-18 Thread Martin Sebor via Gcc-patches
On 11/18/21 9:22 AM, Jan Hubicka wrote: On 11/18/21 5:41 AM, Jan Hubicka via Gcc-patches wrote: modref_tree::merge(modref_tree*, vec*, modref_parm_map*, bool) is called with modref_parm_map chain_map; The variable has uninitialized m.parm_offset_known and it is accessed here: gcc/ipa-modref-t

[PATCH] rs6000: Builtins test changes for test_fpscr_[d]rn_builtin_error.c

2021-11-18 Thread Bill Schmidt via Gcc-patches
Hi! This is the last patch broken out of the previous test suite patch for the new builtins support. One advantage of the new builtins support is uniform error messages for arguments with restricted values. Previously this was done in many places in an ad hoc manner, with little uniformity. Thi

Re: [PATCH] rs6000: Builtin test changes for int_128bit-runnable.c

2021-11-18 Thread Bill Schmidt via Gcc-patches
Hi! On 11/18/21 10:22 AM, Segher Boessenkool wrote: > On Thu, Nov 18, 2021 at 10:09:53AM -0600, Bill Schmidt wrote: >> Hi!  This patch is broken out from the test case patch for the new builtins >> support. >> >> The old builtins code performs gimple folding on 128-bit compares. This >> results

Re: [PATCH] Fix tree-optimization/103257: Missed jump threading due too early conversion of bool*A into bool?A:0

2021-11-18 Thread Jeff Law via Gcc-patches
On 11/17/2021 1:00 AM, apinski--- via Gcc-patches wrote: From: Andrew Pinski So like many optimizations on the gimple level, sometimes it makes sense to do the optimization early or later. In this case, creating a cond expression early causes other optimizations to be missed. So just disa

Re: [PATCH 3/3] elf: Add _dl_find_eh_frame function

2021-11-18 Thread Florian Weimer via Gcc-patches
* Jakub Jelinek: > dl_iterate_phdr is declared in link.h and without the _ prefix, shouldn't > dl_find_eh_frame follow the suit and be declared in the same header and > also without the prefix? We need to use the _ prefix due to this bug: dl_iterate_phdr namespace violation

Re: [PATCH] rs6000: Builtin test changes for int_128bit-runnable.c

2021-11-18 Thread Segher Boessenkool
On Thu, Nov 18, 2021 at 10:09:53AM -0600, Bill Schmidt wrote: > Hi!  This patch is broken out from the test case patch for the new builtins > support. > > The old builtins code performs gimple folding on 128-bit compares. This > results in correct but very inefficient code. (I suspect we may be

Re: [PATCH] Fix IPA modref ubsan.

2021-11-18 Thread Jan Hubicka via Gcc-patches
> On 11/18/21 5:41 AM, Jan Hubicka via Gcc-patches wrote: > > > modref_tree::merge(modref_tree*, > > > vec*, modref_parm_map*, bool) > > > > > > is called with modref_parm_map chain_map; > > > > > > The variable has uninitialized m.parm_offset_known and it is accessed > > > here: > > > > > > gc

[PATCH] rs6000: Builtins test changes for pragma_misc9.c

2021-11-18 Thread Bill Schmidt via Gcc-patches
Hi! This patch is broken out from the test suite patch for the new builtins support. This one is just a minor adjustment for the error message wording. Tested on powerpc64le-linux-gnu and powerpc64-linux-gnu (-m32/-m64) with no regressions. Is this okay for trunk? Thanks! Bill 2021-11-17 Bi

Re: [PATCH v3] x86: Add -mindirect-branch-cs-prefix

2021-11-18 Thread Uros Bizjak via Gcc-patches
On Thu, Nov 18, 2021 at 3:24 PM H.J. Lu wrote: > > On Thu, Nov 18, 2021 at 12:25 AM Uros Bizjak wrote: > > > > On Wed, Nov 17, 2021 at 2:47 PM H.J. Lu wrote: > > > > > > Add -mindirect-branch-cs-prefix to add CS prefix to call and jmp to thunk > > > via r8-r15 registers when converting indirect

[committed] libstdc++: Fix std::char_traits::move for constexpr

2021-11-18 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux (and with Clang), pushed to trunk. This should be backported to gcc-11 and gcc-10 too. The constexpr branch in __gnu_cxx::char_traits::move compares the string arguments to see if they overlap, but relational comparisons between unrelated pointers are not core constant ex

[PATCH] rs6000: Builtins test changes for pr80315-*.c, pr88100.c

2021-11-18 Thread Bill Schmidt via Gcc-patches
Hi! This patch is broken out from the test case patch for the new builtins support. One advantage of the new builtins support is uniform error messages for arguments with restricted values. Previously this was done in many places in an ad hoc manner, with little uniformity. This patch adjusts t

Re: [PATCH] regrename: Skip renaming if instruction is noop move.

2021-11-18 Thread Jeff Law via Gcc-patches
On 11/16/2021 7:20 PM, Jojo R via Gcc-patches wrote: — Jojo 在 2021年11月16日 +0800 PM8:12,Richard Biener ,写道: On Tue, Nov 16, 2021 at 12:45 PM Jojo R via Gcc-patches wrote: Skip renaming if instruction is noop move, and it will been removed for performance. Is there any (target specific) test

[PATCH] rs6000: Builtin test changes for int_128bit-runnable.c

2021-11-18 Thread Bill Schmidt via Gcc-patches
Hi!  This patch is broken out from the test case patch for the new builtins support. The old builtins code performs gimple folding on 128-bit compares. This results in correct but very inefficient code. (I suspect we may be missing some optab entries, misleading gimple into 64-bit emulation.)

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

2021-11-18 Thread Jason Merrill via Gcc-patches
On 11/18/21 10:31, Patrick Palka wrote: On Thu, 18 Nov 2021, Patrick Palka wrote: On Thu, 18 Nov 2021, Jason Merrill wrote: On 11/10/21 11:53, Patrick Palka wrote: Here when partially instantiating the call get(T{}) with T=N::A (for which earlier unqualified name lookup for 'get' found nothi

Re: [PATCH] restore ancient -Waddress for weak symbols [PR33925]

2021-11-18 Thread Jason Merrill via Gcc-patches
On 11/17/21 20:27, Martin Sebor wrote: On 11/17/21 12:21 PM, Martin Sebor wrote: On 11/17/21 11:31 AM, Jason Merrill wrote: On 11/16/21 20:11, Martin Sebor wrote: On 11/16/21 1:23 PM, Jason Merrill wrote: On 10/23/21 19:06, Martin Sebor wrote: On 10/4/21 3:37 PM, Jason Merrill wrote: On 10/

[committed] Fix MIPS test after recent match.pd changes

2021-11-18 Thread Jeff Law via Gcc-patches
Andrew's recent match.pd improvements resulted in octeon-bbit-1 failing on the MIPS platforms. What's going on is pretty simple.  We've got two functions that collapse into the same code after Andrew's change which causes ICF to kick in.  As a result we don't see as many bbit instructions as w

Re: [PATCH] Fix IPA modref ubsan.

2021-11-18 Thread Martin Sebor via Gcc-patches
On 11/18/21 5:41 AM, Jan Hubicka via Gcc-patches wrote: modref_tree::merge(modref_tree*, vec*, modref_parm_map*, bool) is called with modref_parm_map chain_map; The variable has uninitialized m.parm_offset_known and it is accessed here: gcc/ipa-modref-tree.h:572 a.parm_offset_known &= m.parm_o

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

2021-11-18 Thread Andrew MacLeod via Gcc-patches
On 11/15/21 12:24, Di Zhao OS via Gcc-patches wrote: Attached is the updated patch. Fixed some errors in testcases. -Original Message- From: Richard Biener Sent: Wednesday, November 10, 2021 5:44 PM To: Di Zhao OS Cc: gcc-patches@gcc.gnu.org; Andrew MacLeod Subject: Re: [PATCH v2] tr

Re: [PATCH 4/4] libgcc: Use _dl_find_eh_frame in _Unwind_Find_FDE

2021-11-18 Thread Jakub Jelinek via Gcc-patches
On Wed, Nov 03, 2021 at 05:28:55PM +0100, Florian Weimer wrote: > --- a/libgcc/unwind-dw2-fde-dip.c > +++ b/libgcc/unwind-dw2-fde-dip.c > @@ -129,6 +129,30 @@ unw_eh_callback_data_dbase (const struct > unw_eh_callback_data *data > #endif > } > > +#ifdef DL_FIND_EH_FRAME_DBASE > +#if DL_FIND_EH

Re: [PATCH 2/2][GCC] arm: Declare MVE types internally via pragma

2021-11-18 Thread Richard Earnshaw via Gcc-patches
On 16/11/2021 10:15, Murray Steele via Gcc-patches wrote: Hi all, This patch moves the implementation of MVE ACLE types from arm_mve_types.h to inside GCC via a new pragma, which replaces the prior type definitions. This allows for the types to be used internally for intrinsic function defini

Re: [PATCH 1/2][GCC] arm: Move arm_simd_info array declaration into header

2021-11-18 Thread Richard Earnshaw via Gcc-patches
On 16/11/2021 10:14, Murray Steele via Gcc-patches wrote: Hi all, This patch moves the arm_simd_type and arm_type_qualifiers enums, and arm_simd_info struct from arm-builtins.c into arm-builtins.h header. This is a first step towards internalising the type definitions for MVE predicate, vect

Re: [PATCH 3/3] elf: Add _dl_find_eh_frame function

2021-11-18 Thread Jakub Jelinek via Gcc-patches
On Wed, Nov 03, 2021 at 05:28:02PM +0100, Florian Weimer wrote: > --- /dev/null > +++ b/bits/dlfcn_eh_frame.h > @@ -0,0 +1,33 @@ > +/* System dependent definitions for find unwind information using ld.so. > + Copyright (C) 2021 Free Software Foundation, Inc. > + This file is part of the GNU C L

Re: [PATCH] c++: designated init of char array by string constant [PR55227]

2021-11-18 Thread Marek Polacek via Gcc-patches
On Wed, Nov 17, 2021 at 10:23:58PM -0500, will wray wrote: > V2 Patch > https://gcc.gnu.org/bugzilla/attachment.cgi?id=51828 Can you please post the v2 here on the mailing list? It will be easier for us to reply. Preferably with the subject adjusted to say [PATCH v2] ... > On Wed, Nov 17, 2021

Re: [PATCH 3/4] Darwin : Allow for configuring Darwin to use embedded runpath.

2021-11-18 Thread Jonathan Wakely via Gcc-patches
On Wed, 17 Nov 2021 at 21:28, Iain Sandoe via Libstdc++ < libstd...@gcc.gnu.org> wrote: > this refers to the libstdc++ changes (mostly a regeneration from the > libtool > change) but a small addition to Makefile.am to add @loader_path as a > default for libstdc++ to find its dependent libs. > Th

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

2021-11-18 Thread Patrick Palka via Gcc-patches
On Thu, 18 Nov 2021, Patrick Palka wrote: > On Thu, 18 Nov 2021, Jason Merrill wrote: > > > On 11/10/21 11:53, Patrick Palka wrote: > > > Here when partially instantiating the call get(T{}) with T=N::A > > > (for which earlier unqualified name lookup for 'get' found nothing) > > > the arguments a

Re: [PATCH 3/4] libgcc: Split FDE search code from PT_GNU_EH_FRAME lookup

2021-11-18 Thread Jakub Jelinek via Gcc-patches
On Wed, Nov 03, 2021 at 05:28:48PM +0100, Florian Weimer wrote: > @@ -383,12 +376,34 @@ _Unwind_IteratePhdrCallback (struct dl_phdr_info *info, > size_t size, void *ptr) > # endif > #endif > > - _Unwind_Ptr dbase = unw_eh_callback_data_dbase (data); > + return 1; > +} > + > +/* Result type o

[PATCH take 2] ivopts: Improve code generated for very simple loops.

2021-11-18 Thread Roger Sayle
Hi Richard, Many thanks for the patch review. On Tue, Nov 16, 2021 at 12:38 Richard Biener wrote: > On Mon, Nov 15, 2021 at 2:04 PM Roger Sayle > wrote: > > > > This patch tidies up the code that GCC generates for simple loops, by > > selecting/generating a simpler loop bound expression in ivopt

  1   2   >