[PATCH] Simplify branching in algos

2021-05-26 Thread François Dumont via Gcc-patches
Following latest fixes in std::inplace_merge and std::stable_sort you propose Jonathan to enhance branching in the first. Here is a proposal based on yours to do so in both algos.     libstdc++: Enhance branching in std::inplace_merge and std::stable_sort     libstdc++-v3/ChangeLog:  

Re: [PATCH] [i386] Fix _mm256_zeroupper to notify LRA that vzeroupper will kill sse registers. [PR target/82735]

2021-05-26 Thread Hongtao Liu via Gcc-patches
Hi: This is an updated patch which implements vzeroupper as call_insn which has a special vzeroupper ABI, also in this patch i reverted r11-7684, r10-6451, r10-3677 which seems to fix the same issue but in a different way. Bootstrapped and regtested on x86_64-linux-gnux{-m32,} and

[r12-1075 Regression] FAIL: gcc.target/i386/pr100637-3w.c scan-assembler pmulhrsw on Linux/x86_64

2021-05-26 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, 28484d00c45b7bf094a22a4fddf9ffdc7482c7e1 is the first bad commit commit 28484d00c45b7bf094a22a4fddf9ffdc7482c7e1 Author: Uros Bizjak Date: Wed May 26 20:44:49 2021 +0200 i386: Autovectorize 4-byte vectors caused FAIL: gcc.dg/vect/vect-epilogues.c -flto -ffat-lto-objects

Re: [PATCH] PR fortran/100656 - ICE in gfc_conv_expr_present, at fortran/trans-expr.c:1934

2021-05-26 Thread Jerry DeLisle
On 5/26/21 2:04 PM, Harald Anlauf via Fortran wrote: Dear Fortranners, Gerhard found a case where bounds-checking for an optional, allocatable character dummy resulted in an ICE. We'd better not call the presence check on a non-dummy symbol, as this will hit an assert... Regtested on

Re: [PATCH] PR fortran/100602 - [11/12 Regression] Erroneous "pointer argument is not associated" runtime error

2021-05-26 Thread Jerry DeLisle
On 5/18/21 11:36 AM, Harald Anlauf via Fortran wrote: The generation of the new runtime check picked up the wrong attributes in the case of CLASS array arguments. There is related new code in gfc_conv_procedure_call which served as reference for the fix. Regtested on x86_64-pc-linux-gnu. OK

[PATCH PR100499]Fix wrong niter info caused by overflow behavior

2021-05-26 Thread bin.cheng via Gcc-patches
Hi, As described in PR100499, loop niters analysis for "!=" now relies on multiple_of_p which so far is mostly implemented for no-overflow scenarios. This patch fixes the issue by: 1. add new parameter to multiple_of_p indicating no-wrapping behavior in top expression. 2. pass new argument to

Re: [PATCH 3/5] Convert evrp pass to RANGE_QUERY(cfun).

2021-05-26 Thread H.J. Lu via Gcc-patches
On Tue, May 25, 2021 at 10:15 AM Aldy Hernandez via Gcc-patches wrote: > > Adjustments per discussion. > > OK pending tests? > > Aldy This caused: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100787 -- H.J.

Re: [PATCH] libstdc++: Avoid hard error in ranges::unique_copy [PR100770]

2021-05-26 Thread Tim Song via Gcc-patches
On Wed, May 26, 2021 at 2:55 PM Jonathan Wakely wrote: > > On Wed, 26 May 2021 at 20:11, Patrick Palka via Libstdc++ > wrote: > > > > On Wed, 26 May 2021, Tim Song wrote: > > > > > I noticed that output_iterator_wrapper still has a (non-void) > > > value_type. Perhaps we can get better coverage

[r12-1078 Regression] FAIL: gcc.dg/Wstringop-overflow-55.c pr????? (test for warnings, line 94) on Linux/x86_64

2021-05-26 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, fe9a499cb8775cfbcea356ab0cae5c365971cf86 is the first bad commit commit fe9a499cb8775cfbcea356ab0cae5c365971cf86 Author: Aldy Hernandez Date: Wed May 19 18:27:47 2021 +0200 Convert Walloca pass to get_range_query. caused FAIL: gcc.dg/Wstringop-overflow-55.c pr?

[r12-1075 Regression] FAIL: gcc.target/i386/pr100637-3w.c scan-assembler pmulhrsw on Linux/x86_64

2021-05-26 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, 28484d00c45b7bf094a22a4fddf9ffdc7482c7e1 is the first bad commit commit 28484d00c45b7bf094a22a4fddf9ffdc7482c7e1 Author: Uros Bizjak Date: Wed May 26 20:44:49 2021 +0200 i386: Autovectorize 4-byte vectors caused FAIL: gcc.target/i386/pr100637-3w.c scan-assembler

[PATCH] c++: Relax rules for non-type arguments in partial specs [CWG1315]

2021-05-26 Thread Patrick Palka via Gcc-patches
This implements the wording changes of CWG 1315, which permits non-type template arguments in a partial specialization to use template parameters more freely. Delightfully, it seems the only change needed is to remove a few checks from process_partial_specialization. But that change alone

Re: [PATCH RFA (diagnostic)] c++: -Wdeprecated-copy and #pragma diagnostic [PR94492]

