Re: [PATCH] [i386] Optimize __builtin_shuffle when it's used to zero the upper bits of the dest. [PR target/94680]

2021-05-12 Thread Hongtao Liu via Gcc-patches
There's a typo in the testcase, I've committed the patch as an obvious fix. Fix typo in testcase. gcc/testsuite/ChangeLog: * gcc.target/i386/avx-pr94680.c: Fix typo in testcase. diff --git a/gcc/testsuite/gcc.target/i386/avx-pr94680.c

[r12-760 Regression] FAIL: gcc.target/i386/avx-pr94680.c scan-assembler-times (?n)vmov[a-z0-9]*[ \\t]*%xmm[0-9] 12 on Linux/x86_64

2021-05-12 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, 94de7e225c1fda079052c3f0725c926437d56c94 is the first bad commit commit 94de7e225c1fda079052c3f0725c926437d56c94 Author: liuhongt Date: Thu Apr 22 15:33:16 2021 +0800 Optimize __builtin_shuffle when it's used to zero the upper bits of the dest. [PR target/94680] caused

[PATCH] avoid using an incompletely populated struct (PR 100574)

2021-05-12 Thread Martin Sebor via Gcc-patches
A logic bug in the handling of PHI arguments in compute_objsize that are all null pointers lets an incompletely populated struct be used in a way that triggers an assertion causing an ICE. The attached patch corrects that by having compute_objsize fail when the struct isn't fully populated (when

*Ping*: [PATCH] rs6000: Fix wrong code generation for vec_sel [PR94613]

2021-05-12 Thread Xionghu Luo via Gcc-patches
On 2021/4/30 14:32, Xionghu Luo wrote: The vsel instruction is a bit-wise select instruction. Using an IF_THEN_ELSE to express it in RTL is wrong and leads to wrong code being generated in the combine pass. Per element selection is a subset of per bit-wise selection,with the patch the

Re: [PATCH] [i386] Optimize __builtin_shuffle when it's used to zero the upper bits of the dest. [PR target/94680]

2021-05-12 Thread Hongtao Liu via Gcc-patches
On Wed, May 12, 2021 at 10:19 PM Jakub Jelinek wrote: > > On Sun, Apr 25, 2021 at 02:57:08PM +0800, Hongtao Liu via Gcc-patches wrote: > > gcc/ChangeLog: > > > > PR target/94680 > > * config/i386/sse.md (ssedoublevecmode): Add attribute for > > V64QI/V32HI/V16SI/V4DI. > >

Re: [PATCH] i386: Optimize vpblendvb on inverted mask register to vpblendvb on swapping the order of operand 1 and operand 2. [PR target/99908]

2021-05-12 Thread Hongtao Liu via Gcc-patches
On Wed, May 12, 2021 at 8:38 PM Uros Bizjak wrote: > > On Wed, May 12, 2021 at 1:42 PM Hongtao Liu wrote: > > > > On Wed, May 12, 2021 at 4:36 PM Uros Bizjak wrote: > > > > > > On Tue, Apr 27, 2021 at 1:05 PM Hongtao Liu via Gcc-patches > > > wrote: > > > > > > > > Hi: > > > > As described

Re: [PATCH v2] c++: Check attributes on friend declarations [PR99032]

2021-05-12 Thread Jason Merrill via Gcc-patches
On 5/12/21 8:03 PM, Marek Polacek wrote: + // FIXME: Add dg error when PR100339 is resolved. + //[[deprecated]] friend void ::foo(int, int); This could be an xfailed dg-error.

Re: [PATCH v2] c++: Check attributes on friend declarations [PR99032]

2021-05-12 Thread Jason Merrill via Gcc-patches
On 5/12/21 8:03 PM, Marek Polacek wrote: On Wed, May 12, 2021 at 12:21:26PM -0400, Jason Merrill wrote: On 5/12/21 11:03 AM, Marek Polacek wrote: On Wed, May 12, 2021 at 10:37:50AM -0400, Jason Merrill wrote: On 5/11/21 10:45 PM, Marek Polacek wrote: This patch implements

Re: [PATCH] avoid erroneous VLA bounds (PR 100550)

2021-05-12 Thread Joseph Myers
On Wed, 12 May 2021, Martin Sebor via Gcc-patches wrote: > An erroneous VLA parameter bound in a function redeclaration causes > an ICE as the -Wvla-parameter is trying to format a diagnostic after > an error has already been issued. The attached change prevents > such parameters from being

[PATCH] avoid erroneous VLA bounds (PR 100550)

2021-05-12 Thread Martin Sebor via Gcc-patches
An erroneous VLA parameter bound in a function redeclaration causes an ICE as the -Wvla-parameter is trying to format a diagnostic after an error has already been issued. The attached change prevents such parameters from being considered. This patch is for trunk and GCC 11. Martin PR c/100550

Re: [PATCH v2] c++: Check attributes on friend declarations [PR99032]

2021-05-12 Thread Marek Polacek via Gcc-patches
On Wed, May 12, 2021 at 12:21:26PM -0400, Jason Merrill wrote: > On 5/12/21 11:03 AM, Marek Polacek wrote: > > On Wed, May 12, 2021 at 10:37:50AM -0400, Jason Merrill wrote: > > > On 5/11/21 10:45 PM, Marek Polacek wrote: > > > > This patch implements [dcl.attr.grammar]/5: "If an > > > >

Re: [PATCH 4/4] rs6000: Add ROP tests