2021-05-26 Thread Jason Merrill via Gcc-patches
On 5/26/21 3:18 PM, Martin Sebor wrote: On 5/26/21 8:00 AM, Jason Merrill wrote: On 5/13/21 9:07 PM, Jason Merrill wrote: On 5/13/21 7:38 PM, Martin Sebor wrote: On 5/13/21 1:28 PM, Jason Merrill via Gcc-patches wrote: Ping. On 4/28/21 9:32 AM, Jason Merrill wrote:   -Wdeprecated-copy was

[PATCH] avoid invalid sprintf argument checking and folding (PR 100732)

2021-05-26 Thread Martin Sebor via Gcc-patches
While checking objects whose addresses are passed to functions declared to take const pointers and making sure they're initialized the GCC 11 -Wmaybe-uninitialized enhancement assumes that the actual argument is a pointer. That's normally a safe assumption because for nonpointer arguments the

Re: [C] Warn on type punning that toggles scalar storage order

2021-05-26 Thread Eric Botcazou
> OK Thanks. I have also installed the attached tweak to the documentation. PR c/100653 * doc/extend.texi (scalar_storage_order): Rephrase slightly. -- Eric Botcazoudiff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index 3ddeb0dee3a..bfe9c21bddf 100644 ---

Re: [PATCH] libgccjit: Add support for types used by atomic builtins [PR96066] [PR96067]

2021-05-26 Thread Antoni Boucher via Gcc-patches
Hi. Here's the new patch with the fixes requested. Le jeudi 20 mai 2021 à 16:24 -0400, David Malcolm a écrit : > On Mon, 2021-05-17 at 21:02 -0400, Antoni Boucher via Jit wrote: > > Hello. > > This patch fixes the issue with using atomic builtins in libgccjit. > > Thanks to review it. > >

[PATCH,rs6000] Fix p10 fusion test cases for -m32

2021-05-26 Thread Aaron Sawdey via Gcc-patches
For some reason this never showed up on gcc-patches, trying again. Aaron Sawdey, Ph.D. saw...@linux.ibm.com IBM Linux on POWER Toolchain > Begin forwarded message: > > From: Aaron Sawdey > Subject: [PATCH,rs6000] Fix p10 fusion test cases for -m32 > Date: May 25, 2021 at 1:45:36 PM CDT > To:

Re: [PATCH] Add gnu::diagnose_as attribute

2021-05-26 Thread Matthias Kretz
On Friday, 14 May 2021 18:05:03 CEST Martin Sebor wrote: > [...] > > At the same time, my concern with adding another syntactic renaming > mechanism that's specifically intended to change symbol names in > diagnostics (and the two macros) but nowhere else is that it would > considerably raise the

Re: [PATCH] c++: Output less irrelevant info for function template decl [PR100716]

2021-05-26 Thread Matthias Kretz
New revision which can also be compiled with GCC 4.8. From: Matthias Kretz Ensure dump_template_decl for function templates never prints template parameters after the function name (it did with -fno-pretty-templates) and skip output of irrelevant & confusing "[with T = T]" in dump_substitution.

[PATCH] c++: Add missing scope in typedef diagnostic [PR100763]

2021-05-26 Thread Matthias Kretz
From: Matthias Kretz dump_type on 'const std::string' should not print 'const string' unless TFF_UNQUALIFIED_NAME is requested. gcc/cp/ChangeLog: PR c++/100763 * error.c: Call dump_scope when printing a typedef. --- gcc/cp/error.c | 2 ++ 1 file changed, 2 insertions(+) --

[PATCH] rs6000: MMA builtin usage ICEs when used in a #pragma omp parallel and using -fopenmp [PR100777]

2021-05-26 Thread Peter Bergner via Gcc-patches
Using an MMA builtin within an openmp parallel code block leads to an SSA verification ICE on the temporaries we create while expanding the MMA builtins at gimple time. The solution is to use create_tmp_reg_or_ssa_name(), which knows when to create either an SSA or register temporary. This fixes

[PATCH] PR fortran/100656 - ICE in gfc_conv_expr_present, at fortran/trans-expr.c:1934

2021-05-26 Thread Harald Anlauf via Gcc-patches
Dear Fortranners, Gerhard found a case where bounds-checking for an optional, allocatable character dummy resulted in an ICE. We'd better not call the presence check on a non-dummy symbol, as this will hit an assert... Regtested on x86_64-pc-linux-gnu. OK for mainline? And backport to 11?

Re: [PATCH 1/5 ver4] RS6000: Add 128-bit Integer Operations

2021-05-26 Thread Segher Boessenkool
Hi! On Mon, Apr 26, 2021 at 09:35:58AM -0700, Carl Love wrote: > This patch fixes the order of the argument in the vec_rlmi and > vec_rlnm builtins. The patch also adds a new test cases to verify > the fix. > > The patch has been tested on > powerpc64-linux instead (Power 8 BE) >

Re: RFA: save/restore target options in handle_optimize_attribute

2021-05-26 Thread Joseph Myers
This commit breaks the build of glibc for powerpc64le-linux-gnu. Compile the following code with -O2 -mlong-double-128 -mabi=ibmlongdouble and I get the error opts-bug.c:8:1: error: '-mabi=ibmlongdouble' requires '-mlong-double-128' 8 | { | ^ which is clearly nonsensical, since

Re: [Patch] OpenMP: Add iterator support to Fortran's depend; add affinity clause

2021-05-26 Thread Tobias Burnus
Hi Jakub Updated patch attached – addressing your points: On 28.04.21 15:41, Jakub Jelinek wrote: On Tue, Apr 27, 2021 at 03:36:38PM +0200, Tobias Burnus wrote: [...] (a) This patch add the iterator support to the Fortran FE and adds support for it to the depend clause. (b) It also adds a

Re: [PATCH] libstdc++: Avoid hard error in ranges::unique_copy [PR100770]

2021-05-26 Thread Jonathan Wakely via Gcc-patches
On Wed, 26 May 2021 at 20:11, Patrick Palka via Libstdc++ wrote: > > On Wed, 26 May 2021, Tim Song wrote: > > > I noticed that output_iterator_wrapper still has a (non-void) > > value_type. Perhaps we can get better coverage if it doesn't have one? > > The existing tests should have caught this

[committed] libstdc++: Change [range.iter.op] functions to function objects [PR 100768]

2021-05-26 Thread Jonathan Wakely via Gcc-patches
The standard specifies std::ranges::distance etc as function templates, but it also requires them to not be found by ADL, and to suppress ADL when normal unqualified lookup does find them. That means they need to be function objects. libstdc++-v3/ChangeLog: PR libstdc++/100768 *

[PATCH] correct VLA bound traversal (PR 100719)

2021-05-26 Thread Martin Sebor via Gcc-patches
The -Wvla-parameter checking of the bounds of VLA parameters in function redeclarations has a few bugs: a) it scans the string that encodes the attribute access representation of the VLA bounds from the end, failing to consider that the string may be followed by another for a subsequent VLA, b)

Re: [PATCH RFA (diagnostic)] c++: -Wdeprecated-copy and #pragma diagnostic [PR94492]

2021-05-26 Thread Martin Sebor via Gcc-patches
On 5/26/21 8:00 AM, Jason Merrill wrote: On 5/13/21 9:07 PM, Jason Merrill wrote: On 5/13/21 7:38 PM, Martin Sebor wrote: On 5/13/21 1:28 PM, Jason Merrill via Gcc-patches wrote: Ping. On 4/28/21 9:32 AM, Jason Merrill wrote:   -Wdeprecated-copy was depending only on the state of the warning

Re: [PATCH] libstdc++: Avoid hard error in ranges::unique_copy [PR100770]