2021-05-12 Thread Segher Boessenkool
On Sun, Apr 25, 2021 at 08:50:18PM -0500, Bill Schmidt wrote: > --- /dev/null > +++ b/gcc/testsuite/gcc.target/powerpc/rop-1.c > @@ -0,0 +1,16 @@ > +/* { dg-do compile } */ > +/* { dg-options "-O2 -mdejagnu-cpu=power10 -mrop-protect" } */ This should only run on ELFv2 currently, no? > +/* {

Re: [PATCH 4/4] rs6000: Add ROP tests

2021-05-12 Thread Segher Boessenkool
On Mon, Apr 26, 2021 at 02:27:45PM -0500, Bill Schmidt wrote: > On 4/26/21 11:04 AM, will schmidt wrote: > >Does there need to be another test to verify if -mrop-protect is on by > >default without specifying -mrop-protect? (or is it?) Question on > >0/4. > > It's off by default (see the

Re: [PATCH 3/4] rs6000: Conditionally define __ROP_PROTECT__

2021-05-12 Thread Segher Boessenkool
On Sun, Apr 25, 2021 at 08:50:17PM -0500, Bill Schmidt wrote: > 2021-03-25 Bill Schmidt > > gcc/ > * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Define > __ROP_PROTECT__ if -mrop-protect is selected. Okay for trunk and 11. Thanks! Segher

Re: [PATCH 3/4] rs6000: Conditionally define __ROP_PROTECT__

2021-05-12 Thread Segher Boessenkool
On Mon, Apr 26, 2021 at 11:03:22AM -0500, will schmidt wrote: > On Sun, 2021-04-25 at 20:50 -0500, Bill Schmidt via Gcc-patches wrote: > > @@ -602,6 +602,9 @@ rs6000_target_modify_macros (bool define_p, > > HOST_WIDE_INT flags, > >/* Whether pc-relative code is being generated. */ > >if

Re: [PATCH 2/4] rs6000: Emit ROP-protect instructions in prologue and epilogue