2021-05-26 Thread Tim Song via Gcc-patches
On Wed, May 26, 2021 at 1:43 PM Patrick Palka wrote: > > On Wed, 26 May 2021, Tim Song wrote: > > > > On Wed, May 26, 2021 at 12:00 PM Patrick Palka via Libstdc++ > > wrote: > > > > > > - else if constexpr (input_iterator<_Out> > > > - && same_as, > > >

Re: [PATCH] libstdc++: Simplify range adaptors' forwarding of bound args when possible

2021-05-26 Thread Patrick Palka via Gcc-patches
On Fri, 14 May 2021, Patrick Palka wrote: > r11-8053 rewrote the range adaptor implementation in conformance with > P2281, making partial application act like a SFINAE-friendly perfect > forwarding call wrapper. Making SFINAE-friendliness coexist with > perfect forwarding here requires adding

[PATCH] i386: Autovectorize 4-byte vectors

2021-05-26 Thread Uros Bizjak via Gcc-patches
2021-05-26 Uroš Bizjak gcc/ * config/i386/i386.c (ix86_autovectorize_vector_modes): Add V4QImode and V16QImode for TARGET_SSE2. * doc/sourcebuild.texi (Vector-specific attributes): Add vect64 and vect32 description. gcc/testsuite/ * lib/target-supports.exp

Re: [PATCH] libstdc++: Avoid hard error in ranges::unique_copy [PR100770]

2021-05-26 Thread Patrick Palka via Gcc-patches
On Wed, 26 May 2021, Tim Song wrote: > I noticed that output_iterator_wrapper still has a (non-void) > value_type. Perhaps we can get better coverage if it doesn't have one? > The existing tests should have caught this case with that change, at least. Good point, and I guess it should be fine to

Re: [PATCH] libgomp: Add openacc_{cuda,cublas,cudart} effective targets and use them in openacc testsuite

2021-05-26 Thread Tobias Burnus
On 26.05.21 14:06, Jakub Jelinek wrote: When gcc is configured for nvptx offloading with --without-cuda-driver and full CUDA isn't installed, many libgomp.oacc-*/* tests fail, some of them because cuda.h header can't be found, others because the tests can't be linked against -lcuda, -lcudart or

Re: [PATCHv2] Add a couple of A?CST1:CST2 match and simplify optimizations

2021-05-26 Thread Andrew MacLeod via Gcc-patches
On 5/26/21 7:07 AM, Andrew Pinski wrote: On Wed, May 26, 2021 at 2:01 AM Andrew Pinski wrote: On Wed, May 26, 2021 at 1:43 AM Bernd Edlinger wrote: On 5/25/21 4:22 PM, Richard Biener via Gcc-patches wrote: On Sun, May 23, 2021 at 12:03 PM apinski--- via Gcc-patches wrote: From: Andrew

Re: [PATCH] libstdc++: Avoid hard error in ranges::unique_copy [PR100770]

2021-05-26 Thread Jonathan Wakely via Gcc-patches
On Wed, 26 May 2021 at 18:00, Patrick Palka via Libstdc++ wrote: > > When input_iterator<_Out> isn't satisfied, we need to avoid substituting > into iter_value_t<_Out> because the latter isn't necessarily > well-formed in that case. To that end, this patch rewrites the > problematic condition in

Re: [PATCH] libstdc++: Avoid hard error in ranges::unique_copy [PR100770]

2021-05-26 Thread Tim Song via Gcc-patches
I noticed that output_iterator_wrapper still has a (non-void) value_type. Perhaps we can get better coverage if it doesn't have one? The existing tests should have caught this case with that change, at least. On Wed, May 26, 2021 at 12:00 PM Patrick Palka via Libstdc++ wrote: > > - else if

Re: [PATCHv2] Add a couple of A?CST1:CST2 match and simplify optimizations

2021-05-26 Thread Andrew MacLeod via Gcc-patches
On 5/26/21 1:07 PM, Bernd Edlinger wrote: On 5/26/21 7:03 PM, Bernd Edlinger wrote: On 5/26/21 2:05 PM, Richard Biener wrote: On Wed, May 26, 2021 at 1:37 PM Andrew Pinski wrote: On Wed, May 26, 2021 at 4:28 AM Richard Biener wrote: On Wed, May 26, 2021 at 1:07 PM Andrew Pinski wrote: On

Re: [PATCHv2] Add a couple of A?CST1:CST2 match and simplify optimizations

2021-05-26 Thread Bernd Edlinger
On 5/26/21 7:03 PM, Bernd Edlinger wrote: > On 5/26/21 2:05 PM, Richard Biener wrote: >> On Wed, May 26, 2021 at 1:37 PM Andrew Pinski wrote: >>> >>> On Wed, May 26, 2021 at 4:28 AM Richard Biener >>> wrote: On Wed, May 26, 2021 at 1:07 PM Andrew Pinski wrote: > > On Wed, May

Re: [PATCHv2] Add a couple of A?CST1:CST2 match and simplify optimizations

2021-05-26 Thread Bernd Edlinger
On 5/26/21 2:05 PM, Richard Biener wrote: > On Wed, May 26, 2021 at 1:37 PM Andrew Pinski wrote: >> >> On Wed, May 26, 2021 at 4:28 AM Richard Biener >> wrote: >>> >>> On Wed, May 26, 2021 at 1:07 PM Andrew Pinski wrote: On Wed, May 26, 2021 at 2:01 AM Andrew Pinski wrote: >

Re: [PATCHv2] Add a couple of A?CST1:CST2 match and simplify optimizations

2021-05-26 Thread Andrew MacLeod via Gcc-patches
On 5/26/21 8:05 AM, Richard Biener wrote: On Wed, May 26, 2021 at 1:37 PM Andrew Pinski wrote: On Wed, May 26, 2021 at 4:28 AM Richard Biener wrote: On Wed, May 26, 2021 at 1:07 PM Andrew Pinski wrote: On Wed, May 26, 2021 at 2:01 AM Andrew Pinski wrote: On Wed, May 26, 2021 at 1:43 AM

Re: [C] Warn on type punning that toggles scalar storage order

2021-05-26 Thread Jeff Law via Gcc-patches
On 5/26/2021 8:12 AM, Eric Botcazou wrote: Hi, As documented in the manual, we do not support type punning that toggles the scalar storage order, so this adds a warning for the simple case of unions. Tested on x86-64/Linux, OK for the mainline? 2021-05-26 Eric Botcazou PR

[PATCH] libstdc++: Avoid hard error in ranges::unique_copy [PR100770]

2021-05-26 Thread Patrick Palka via Gcc-patches
When input_iterator<_Out> isn't satisfied, we need to avoid substituting into iter_value_t<_Out> because the latter isn't necessarily well-formed in that case. To that end, this patch rewrites the problematic condition in ranges::unique_copy into a nested requirement which has the correct

Re: [PATCH] c++: access for hidden friend of nested class template [PR100502]

2021-05-26 Thread Jason Merrill via Gcc-patches
On 5/26/21 10:31 AM, Patrick Palka wrote: On Tue, 25 May 2021, Jason Merrill wrote: On 5/25/21 10:50 AM, Patrick Palka wrote: On Mon, 24 May 2021, Jason Merrill wrote: On 5/21/21 4:35 PM, Patrick Palka wrote: Here, during ahead of time access checking for the private member

Re: [r12-1053 Regression] FAIL: libgomp.c++/task-reduction-8.C execution test on Linux/x86_64

2021-05-26 Thread Eric Botcazou
> But with --enable-linux-futex it used to work reliably. > Isn't the problem we are talking about here introduced with > r12-1044-gfd97aeb494cdcffe0d21e7f15ab4593662e065bdAA and > worked around with r12-1064-ga0d371a25148d113f7c3657f36fbf7dcb5e1f63d ? Yes, dangling references apparently,

Re: [r12-1053 Regression] FAIL: libgomp.c++/task-reduction-8.C execution test on Linux/x86_64

2021-05-26 Thread Jakub Jelinek via Gcc-patches
On Wed, May 26, 2021 at 03:45:06PM +0100, Iain Sandoe via Gcc-patches wrote: > on several platforms ... > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88707 But with --enable-linux-futex it used to work reliably. Isn't the problem we are talking about here introduced with

Re: [r12-1053 Regression] FAIL: libgomp.c++/task-reduction-8.C execution test on Linux/x86_64

2021-05-26 Thread Iain Sandoe via Gcc-patches
Andrew MacLeod via Gcc-patches wrote: On 5/25/21 11:03 PM, sunil.k.pandey wrote: On Linux/x86_64, a6e94287d31525b3ad0963ad22a92e9f3dbcd3cf is the first bad commit commit a6e94287d31525b3ad0963ad22a92e9f3dbcd3cf Author: Andrew MacLeod Date: Tue May 25 14:59:54 2021 -0400 Remove the

Re: [PATCH] arm: Auto-vectorization for MVE: vaddv

2021-05-26 Thread Christophe Lyon via Gcc-patches
On Wed, 26 May 2021 at 11:32, Richard Sandiford wrote: > > Christophe Lyon writes: > > This patch adds support for the reduc_plus_scal optab with MVE, which > > maps to the vaddv instruction. > > > > It moves the reduc_plus_scal_ expander from neon.md to > > vec-common.md and adds support for

Re: [PATCH] c++: access for hidden friend of nested class template [PR100502]

2021-05-26 Thread Patrick Palka via Gcc-patches
On Tue, 25 May 2021, Jason Merrill wrote: > On 5/25/21 10:50 AM, Patrick Palka wrote: > > On Mon, 24 May 2021, Jason Merrill wrote: > > > > > On 5/21/21 4:35 PM, Patrick Palka wrote: > > > > Here, during ahead of time access checking for the private member > > > > EnumeratorRange::end_reached_

Re: [r12-1053 Regression] FAIL: libgomp.c++/task-reduction-8.C execution test on Linux/x86_64

2021-05-26 Thread Andrew MacLeod via Gcc-patches
On 5/25/21 11:03 PM, sunil.k.pandey wrote: On Linux/x86_64, a6e94287d31525b3ad0963ad22a92e9f3dbcd3cf is the first bad commit commit a6e94287d31525b3ad0963ad22a92e9f3dbcd3cf Author: Andrew MacLeod Date: Tue May 25 14:59:54 2021 -0400 Remove the logical stmt cache for now. caused FAIL:

[C] Warn on type punning that toggles scalar storage order

2021-05-26 Thread Eric Botcazou
Hi, As documented in the manual, we do not support type punning that toggles the scalar storage order, so this adds a warning for the simple case of unions. Tested on x86-64/Linux, OK for the mainline? 2021-05-26 Eric Botcazou PR c/100653 * c-decl.c (finish_struct): Warn

Re: [PATCH RFA (diagnostic)] c++: -Wdeprecated-copy and #pragma diagnostic [PR94492]

2021-05-26 Thread Jason Merrill via Gcc-patches
On 5/13/21 9:07 PM, Jason Merrill wrote: On 5/13/21 7:38 PM, Martin Sebor wrote: On 5/13/21 1:28 PM, Jason Merrill via Gcc-patches wrote: Ping. On 4/28/21 9:32 AM, Jason Merrill wrote:   -Wdeprecated-copy was depending only on the state of the warning at the point where we call the function,

Re: [PATCH] wwwdocs: Add D front-end section for GCC 11 changes

2021-05-26 Thread Iain Buclaw via Gcc-patches
Excerpts from Iain Buclaw's message of May 19, 2021 5:41 pm: > Hi, > > This is a belated patch which covers some of the more notable changes > that have gone into the GCC 11 release of the D front-end. > > Ran this through the W3 validator and no new warnings are generated. > > I will go

[committed] Remove useless register keywords

2021-05-26 Thread Jakub Jelinek via Gcc-patches
On Wed, May 26, 2021 at 03:24:00PM +0200, Jan-Benedict Glaw wrote: > thanks, committed with above changes. This patch removes useless register keywords from several backends and one spot in the Ada FE. Committed to trunk as obvious. 2021-05-26 Jakub Jelinek gcc/ *

Re: [PATCH RFA] tree-iterator: C++11 range-for and tree_stmt_iterator

2021-05-26 Thread Jason Merrill via Gcc-patches
Ping. On 5/17/21 1:58 PM, Jason Merrill wrote: On 5/17/21 3:56 AM, Richard Biener wrote: On Fri, May 14, 2021 at 2:23 AM Martin Sebor via Gcc-patches wrote: On 5/13/21 1:26 PM, Jason Merrill via Gcc-patches wrote: Ping. On 5/1/21 12:29 PM, Jason Merrill wrote: Like my recent patch to add

Re: [PATCH 1/5] Common API for accessing global and on-demand ranges.

2021-05-26 Thread Andrew MacLeod via Gcc-patches
On 5/25/21 12:16 PM, Aldy Hernandez wrote: The interface is now an inline function for get_range_query() and an external function for get_global_range_query), as discussed. There are no magic cfun uses behind the scenes. The annoying downcast is gone. Passes can now decide if they want to

Re: [PATCH, arc]: Drop "register" keyword

2021-05-26 Thread Jan-Benedict Glaw
Hi Jukub & Richard, On Wed, 2021-05-26 14:47:20 +0200, Jakub Jelinek wrote: > On Wed, May 26, 2021 at 02:42:47PM +0200, Jan-Benedict Glaw wrote: > > The "register" keyword was removed in C++17, remove them to get the > > backen > > s/backend// > > > to build again. > > > >

Re: [PATCH V2] Split loop for NE condition.

2021-05-26 Thread Segher Boessenkool
On Wed, May 26, 2021 at 11:50:07AM +0200, Richard Biener wrote: > > We can split the loop into two loops: > > > > while (++k > n) > > a[k] = b[k] + 1; > > while (l++ < n) > > a[k] = b[k] + 1; > > > > then for the second loop, it could be optimized. > > Btw, I think even the first

Re: [PATCH, arc]: Drop "register" keyword

2021-05-26 Thread Richard Biener via Gcc-patches
On Wed, May 26, 2021 at 3:12 PM Jan-Benedict Glaw wrote: > > Hi! > > I'd like to commit the following patch. > > Okay for master? OK. Richard. > Thanks, > Jan-Benedict > > > > > arc: Remove useless register keyword > > The "register" keyword was removed in C++17, remove them to get