2021-05-12 Thread Segher Boessenkool
Hi! On Sun, Apr 25, 2021 at 08:50:16PM -0500, Bill Schmidt wrote: > Insert the hashst and hashchk instructions when -mrop-protect has been > selected. The encrypted save slot for ROP mitigation is placed > between the parameter save area and the alloca space (if any; > otherwise the local

[PATCH,V3 1/2] opts: change write_symbols to support bitmasks

2021-05-12 Thread Indu Bhagat via Gcc-patches
[No changes from V2] To support multiple debug formats, we need to move away from explicit enumeration of each individual combination of debug formats. gcc/c-family/ChangeLog: * c-opts.c (c_common_post_options): Adjust access to debug_type_names. * c-pch.c (struct

[PATCH,V3 2/2] dwarf: new dwarf_debuginfo_p predicate

2021-05-12 Thread Indu Bhagat via Gcc-patches
[Changes from V2] - Tested build (make all-gcc) of cross compiler for target triplets containing c6x/mips/powerpc and darwin/cygwin. [End of changes from V2] This patch introduces a dwarf_debuginfo_p predicate that abstracts and replaces complex checks on write_symbols.

[PATCH, V3 0/2] Fix write_symbols for supporting multiple debug formats

2021-05-12 Thread Indu Bhagat via Gcc-patches
[Changes across versions] [What's new in V2] - (Addressed Richard's comments) - For patch 1/2 [opts: change write_symbols to support bitmasks], use debug_set_names more uniformly. Reworded the diagnostics in c-family/c-opts.c and c-family/c-pch.c as there can be multiple debug formats.

[committed] avoid bogus -Wstringop-overflow with VLA (PR 100571)

2021-05-12 Thread Martin Sebor via Gcc-patches
A recent Glibc enhancement to add attribute access to a bunch of APIs has triggered a couple of false positives in the test suite when using GCC 10. The problem has been fixed on trunk as part of a bigger commit that's not suitable for backporting (it adds new warnings). The attached change

Re: [PATCH 1/2] opts: change write_symbols to support bitmasks

2021-05-12 Thread Indu Bhagat via Gcc-patches
On 5/12/21 12:31 AM, Richard Biener wrote: Otherwise looks OK. Did you check for write_symbols uses in FEs and targets? Richard. Yes, I have. I must admit I have gone back and forth in my mind on this. My initial thinking was to adjust only those checks where I expect more than 1

Re: [PUSHED] Skip out on processing __builtin_clz when varying.

2021-05-12 Thread Jakub Jelinek via Gcc-patches
On Wed, May 12, 2021 at 05:01:00PM -0400, Aldy Hernandez via Gcc-patches wrote: > > PR c/100521 > * gimple-range.cc (range_of_builtin_call): Skip out on > processing __builtin_clz when varying. > --- > gcc/gimple-range.cc | 2 +- > gcc/testsuite/gcc.dg/pr100521.c

[PUSHED] Skip out on processing __builtin_clz when varying.

2021-05-12 Thread Aldy Hernandez via Gcc-patches
The previous changes to irange::constant_p return TRUE for VARYING, since VARYING has numerical end points like any other constant range. The problem is that some users of constant_p depended on constant_p excluding the full domain. The range handler for __builtin_clz, that is shared between

Re: [PATCH 1/4] rs6000: Add -mrop-protect and -mprivileged flags

2021-05-12 Thread Segher Boessenkool
On Mon, Apr 26, 2021 at 11:02:53AM -0500, will schmidt wrote: > On Sun, 2021-04-25 at 20:50 -0500, Bill Schmidt via Gcc-patches wrote: > > + /* If we are inserting ROP-protect instructions, disable shrink wrap. */ > > + if (rs6000_rop_protect) > > +{ > > + flag_shrink_wrap = 0; > > +

Re: [PATCH 1/4] rs6000: Add -mrop-protect and -mprivileged flags

2021-05-12 Thread Segher Boessenkool
On Sun, Apr 25, 2021 at 08:50:15PM -0500, Bill Schmidt wrote: > + /* If we are inserting ROP-protect instructions, disable shrink wrap. */ > + if (rs6000_rop_protect) > +{ > + flag_shrink_wrap = 0; > + flag_shrink_wrap_separate = 0; > +} Separate shrink-wrapping requires

[r12-742 Regression] FAIL: libgomp.oacc-c++/../libgomp.oacc-c-c++-common/data-clauses-parallel-ipa-pta.c -DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable -O2 (test for excess errors) on L

2021-05-12 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, 7d7d925d0d799eb9dda4a6bd6162af0a7db9c98b is the first bad commit commit 7d7d925d0d799eb9dda4a6bd6162af0a7db9c98b Author: Martin Liska Date: Thu Apr 22 16:27:19 2021 +0200 Print warning diagnostics for -flto issues. caused FAIL: gcc.dg/atomic/c11-atomic-exec-2.c -O2

[r12-731 Regression] FAIL: g++.target/i386/pr98218-1.C -std=gnu++98 scan-assembler-times pcmpgtd 2 on Linux/x86_64

2021-05-12 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, b1f7fd8a2a5558da1e101de11bb1cdba081ce010 is the first bad commit commit b1f7fd8a2a5558da1e101de11bb1cdba081ce010 Author: Uros Bizjak Date: Wed May 12 08:11:18 2021 +0200 i386: Implement FP vector compares for V2SFmode [PR98218] caused FAIL: g++.target/i386/pr98218-1.C

Re: [Committed] MAINTAINERS: Add myself for write after approval

2021-05-12 Thread Marcel Vollweiler
Am 12.05.2021 um 19:37 schrieb Marcel Vollweiler: - Mentor Graphics (Deutschland) GmbH, Arnulfstrasse 201, 80634 München Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Frank Thürauf - Mentor Graphics (Deutschland) GmbH, Arnulfstrasse 201,

Re: [PATCH] middle-end/100464 - avoid spurious TREE_ADDRESSABLE in folding debug stmts

2021-05-12 Thread Martin Sebor via Gcc-patches
On 5/7/21 4:21 AM, Richard Biener via Gcc-patches wrote: On Fri, May 7, 2021 at 12:17 PM Richard Biener wrote: canonicalize_constructor_val was setting TREE_ADDRESSABLE on bases of ADDR_EXPRs but that's futile when we're dealing with CTOR values in debug stmts. This rips out the code which

[Committed] MAINTAINERS: Add myself for write after approval

2021-05-12 Thread Marcel Vollweiler
- Mentor Graphics (Deutschland) GmbH, Arnulfstrasse 201, 80634 München Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Frank Thürauf commit 8982a5354d2697eeb12a77d49b6730db90053618 Author: Marcel Vollweiler Date: Wed May 12 10:14:41 2021 -0700

Re: [PATCH] c++: Disable -Wint-in-bool-context in instantiations

2021-05-12 Thread Jason Merrill via Gcc-patches
On 5/12/21 12:21 PM, Marek Polacek wrote: This warning is of questionable value when it's emitted when instantiating a template, as in the following testcase. It could be silenced by writing hb(i) << 1 instead of 2 * hb(i) but that's unnecessary obfuscation. Bootstrapped/regtested on

Re: [PATCH][nvptx] Add -mptx=3.1/6.3

2021-05-12 Thread Tom de Vries
On 5/12/21 5:50 PM, Tobias Burnus wrote: > Hi, > > On 12.05.21 16:10, Tom de Vries wrote: >> Add nvptx option -mptx that sets the ptx ISA version.  This is currently >> hardcoded to 3.1. >> Tested libgomp on x86_64-linux with nvptx accelerator, both with >> default set to >> 3.1 and 6.3. >> Any

Re: [PATCH] c++: Check attributes on friend declarations [PR99032]

2021-05-12 Thread Jason Merrill via Gcc-patches
On 5/12/21 11:03 AM, Marek Polacek wrote: On Wed, May 12, 2021 at 10:37:50AM -0400, Jason Merrill wrote: On 5/11/21 10:45 PM, Marek Polacek wrote: This patch implements [dcl.attr.grammar]/5: "If an attribute-specifier-seq appertains to a friend declaration ([class.friend]), that declaration

[PATCH] c++: Disable -Wint-in-bool-context in instantiations

2021-05-12 Thread Marek Polacek via Gcc-patches
This warning is of questionable value when it's emitted when instantiating a template, as in the following testcase. It could be silenced by writing hb(i) << 1 instead of 2 * hb(i) but that's unnecessary obfuscation. Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? gcc/cp/ChangeLog:

Re: [PATCH] PR libstdc++/89728 diagnose some missuses of [locale.convenience] functions

2021-05-12 Thread Jonathan Wakely via Gcc-patches
On 12/05/21 18:51 +0300, Antony Polukhin via Libstdc++ wrote: ср, 12 мая 2021 г. в 18:38, Antony Polukhin : ср, 12 мая 2021 г. в 17:44, Jonathan Wakely : > > On 12/05/21 12:58 +0300, Antony Polukhin wrote: > >ср, 12 мая 2021 г. в 12:18, Jonathan Wakely : > ><...> > >> Or just leave it

Re: [PATCH] PR libstdc++/89728 diagnose some missuses of [locale.convenience] functions

2021-05-12 Thread Antony Polukhin via Gcc-patches
ср, 12 мая 2021 г. в 18:38, Antony Polukhin : > > ср, 12 мая 2021 г. в 17:44, Jonathan Wakely : > > > > On 12/05/21 12:58 +0300, Antony Polukhin wrote: > > >ср, 12 мая 2021 г. в 12:18, Jonathan Wakely : > > ><...> > > >> Or just leave it undefined, as libc++ seems to do according to your > > >>

Re: [PATCH][nvptx] Add -mptx=3.1/6.3

2021-05-12 Thread Tobias Burnus
Hi, On 12.05.21 16:10, Tom de Vries wrote: Add nvptx option -mptx that sets the ptx ISA version. This is currently hardcoded to 3.1. Tested libgomp on x86_64-linux with nvptx accelerator, both with default set to 3.1 and 6.3. Any comments? :-) ISA 3.1 = CUDA 5 (supporting sm_10 to

Re: [PATCH] PR libstdc++/89728 diagnose some missuses of [locale.convenience] functions

2021-05-12 Thread Antony Polukhin via Gcc-patches
ср, 12 мая 2021 г. в 17:44, Jonathan Wakely : > > On 12/05/21 12:58 +0300, Antony Polukhin wrote: > >ср, 12 мая 2021 г. в 12:18, Jonathan Wakely : > ><...> > >> Or just leave it undefined, as libc++ seems to do according to your > >> comment in PR 89728: > >> > >> error: implicit instantiation of

[PATCH] IBM Z: Avoid bash-specific substitution in configure

2021-05-12 Thread Marius Hillenbrand via Gcc-patches
Tested configure runs on NetBSD x86-64, Linux on x86-64 (with target s390x), and on s390x. Is the patch ok for master, and for gcc-11? 8<--8<--8<- Fix a bootstrap error observed on NetBSD. 2021-05-12 Marius Hillenbrand gcc/ChangeLog: PR bootstrap/100552 *

Re: [PATCH 2/2] c/100547 - reject overly large vector_size attributes

2021-05-12 Thread Martin Sebor via Gcc-patches
On 5/12/21 2:47 AM, Richard Biener wrote: This rejects a number of vector components that does not fit an 'int' which is an internal limitation of RTVEC. This regresses gcc.dg/attr-vector_size.c which checks for much larger supported vectors. Not sure what to do about this - I'll also note the

Re: [PATCH] c++: Check attributes on friend declarations [PR99032]

2021-05-12 Thread Marek Polacek via Gcc-patches
On Wed, May 12, 2021 at 10:37:50AM -0400, Jason Merrill wrote: > On 5/11/21 10:45 PM, Marek Polacek wrote: > > This patch implements [dcl.attr.grammar]/5: "If an attribute-specifier-seq > > appertains to a friend declaration ([class.friend]), that declaration shall > > be a definition." > > > >

Re: [PR66791][ARM] Replace __builtin_neon_vtst*

2021-05-12 Thread Richard Earnshaw via Gcc-patches
On 12/05/2021 12:05, Prathamesh Kulkarni via Gcc-patches wrote: > On Wed, 12 May 2021 at 16:02, Richard Earnshaw > wrote: >> >> >> >> On 12/05/2021 08:46, Prathamesh Kulkarni via Gcc-patches wrote: >>> On Mon, 10 May 2021 at 19:55, Richard Earnshaw >>> wrote: On 06/05/2021

[PATCH] tree-optimization/100566 - fix another predication issue in VN

2021-05-12 Thread Richard Biener
This amends the fix for PR100053 where I failed to amend all edge tests in dominated_by_p_w_unex. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed to trunk sofar. 2021-05-12 Richard Biener PR tree-optimization/100566 * tree-ssa-sccvn.c (dominated_by_p_w_unex):

Re: [Patch] OpenMP: detach - fix firstprivate handling

2021-05-12 Thread Jakub Jelinek via Gcc-patches
On Tue, May 11, 2021 at 11:54:58PM +0200, Tobias Burnus wrote: > The sfield / firstprivate lookup used the wrong var decl > for the lookup – hence it failed. > I used an extra long diff to make it easier to follow why > 'c' and not 'detach_clause' has the proper clause for the > decl to be used as

Re: [PATCH] OpenMP: Add support for 'close' in map clause

2021-05-12 Thread Jakub Jelinek via Gcc-patches
On Wed, May 12, 2021 at 04:36:00PM +0200, Marcel Vollweiler wrote: > + c_parser_error (parser, "%<#pragma omp target%> with map-type-" > + "modifier other than % or %" Please just write modifier rather than map-type-modifier > + cp_parser_error (parser,

Re: [PATCH] PR libstdc++/89728 diagnose some missuses of [locale.convenience] functions

2021-05-12 Thread Jonathan Wakely via Gcc-patches
On 12/05/21 12:58 +0300, Antony Polukhin wrote: ср, 12 мая 2021 г. в 12:18, Jonathan Wakely : <...> Or just leave it undefined, as libc++ seems to do according to your comment in PR 89728: error: implicit instantiation of undefined template 'std::__1::ctype >' Was your aim to have a

Re: [PATCH 1/1] PR100281 C++: Fix SImode pointer handling

2021-05-12 Thread Jason Merrill via Gcc-patches
On 4/30/21 2:32 AM, Andreas Krebbel via Gcc-patches wrote: The problem appears to be triggered by two locations in the front-end where non-POINTER_SIZE pointers aren't handled right now. 1. An assertion in strip_typedefs is triggered because the alignment of the types don't match. This in turn

Re: [PATCH] c++: Check attributes on friend declarations [PR99032]

2021-05-12 Thread Jason Merrill via Gcc-patches
On 5/11/21 10:45 PM, Marek Polacek wrote: This patch implements [dcl.attr.grammar]/5: "If an attribute-specifier-seq appertains to a friend declaration ([class.friend]), that declaration shall be a definition." This restriction only applies to C++11-style attributes. There are various forms of

Re: [PATCH] OpenMP: Add support for 'close' in map clause

2021-05-12 Thread Marcel Vollweiler
Am 11.05.2021 um 17:20 schrieb Jakub Jelinek: On Tue, May 11, 2021 at 04:27:55PM +0200, Marcel Vollweiler wrote: The usual wording would be "too many % modifiers" Changed for 'always' and 'close' for C and C++. One extra thing, sorry, forgot to mention, for the translators it might be

Re: Patch ping (Re: [PATCH] ix86: Support V{2, 4}DImode arithmetic right shifts for SSE2+ [PR98856])

2021-05-12 Thread Uros Bizjak via Gcc-patches
On Wed, May 12, 2021 at 3:06 PM Jakub Jelinek wrote: > > On Fri, Apr 23, 2021 at 03:46:59PM +0200, Jakub Jelinek via Gcc-patches wrote: > > On Tue, Feb 09, 2021 at 12:12:24PM +0100, Jakub Jelinek via Gcc-patches > > wrote: > > > As mentioned in the PR, we don't support arithmetic right V2DImode

Re: [PATCH] [i386] Optimize __builtin_shuffle when it's used to zero the upper bits of the dest. [PR target/94680]

2021-05-12 Thread Jakub Jelinek via Gcc-patches
On Sun, Apr 25, 2021 at 02:57:08PM +0800, Hongtao Liu via Gcc-patches wrote: > gcc/ChangeLog: > > PR target/94680 > * config/i386/sse.md (ssedoublevecmode): Add attribute for > V64QI/V32HI/V16SI/V4DI. > (ssehalfvecmode): Add attribute for V2DI/V2DF. >

[PATCH][nvptx] Add -mptx=3.1/6.3

2021-05-12 Thread Tom de Vries
Hi, Add nvptx option -mptx that sets the ptx ISA version. This is currently hardcoded to 3.1. Tested libgomp on x86_64-linux with nvptx accelerator, both with default set to 3.1 and 6.3. Any comments? Thanks, - Tom [nvptx] Add -mptx=3.1/6.3 gcc/ChangeLog: 2021-05-12 Tom de Vries

[committed] libstdc++: Fix some problems in PSTL tests

2021-05-12 Thread Jonathan Wakely via Gcc-patches
libstdc++-v3/ChangeLog: * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: Increase dg-timeout-factor to 4. Fix -Wunused-parameter warnings. Replace bitwise AND with logical AND in loop condition. *

Patch ping (Re: [PATCH] ix86: Support V{2, 4}DImode arithmetic right shifts for SSE2+ [PR98856])

2021-05-12 Thread Jakub Jelinek via Gcc-patches
On Fri, Apr 23, 2021 at 03:46:59PM +0200, Jakub Jelinek via Gcc-patches wrote: > On Tue, Feb 09, 2021 at 12:12:24PM +0100, Jakub Jelinek via Gcc-patches wrote: > > As mentioned in the PR, we don't support arithmetic right V2DImode or > > V4DImode on x86 without -mavx512vl or -mxop. The ISAs

Re: [PATCH] i386: Optimize vpblendvb on inverted mask register to vpblendvb on swapping the order of operand 1 and operand 2. [PR target/99908]

2021-05-12 Thread Uros Bizjak via Gcc-patches
On Wed, May 12, 2021 at 1:42 PM Hongtao Liu wrote: > > On Wed, May 12, 2021 at 4:36 PM Uros Bizjak wrote: > > > > On Tue, Apr 27, 2021 at 1:05 PM Hongtao Liu via Gcc-patches > > wrote: > > > > > > Hi: > > > As described in the subject line, this patch is about to do the > > > below

Re: [PATCH] PR libstdc++/89728 diagnose some missuses of [locale.convenience] functions

2021-05-12 Thread Antony Polukhin via Gcc-patches
ср, 12 мая 2021 г. в 12:58, Antony Polukhin : <...> > Should we care about those users? Looks like the answer is "yes". There are tests for that in 22_locale/ctype/requirements/explicit_instantiation.cc and 22_locale/money_get/cons/3.cc Attaching a patch with review fixes (with ctype

Re: [PATCH v2 03/11] Remove MAX_BITSIZE_MODE_ANY_INT

2021-05-12 Thread Richard Biener via Gcc-patches
On Wed, May 12, 2021 at 2:06 PM H.J. Lu wrote: > > On Wed, May 12, 2021 at 2:00 AM Richard Biener > wrote: > > > > On Wed, May 12, 2021 at 1:35 AM H.J. Lu wrote: > > > > > > It is only defined for i386 and everyone uses the default: > > > > > > #define MAX_BITSIZE_MODE_ANY_INT

Re: [PATCH] lto-wrapper: silent warnings in tests

2021-05-12 Thread Richard Biener via Gcc-patches
On Wed, May 12, 2021 at 2:06 PM Martin Liška wrote: > > Silents the following warning: > lto-wrapper: warning: using serial compilation of 2 LTRANS jobs > > Ready to be installed? OK. > Thanks, > Martin > > gcc/testsuite/ChangeLog: > > * lib/lto.exp: When running tests without

[PATCH] lto-wrapper: silent warnings in tests

2021-05-12 Thread Martin Liška
Silents the following warning: lto-wrapper: warning: using serial compilation of 2 LTRANS jobs Ready to be installed? Thanks, Martin gcc/testsuite/ChangeLog: * lib/lto.exp: When running tests without jobserver, one can see the following warning for tests that use 1to1

Re: [PATCH v2 03/11] Remove MAX_BITSIZE_MODE_ANY_INT

2021-05-12 Thread H.J. Lu via Gcc-patches
On Wed, May 12, 2021 at 2:00 AM Richard Biener wrote: > > On Wed, May 12, 2021 at 1:35 AM H.J. Lu wrote: > > > > It is only defined for i386 and everyone uses the default: > > > > #define MAX_BITSIZE_MODE_ANY_INT (64*BITS_PER_UNIT) > > The default is determined by genmodes.c which looks at the

Re: [PATCH] i386: Optimize vpblendvb on inverted mask register to vpblendvb on swapping the order of operand 1 and operand 2. [PR target/99908]

2021-05-12 Thread Hongtao Liu via Gcc-patches
On Wed, May 12, 2021 at 4:36 PM Uros Bizjak wrote: > > On Tue, Apr 27, 2021 at 1:05 PM Hongtao Liu via Gcc-patches > wrote: > > > > Hi: > > As described in the subject line, this patch is about to do the > > below transformation. > > > > - vpcmpeqd%ymm3, %ymm3, %ymm3 > > -

[PATCH] tree-optimization/100519 - avoid reassociating asm goto defs

2021-05-12 Thread Richard Biener
This splits can_associate_p into checks for SSA defs and checks for the type so it can be called from is_reassociable_op to catch cases not catched by the earlier fix. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2021-05-11 Richard Biener PR tree-optimization/100519

Re: [PR66791][ARM] Replace __builtin_neon_vtst*

2021-05-12 Thread Prathamesh Kulkarni via Gcc-patches
On Wed, 12 May 2021 at 16:02, Richard Earnshaw wrote: > > > > On 12/05/2021 08:46, Prathamesh Kulkarni via Gcc-patches wrote: > > On Mon, 10 May 2021 at 19:55, Richard Earnshaw > > wrote: > >> > >> > >> > >> On 06/05/2021 01:14, Prathamesh Kulkarni via Gcc-patches wrote: > >>> Hi, > >>> The

Re: [PATCH] arm: remove error in CPP_SPEC when -mlittle-endian and -mbig-endian are used together

2021-05-12 Thread Richard Earnshaw via Gcc-patches
On 12/05/2021 09:51, Christophe Lyon via Gcc-patches wrote: arm.h has had this error message since 1997, but it is no longer needed since option parsing has been improved: -mXXX-endian is handled via arm.opt and updates the BIG_END mask. So, the last instance of -mXXX-endian on the command

Re: [PR66791][ARM] Replace __builtin_neon_vtst*

2021-05-12 Thread Richard Earnshaw via Gcc-patches
On 12/05/2021 08:46, Prathamesh Kulkarni via Gcc-patches wrote: On Mon, 10 May 2021 at 19:55, Richard Earnshaw wrote: On 06/05/2021 01:14, Prathamesh Kulkarni via Gcc-patches wrote: Hi, The attached patch replaces __builtin_neon_vtst* (a, b) with (a & b) != 0. Bootstrapped and tested on

Re: [PATCH] PR libstdc++/89728 diagnose some missuses of [locale.convenience] functions

2021-05-12 Thread Antony Polukhin via Gcc-patches
ср, 12 мая 2021 г. в 12:18, Jonathan Wakely : <...> > Or just leave it undefined, as libc++ seems to do according to your > comment in PR 89728: > > error: implicit instantiation of undefined template > 'std::__1::ctype >' > > Was your aim to have a static_assert that gives a more descriptive >

[GCC-10 backport][PATCH] arm: Remove duplicate definitions from arm_mve.h (pr100419).

2021-05-12 Thread Srinath Parvathaneni via Gcc-patches
Hi, This is a backport to GCC-10 branch, this patch got applied cleanly on the branch. This patch removes several duplicated intrinsic definitions from arm_mve.h mentioned in PR100419 and also fixes the wrong arguments in few of intrinsics polymorphic variants. Ok for GCC-10 branch?

[GCC-11 backport][PATCH] arm: Remove duplicate definitions from arm_mve.h (pr100419).

2021-05-12 Thread Srinath Parvathaneni via Gcc-patches
Hi, This is a backport to GCC-11 branch, this patch got applied cleanly on the branch. This patch removes several duplicated intrinsic definitions from arm_mve.h mentioned in PR100419 and also fixes the wrong arguments in few of intrinsics polymorphic variants. Ok for GCC-11 branch?

[PATCH] aarch64: Merge sqdmlal2 and sqdmlsl2 expanders

2021-05-12 Thread Kyrylo Tkachov via Gcc-patches
Hi all, The various sqdmlal2 and sqdmlsl2 expanders perform almost identical functions and can be merged using code iterators and attributes to reduce the code in the MD file. No behavioural change is expected. Bootstrapped and tested on aarch64-non-linux-gnu. Pushing to trunk. Thanks, Kyrill

Re: [PATCH] LTO: fallback to -flto=N if -flto=jobserver does not work.

2021-05-12 Thread Richard Biener via Gcc-patches
On Wed, May 12, 2021 at 11:10 AM Martin Liška wrote: > > May I please ping this Richi? OK. Thanks, Richard. > Thanks, > Martin > > On 4/22/21 4:30 PM, Martin Liška wrote: > > On 4/22/21 2:47 PM, Richard Biener wrote: > >> On Thu, Apr 22, 2021 at 2:21 PM Martin Liška wrote: > >>> > >>> On

Re: [PATCH] PR libstdc++/89728 diagnose some missuses of [locale.convenience] functions

2021-05-12 Thread Jonathan Wakely via Gcc-patches
On 11/05/21 21:00 +0100, Jonathan Wakely wrote: Alternatively, would it be even simpler to just define a partial specialization of ctype? template class ctype > { #if __cplusplus >= 201103L static_assert(something dependent, "std::basic_string used as a character

Re: [PATCH] lto-wrapper: Use vec data type.

2021-05-12 Thread Richard Biener via Gcc-patches
On Wed, May 12, 2021 at 11:08 AM Martin Liška wrote: > > On 4/29/21 2:22 PM, Richard Biener wrote: > > On Wed, Apr 21, 2021 at 11:12 AM Martin Liška wrote: > >> > >> Now living in the 21st century, we don't longer need using the following > >> tuple: > >> cl_decoded_option **decoded_options, >

Re: [PATCH] LTO: fallback to -flto=N if -flto=jobserver does not work.

2021-05-12 Thread Martin Liška
May I please ping this Richi? Thanks, Martin On 4/22/21 4:30 PM, Martin Liška wrote: On 4/22/21 2:47 PM, Richard Biener wrote: On Thu, Apr 22, 2021 at 2:21 PM Martin Liška wrote: On 4/22/21 1:19 PM, Richard Biener wrote: On Thu, Apr 22, 2021 at 11:02 AM Martin Liška wrote: On 4/22/21

Re: [PATCH] lto-wrapper: Use vec data type.

2021-05-12 Thread Martin Liška
On 4/29/21 2:22 PM, Richard Biener wrote: On Wed, Apr 21, 2021 at 11:12 AM Martin Liška wrote: Now living in the 21st century, we don't longer need using the following tuple: cl_decoded_option **decoded_options, unsigned int *decoded_options_count) but we can rather use a standard (our)

Re: retry zero-call-used-regs from zeroed regs

2021-05-12 Thread Richard Biener via Gcc-patches
On Wed, May 12, 2021 at 3:44 AM Alexandre Oliva wrote: > > > default_zero_call_used_regs currently requires all potentially zeroed > registers to offer a move opcode that accepts zero as an operand. > > This is not the case e.g. for ARM's r12/ip in Thumb mode, and it was > not the case of FP

Re: [PATCH v2 03/11] Remove MAX_BITSIZE_MODE_ANY_INT

2021-05-12 Thread Richard Biener via Gcc-patches
On Wed, May 12, 2021 at 1:35 AM H.J. Lu wrote: > > It is only defined for i386 and everyone uses the default: > > #define MAX_BITSIZE_MODE_ANY_INT (64*BITS_PER_UNIT) The default is determined by genmodes.c which looks at the maximum size of any [partial] integer mode. Since we have INT_MODE

[PATCH][OBVIOUS] Remove version.h from object files

2021-05-12 Thread Martin Liška
Pushed as obvious. Martin gcc/ChangeLog: PR bootstrap/100560 * Makefile.in: Remove version.h from linker command line. --- gcc/Makefile.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 487db220d8c..1b5d3f4696c

[PATCH] arm: remove error in CPP_SPEC when -mlittle-endian and -mbig-endian are used together

2021-05-12 Thread Christophe Lyon via Gcc-patches
arm.h has had this error message since 1997, but it is no longer needed since option parsing has been improved: -mXXX-endian is handled via arm.opt and updates the BIG_END mask. So, the last instance of -mXXX-endian on the command line wins. Tested on many arm* configurations, with no impact on

[PATCH 2/2] c/100547 - reject overly large vector_size attributes

2021-05-12 Thread Richard Biener
This rejects a number of vector components that does not fit an 'int' which is an internal limitation of RTVEC. This regresses gcc.dg/attr-vector_size.c which checks for much larger supported vectors. Not sure what to do about this - I'll also note the RTVEC limitation is a host specific

[PATCH 1/2] middle-end/100547 - check rtvec_alloc size

2021-05-12 Thread Richard Biener
This makes the rtvec_alloc argument size_t catching overflow and truncated arguments (from "invalid" testcases), verifying the argument against INT_MAX which is the limit set by the int typed rtvec_def.num_elem member. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2021-05-12

[PATCH] gcc-changelog: respect branch in git_update_version.py.

2021-05-12 Thread Martin Liška
Hi. The patch fixes Dially bump strict. Pushed to master. Martin contrib/ChangeLog: * gcc-changelog/git_commit.py: Simplify needle lookup. * gcc-changelog/git_update_version.py: Pass ref_name to parse_git_revisions. --- contrib/gcc-changelog/git_commit.py | 2

Re: [PATCH] i386: Optimize vpblendvb on inverted mask register to vpblendvb on swapping the order of operand 1 and operand 2. [PR target/99908]

2021-05-12 Thread Uros Bizjak via Gcc-patches
On Tue, Apr 27, 2021 at 1:05 PM Hongtao Liu via Gcc-patches wrote: > > Hi: > As described in the subject line, this patch is about to do the > below transformation. > > - vpcmpeqd%ymm3, %ymm3, %ymm3 > - vpandn %ymm3, %ymm2, %ymm2 > - vpblendvb %ymm2, %ymm1,

Re: [PATCH 1/1] PR100281 C++: Fix SImode pointer handling

2021-05-12 Thread Andreas Krebbel via Gcc-patches
Ping On 4/30/21 8:32 AM, Andreas Krebbel via Gcc-patches wrote: > The problem appears to be triggered by two locations in the front-end > where non-POINTER_SIZE pointers aren't handled right now. > > 1. An assertion in strip_typedefs is triggered because the alignment > of the types don't match.

Re: [PATCH] ada: do not use binary mode in conf.py

2021-05-12 Thread Arnaud Charlet
> It's about more porting to Python3. > > Ready for master? OK, thanks. > gcc/ada/ChangeLog: > > * doc/share/conf.py: Do not use binary mode. > Do not use u' literals as Python3 uses unicode by default.

Re: [PATCH] expand: Don't reuse DEBUG_EXPRs with vector type if they have different modes [PR100508]

2021-05-12 Thread Richard Biener
On Wed, 12 May 2021, Jakub Jelinek wrote: > Hi! > > The inliner doesn't remap DEBUG_EXPR_DECLs, so the same decls can appear > in multiple functions. > Furthermore, expansion reuses corresponding DEBUG_EXPRs too, so they again > can be reused in multiple functions. > Neither of that is a major

Re: [PATCH] Fix ICE in output_rnglists, at dwarf2out.c:12294 [PR100515]

2021-05-12 Thread Richard Biener
On Wed, 12 May 2021, Bernd Edlinger wrote: > Hi, > > this fixes another regression from my previous patch. > > > Bootstrapped and reg-tested on x86_64-pc-linux-gnu. > Is it OK for trunk? OK. Richard. > > Thanks > Bernd. >

[PATCH] expand: Don't reuse DEBUG_EXPRs with vector type if they have different modes [PR100508]

2021-05-12 Thread Jakub Jelinek via Gcc-patches
Hi! The inliner doesn't remap DEBUG_EXPR_DECLs, so the same decls can appear in multiple functions. Furthermore, expansion reuses corresponding DEBUG_EXPRs too, so they again can be reused in multiple functions. Neither of that is a major problem, DEBUG_EXPRs are just magic value holders and what

[PATCH] Fix ICE in output_rnglists, at dwarf2out.c:12294 [PR100515]

2021-05-12 Thread Bernd Edlinger
Hi, this fixes another regression from my previous patch. Bootstrapped and reg-tested on x86_64-pc-linux-gnu. Is it OK for trunk? Thanks Bernd. From 62da66525c4b7ac1cfd5cad5b8e690ce928802e5 Mon Sep 17 00:00:00 2001 From: Bernd Edlinger Date: Tue, 11 May 2021 17:55:18 +0200 Subject: [PATCH]

Re: [PR66791][ARM] Replace __builtin_neon_vtst*

2021-05-12 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 10 May 2021 at 19:55, Richard Earnshaw wrote: > > > > On 06/05/2021 01:14, Prathamesh Kulkarni via Gcc-patches wrote: > > Hi, > > The attached patch replaces __builtin_neon_vtst* (a, b) with (a & b) != 0. > > Bootstrapped and tested on arm-linux-gnueabihf and cross-tested on arm*-*-*. > >

Re: [PATCH 1/2] opts: change write_symbols to support bitmasks

2021-05-12 Thread Richard Biener via Gcc-patches
On Tue, May 11, 2021 at 4:45 PM Indu Bhagat wrote: > > On 5/10/21 6:11 AM, Richard Biener wrote: > > On Thu, May 6, 2021 at 2:31 AM Indu Bhagat via Gcc-patches > > wrote: > >> > >> To support multiple debug formats, we need to move away from explicit > >> enumeration of each individual

Re: [PATCH] [i386] Optimize __builtin_shuffle when it's used to zero the upper bits of the dest. [PR target/94680]

2021-05-12 Thread Hongtao Liu via Gcc-patches
ping. On Sun, Apr 25, 2021 at 2:57 PM Hongtao Liu wrote: > > On Fri, Apr 23, 2021 at 5:13 PM Jakub Jelinek wrote: > > > > On Fri, Apr 23, 2021 at 12:53:58PM +0800, Hongtao Liu via Gcc-patches wrote: > > > + if (!CONST_INT_P (er)) > > > + return 0; > > > + ei = INTVAL (er); > > > +

Re: [PATCH] i386: Optimize vpblendvb on inverted mask register to vpblendvb on swapping the order of operand 1 and operand 2. [PR target/99908]

2021-05-12 Thread Hongtao Liu via Gcc-patches
ping On Tue, Apr 27, 2021 at 5:58 PM Hongtao Liu wrote: > > Hi: > As described in the subject line, this patch is about to do the > below transformation. > > - vpcmpeqd%ymm3, %ymm3, %ymm3 > - vpandn %ymm3, %ymm2, %ymm2 > - vpblendvb %ymm2, %ymm1, %ymm0, %ymm0 >

Re: [PATCH][AVX512] Fix ICE for vpexpand*.

2021-05-12 Thread Hongtao Liu via Gcc-patches
ping On Fri, Apr 30, 2021 at 12:42 PM Hongtao Liu wrote: > > Hi: > This patch is to fix ice which was introduced by my > r11-5696-g35c4c67e6c534ef3d6ba7a7752ab7e0fbc91755b. > Bootstrapped and regtested on x86_64-linux-gnu{-m32,}. > Ok for trunk and backport to GCC11? > > gcc/ChangeLog >

Re: [PATCH][AVX512] Optimize vpexpand* to mask mov when mask have all ones in it's lower part (including 0 and -1).

2021-05-12 Thread Hongtao Liu via Gcc-patches
ping On Fri, Apr 30, 2021 at 12:49 PM Hongtao Liu wrote: > > Hi: > For v{,p}expand* When mask is 0, -1, or has all all one bits in its > lower part, it can be optimized to simple mov or mask mov. > Bootstrapped and regtested on x86_64-linux-gnu{-m32,} and > x86_64-linux-gnu{m32\

Re: [PATCH] x86-64: Remove HAVE_LD_PIE_COPYRELOC

2021-05-12 Thread Fangrui Song via Gcc-patches
On 2021-05-12, Rainer Orth wrote: Hi Fangrui, Hi Rainer, for -fPIE. Now that we have H.J. Lu's GOTPCRELX for years which mostly nullify the benefit of HAVE_LD_PIE_COPYRELOC, HAVE_LD_PIE_COPYRELOC should retire now. Solaris/x86 ld doesn't support this, so HAVE_LD_PIE_COPYRELOC needs to

[PATCH] i386: Implement FP vector compares for V2SFmode [PR98218]

2021-05-12 Thread Uros Bizjak via Gcc-patches
Implement FP vector compares for V2SFmode for TARGET_MMX_WITH_SSE. 2021-05-12 Uroš Bizjak gcc/ PR target/98218 * config/i386/i386-expand.c (ix86_expand_sse_movcc): Handle V2SF mode. * config/i386/mmx.md (MMXMODE124): New mode iterator. (V2FI): Ditto. (mmxintvecmode): New