Re: [PATCH, arc]: Drop "register" keyword

2021-05-26 Thread Jakub Jelinek via Gcc-patches
On Wed, May 26, 2021 at 02:42:47PM +0200, Jan-Benedict Glaw wrote: > The "register" keyword was removed in C++17, remove them to get the backen s/backend// > to build again. > > gcc/ > * config/arc/arc.c (arc_address_cost, arc_print_operand_address, >

[PATCH, arc]: Drop "register" keyword

2021-05-26 Thread Jan-Benedict Glaw
Hi! I'd like to commit the following patch. Okay for master? Thanks, Jan-Benedict arc: Remove useless register keyword The "register" keyword was removed in C++17, remove them to get the backen to build again. gcc/ * config/arc/arc.c

Re: [PATCH] Extend is_cond_scalar_reduction to handle nop_expr after/before scalar reduction.[PR98365]

2021-05-26 Thread Richard Biener via Gcc-patches
On Wed, May 26, 2021 at 7:06 AM Hongtao Liu wrote: > > On Tue, May 25, 2021 at 6:24 PM Richard Biener > wrote: > > > > On Mon, May 24, 2021 at 11:52 AM Hongtao Liu wrote: > > > > > > Hi: > > > Details described in PR. > > > Bootstrapped and regtest on > > >

Re: [RFC PATCH] i386: Enable auto-vectorization for 32bit modes (+ testcases)

2021-05-26 Thread Richard Biener via Gcc-patches
On Wed, May 26, 2021 at 10:44 AM Uros Bizjak wrote: > > On Tue, May 25, 2021 at 4:29 PM Richard Biener > wrote: > > > > On Fri, May 21, 2021 at 5:00 PM Uros Bizjak via Gcc-patches > > wrote: > > > > > > Here it is, the patch that enables auto-vectorization for 32bit modes. > > > > > > Sent as

Re: [PATCH v2] AArch64: Improve GOT addressing

2021-05-26 Thread Wilco Dijkstra via Gcc-patches
Hi Richard, > Are we actually planning to do any linker relaxations here, or is this > purely theoretical?  If doing relaxations is a realistic possiblity then > I agree that would be a good/legitimate reason to use a single define_insn > for both instructions.  In that case though, there should

[PATCH] libgomp: Add openacc_{cuda,cublas,cudart} effective targets and use them in openacc testsuite

2021-05-26 Thread Jakub Jelinek via Gcc-patches
Hi! When gcc is configured for nvptx offloading with --without-cuda-driver and full CUDA isn't installed, many libgomp.oacc-*/* tests fail, some of them because cuda.h header can't be found, others because the tests can't be linked against -lcuda, -lcudart or -lcublas. I usually only have

Re: [PATCHv2] Add a couple of A?CST1:CST2 match and simplify optimizations

2021-05-26 Thread Richard Biener via Gcc-patches
On Wed, May 26, 2021 at 1:37 PM Andrew Pinski wrote: > > On Wed, May 26, 2021 at 4:28 AM Richard Biener > wrote: > > > > On Wed, May 26, 2021 at 1:07 PM Andrew Pinski wrote: > > > > > > On Wed, May 26, 2021 at 2:01 AM Andrew Pinski wrote: > > > > > > > > On Wed, May 26, 2021 at 1:43 AM Bernd

Re: [PATCHv2] Add a couple of A?CST1:CST2 match and simplify optimizations

2021-05-26 Thread Andrew Pinski via Gcc-patches
On Wed, May 26, 2021 at 4:28 AM Richard Biener wrote: > > On Wed, May 26, 2021 at 1:07 PM Andrew Pinski wrote: > > > > On Wed, May 26, 2021 at 2:01 AM Andrew Pinski wrote: > > > > > > On Wed, May 26, 2021 at 1:43 AM Bernd Edlinger > > > wrote: > > > > > > > > On 5/25/21 4:22 PM, Richard Biener

Re: [PATCHv2] Add a couple of A?CST1:CST2 match and simplify optimizations

2021-05-26 Thread Richard Biener via Gcc-patches
On Wed, May 26, 2021 at 1:07 PM Andrew Pinski wrote: > > On Wed, May 26, 2021 at 2:01 AM Andrew Pinski wrote: > > > > On Wed, May 26, 2021 at 1:43 AM Bernd Edlinger > > wrote: > > > > > > On 5/25/21 4:22 PM, Richard Biener via Gcc-patches wrote: > > > > On Sun, May 23, 2021 at 12:03 PM

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

2021-05-26 Thread Richard Biener
On Wed, 12 May 2021, Qing Zhao wrote: > Hi, > > This is the 3rd version of the patch for the new security feature for GCC. > > Please take look and let me know your comments and suggestions. > > thanks. > > Qing > > **Compare with the 2nd version, the following are the major changes: >

Re: [PATCHv2] Add a couple of A?CST1:CST2 match and simplify optimizations

2021-05-26 Thread Andrew Pinski via Gcc-patches
On Wed, May 26, 2021 at 2:01 AM Andrew Pinski wrote: > > On Wed, May 26, 2021 at 1:43 AM Bernd Edlinger > wrote: > > > > On 5/25/21 4:22 PM, Richard Biener via Gcc-patches wrote: > > > On Sun, May 23, 2021 at 12:03 PM apinski--- via Gcc-patches > > > wrote: > > >> > > >> From: Andrew Pinski >

RE: [PATCH 3/4][AArch32]: Add support for sign differing dot-product usdot for NEON.

2021-05-26 Thread Kyrylo Tkachov via Gcc-patches
> -Original Message- > From: Tamar Christina > Sent: 25 May 2021 16:02 > To: gcc-patches@gcc.gnu.org > Cc: Richard Earnshaw ; nd ; > Ramana Radhakrishnan ; Kyrylo > Tkachov > Subject: RE: [PATCH 3/4][AArch32]: Add support for sign differing dot- > product usdot for NEON. > > Forgot to

Re: [PATCH V2] Split loop for NE condition.

2021-05-26 Thread Richard Biener
On Mon, 17 May 2021, Jiufu Guo wrote: > When there is the possibility that overflow/wrap may happen on the loop index, > a few optimizations would not happen. For example code: > > foo (int *a, int *b, unsigned k, unsigned n) > { > while (++k != n) > a[k] = b[k] + 1; > } > > For this

Re: [PATCH] arm: Auto-vectorization for MVE: vaddv

2021-05-26 Thread Richard Sandiford via Gcc-patches
Christophe Lyon writes: > This patch adds support for the reduc_plus_scal optab with MVE, which > maps to the vaddv instruction. > > It moves the reduc_plus_scal_ expander from neon.md to > vec-common.md and adds support for MVE to it. > > Since vaddv uses a 32-bits accumulator, we have to

[committed] openmp: Fix up handling of target constructs in offloaded routines [PR100573]

2021-05-26 Thread Jakub Jelinek via Gcc-patches
Hi! OpenMP Nesting of Regions restrictions say: - If a target update, target data, target enter data, or target exit data construct is encountered during execution of a target region, the behavior is unspecified. - If a target construct is encountered during execution of a target region and a

Re: [PATCH] C-SKY: Use default for TARGET_CAN_CHANGE_MODE_CLASS.

2021-05-26 Thread Cooper Qu via Gcc-patches
merged. On 4/30/21 9:02 PM, Geng Qi wrote: gcc/ChangeLog: * config/csky/csky.c (csky_can_change_mode_class): Delete. For csky, HF/SF mode use the low bits of VREGS. --- gcc/config/csky/csky.c | 16 1 file changed, 16 deletions(-) diff --git

Re: [PATCH v2] AArch64: Improve GOT addressing

2021-05-26 Thread Richard Sandiford via Gcc-patches
Wilco Dijkstra writes: > @@ -23746,6 +23767,24 @@ aarch_macro_fusion_pair_p (rtx_insn *prev, rtx_insn > *curr) > } > } > > + /* Always treat GOT accesses as a pair to ensure they can be easily > + identified and optimized in linkers. */ Sorry, I guess I'd not given enough

Re: [PATCHv2] Add a couple of A?CST1:CST2 match and simplify optimizations

2021-05-26 Thread Andrew Pinski via Gcc-patches
On Wed, May 26, 2021 at 1:43 AM Bernd Edlinger wrote: > > On 5/25/21 4:22 PM, Richard Biener via Gcc-patches wrote: > > On Sun, May 23, 2021 at 12:03 PM apinski--- via Gcc-patches > > wrote: > >> > >> From: Andrew Pinski > >> > >> Instead of some of the more manual optimizations inside phi-opt,

RE: [PATCH 1/4]middle-end Vect: Add support for dot-product where the sign for the multiplicant changes.

2021-05-26 Thread Richard Biener
On Tue, 25 May 2021, Tamar Christina wrote: > Hi Richi, > > Here's a respun version of the patch. > > Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. > > Ok for master? index 7e3aae5f9c28a49feedc7cc66e8ac0d476b9f28a..13e405edd765dde704c64348d2d0b3cd88f0af7c 100644 ---

Re: [PATCH]AArch64: Correct dot-product auto-vect optab RTL

2021-05-26 Thread Richard Sandiford via Gcc-patches
Tamar Christina writes: > Hi All, > > The current RTL for the vectorizer patterns for dot-product are incorrect. > Operand3 isn't an output parameter so we can't write to it. > > This fixes this issue and reduces the number of RTL. > > Bootstrapped Regtested on aarch64-none-linux-gnu and no

Re: [PATCH 2/4]AArch64: Add support for sign differing dot-product usdot for NEON and SVE.

2021-05-26 Thread Richard Sandiford via Gcc-patches
Tamar Christina writes: >> -Original Message- >> From: Richard Sandiford >> Sent: Monday, May 10, 2021 5:49 PM >> To: Tamar Christina >> Cc: gcc-patches@gcc.gnu.org; nd ; Richard Earnshaw >> ; Marcus Shawcroft >> ; Kyrylo Tkachov >> Subject: Re: [PATCH 2/4]AArch64: Add support for sign

Re: [PATCH 4/4]middle-end: Add tests middle end generic tests for sign differing dotproduct.

2021-05-26 Thread Tamar Christina via Gcc-patches
Think list got dropped on my last reply. Forwarding to archive the OK. From: Richard Biener Sent: Wednesday, May 26, 2021 9:40 AM To: Tamar Christina Cc: nd Subject: RE: [PATCH 4/4]middle-end: Add tests middle end generic tests for sign differing dotproduct.

Re: RFA: fix gcc.dg/tree-ssa/popcount4l.c 16 bit failure, improve 64 bit popcount expansion for 32 bit target

2021-05-26 Thread Richard Sandiford via Gcc-patches
Richard Biener writes: > On Mon, May 17, 2021 at 3:18 PM Joern Wolfgang Rennecke > wrote: >> >> Attached is the updated version of the patch. >> Bootstrapped and regtested on x86_64-pc-linux-gnu. >> >> OK to apply? > > + machine_mode m = mode_for_size ((prec + 1) / 2, MODE_INT, 1).require

Re: [RFC PATCH] i386: Enable auto-vectorization for 32bit modes (+ testcases)

2021-05-26 Thread Uros Bizjak via Gcc-patches
On Tue, May 25, 2021 at 4:29 PM Richard Biener wrote: > > On Fri, May 21, 2021 at 5:00 PM Uros Bizjak via Gcc-patches > wrote: > > > > Here it is, the patch that enables auto-vectorization for 32bit modes. > > > > Sent as RFC, because the patch fails some vectorizer scans, as it > > obviously

Re: [ARM] PR66791: Replace calls to builtin in vmul_n (a, b) intrinsics with __a * __b

2021-05-26 Thread Marc Glisse
On Wed, 26 May 2021, Prathamesh Kulkarni via Gcc-patches wrote: The attached patch removes calls to builtins in vmul_n* (a, b) with __a * __b. I am not familiar with neon, but are __a and __b unsigned here? Otherwise, is vmul_n already undefined in case of overflow? -- Marc Glisse

Re: [PATCHv2] Add a couple of A?CST1:CST2 match and simplify optimizations

2021-05-26 Thread Bernd Edlinger
On 5/25/21 4:22 PM, Richard Biener via Gcc-patches wrote: > On Sun, May 23, 2021 at 12:03 PM apinski--- via Gcc-patches > wrote: >> >> From: Andrew Pinski >> >> Instead of some of the more manual optimizations inside phi-opt, >> it would be good idea to do a lot of the heavy lifting inside match

Re: [PATCH] Add 3 target hooks for memset

2021-05-26 Thread Richard Biener via Gcc-patches
On Tue, May 25, 2021 at 5:12 PM H.J. Lu wrote: > > On Tue, May 25, 2021 at 7:34 AM Richard Biener > wrote: > > > > On Thu, May 20, 2021 at 10:50 PM H.J. Lu wrote: > > > > > > On Wed, May 19, 2021 at 5:55 AM H.J. Lu wrote: > > > > > > > > On Wed, May 19, 2021 at 2:25 AM Richard Biener > > > >

Re: [PATCH] tree-sra: Avoid refreshing into const base decls (PR 100453)

2021-05-26 Thread Eric Botcazou
> * gimplify.c (gimplify_decl_expr): Clear TREE_READONLY on the DECL > when really creating an initialization statement for it. Quite an interesting can of worms I have opened it seems. :-( So the change apparently causes OMP lowering to create dangling references, I have applied

[ARM] PR66791: Replace calls to builtin in vmul_n (a, b) intrinsics with __a * __b

2021-05-26 Thread Prathamesh Kulkarni via Gcc-patches
Hi, The attached patch removes calls to builtins in vmul_n* (a, b) with __a * __b. For float variants, it gates multiplication on __FAST_MATH__. Since we are not removing all calls to builtins, I am not sure if we should remove entry for vmul_n from arm_neon_builtins.def ? Testing the patch

Re: [PATCH] C-SKY: Use default for TARGET_PROMOTE_PROTOTYPES.

2021-05-26 Thread Cooper Qu via Gcc-patches
Pushed. On 4/30/21 9:03 PM, Geng Qi wrote: gcc/ChangeLog: * config/csky/csky.c (TARGET_PROMOTE_PROTOTYPES): Use default. --- gcc/config/csky/csky.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/gcc/config/csky/csky.c b/gcc/config/csky/csky.c index 67cdf9c..e4c92fe 100644 ---

Re: [PATCH] C-SKY: Fix for gcc.dg/torture/stackalign/builtin-return-2.c.

2021-05-26 Thread Cooper Qu via Gcc-patches
Pushed. On 4/30/21 9:02 PM, Geng Qi wrote: gcc/ChangeLog: * config/csky/csky.md (untyped_call): Emit clobber for return registers to mark them used. --- gcc/config/csky/csky.md | 4 1 file changed, 4 insertions(+) diff --git a/gcc/config/csky/csky.md

Re: [PATCH] C-SKY: Support fpuv2:fldrd/fstrd and fpuv3:fldr.64/fstr.64.

2021-05-26 Thread Cooper Qu via Gcc-patches
Pushed On 5/26/21 11:29 AM, Geng Qi wrote: gcc/ChangeLog: * config/csky/csky.c (ck810_legitimate_index_p): Modified for support "base + index" with DF mode. * config/csky/constraints.md ("Y"): New constraint for memory operands without index register. *