Re: [PATCH] target/100312 - make x86 masked load builtins pure

2021-04-29 Thread Richard Biener
On Wed, 28 Apr 2021, Uros Bizjak wrote: > On Wed, Apr 28, 2021 at 3:32 PM Richard Biener wrote: > > > > On Wed, 28 Apr 2021, Uros Bizjak wrote: > > > > > On Wed, Apr 28, 2021 at 1:46 PM Richard Biener wrote: > > > > > > > > On Wed, 28 Apr 2021, Uros Bizjak wrote: > > > > > > > > > On Wed, Apr 28

[Ada] Spurious error on 'Image

2021-04-29 Thread Pierre-Marie de Rodat
As part of recent improvements related to discriminant checks, a regression was introduced in complex cases of generics and use of 'Image on an expression partially rewritten as a [raise Constraint_Error] node. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_attr.adb (Ch

[Ada] Warning for 'Class applied to untagged incomplete type

2021-04-29 Thread Pierre-Marie de Rodat
Applying Class to an untagged incomplete type is legal, but classified as obsolescent in Annex J (for Ada 2005 and later), so should be flagged with a warning when the -gnatwj switch applies, as well as being reported as a violation of No_Obsolescent_Features when that restriction is enabled. Both

[Ada] AI12-0407: Fixups on Big_Integers and Big_Reals

2021-04-29 Thread Pierre-Marie de Rodat
This AI updates among other things some declarations in big number packages. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/a-nbnbin.ads (From_Universal_Image): New. (Big_Integer): Update definition. * libgnat/a-nbnbre.ads, libgnat/a-nbnbre.adb

[Ada] Fixes in the use of spans for error locations

2021-04-29 Thread Pierre-Marie de Rodat
Various fixes regarding the use of spans in error messages when using debug flag -gnatdF. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * errout.adb (Error_Msg_NEL): Extract span from node. (First_And_Last_Nodes): Use spans for subtype indications and attribu

[Ada] Reimplement Pred and Succ atttributes for floating-point types

2021-04-29 Thread Pierre-Marie de Rodat
The main reason is that the current implementation does not work if the type does not support denormalized numbers, because it is piggybacked on the Scaling attribute and Scaling will flush to zero in this case. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/s-fatge

[PATCH] middle-end/38474 - speedup PTA constraint solving

2021-04-29 Thread Richard Biener
In testcases like PR38474 and PR99912 we're seeing very slow PTA solving. One can observe an excessive amount of forwarding, mostly during sd constraint solving. The way we solve the graph does not avoid forwarding the same bits through multiple paths, and especially when such alternate path invo

[Ada] Extend Find_Related_Context to deal with child instances

2021-04-29 Thread Pierre-Marie de Rodat
Aspect Part_Of is first translated into a corresponding pragma; then, we use Find_Related_Context to recover the node where the aspect was originally attached. However, this routine was only working for pragmas Part_Of coming from aspects applied to generic packages instantiated within other progr

[Ada] Crash on predicated constrained out_parameter

2021-04-29 Thread Pierre-Marie de Rodat
Compiler aborts on an aggregate for a discriminated out_parameter when the parent type has dynamic_predicates. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_util.adb (Build_Constrained_Itype): Inhibit the generation of predicate functions for this Itype, which

[Ada] Fix static computation of 'Succ for floating point without denormals

2021-04-29 Thread Pierre-Marie de Rodat
The implementation computes an incorrect increment for normalized numbers with the smallest exponent when the floating-point type does not support denormalized numbers. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * eval_fat.adb (Succ): Add a special case for zero if the ty

[Ada] Fix handling of visibility when categorization from pragmas

2021-04-29 Thread Pierre-Marie de Rodat
Routine Set_Categorization_From_Pragmas processes pragmas listed after the compilation unit. It requires enclosing scopes to be visible, to support pragmas (and aspects that are translated to pragmas) like here: with Generic_Pkg; private package Parent.Child_Instance is new Generic_Pkg

[Ada] Makefile.rtl:ADA_EXCLUDE_SRCS update after some System.GCC unit renames

2021-04-29 Thread Pierre-Marie de Rodat
In a previous commit, some System.GCC units were renamed to be children of System.GCC.DI instead, so as to have System.GCC be free of symbols which are specific to 32bit platforms. This was needed in the context of a 64bit vx7r2cert platform (AArch64) where we needed to add equivalent routines spec

[Ada] SPARK needs DIC expressions within partial DIC procedures for abstract types

2021-04-29 Thread Pierre-Marie de Rodat
A recent change done as part of the implementation of AI12-0397 was to suppress generation of DIC check expressions within DIC procedures associated with abstract types (to avoid producing calls to abstract subprograms, which are legal to give in a DIC aspect, but would cause problems for gigi if t

[Ada] Couple of minor tweaks to Eval_Fat.Succ

2021-04-29 Thread Pierre-Marie de Rodat
This saves a few cycles by using Ureal_Half instead of Ureal_1. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * eval_fat.adb (Succ): Use Ureal_Half in a couple of places.diff --git a/gcc/ada/eval_fat.adb b/gcc/ada/eval_fat.adb --- a/gcc/ada/eval_fat.adb +++ b/gcc/ada/eval_fa

[Ada] Ada 2020 AI12-0401: Renaming of qualified expression of variable

2021-04-29 Thread Pierre-Marie de Rodat
A new version of this AI was published recently, refining the legality rules around renaming of a qualified expression. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch8.adb (Analyze_Object_Renaming): Update check for AI12-0401.diff --git a/gcc/ada/sem_ch8.adb

[Ada] Bad handling of array sliding in aggregate

2021-04-29 Thread Pierre-Marie de Rodat
In the case of an aggregate containing controlled array components, if sliding of the indexes is involved, the components are prematurely finalized without a corresponding initialization. Also fix a latent bug in Exp_Aggr.Collect_Initialization_Statements which was not always inserting Initializat

[Ada] Fix internal consistency error with Duration and 32-bit target file

2021-04-29 Thread Pierre-Marie de Rodat
The Duration type of package Standard can be either a 32-bit or a 64-bit fixed-point type depending on a flag in the system.ads file, but it needs to be 32-bit when a target configuration file sets a 32-bit size for all the predefined integer types. Tested on x86_64-pc-linux-gnu, committed on trun

[Ada] Fix evaluation of expressions in inlined code

2021-04-29 Thread Pierre-Marie de Rodat
In GNATprove mode, inlining is used to make it easier to perform proof without forcing the user to annotate all local subprograms with contracts. But the compiled code will not be similarly inlined, thus the analysis should not assume that the compiler will have access to the same extended precisi

[Ada] Missing access-to-discriminated conversion check

2021-04-29 Thread Pierre-Marie de Rodat
The compiler was failing to generate a required constraint check in the case of a type conversion between access-to-discriminated types. This patch fixes this bug. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * checks.adb (Apply_Type_Conversion_Checks): Move out constraint

[Ada] Fix minor issue in Scan_Decimal_Digits

2021-04-29 Thread Pierre-Marie de Rodat
The Extra digit is not correctly set when the precision limit is reached by means of trailing zeros. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/s-valuer.adb (Scan_Decimal_Digits): Set Extra to zero when the precision limit is reached by means of trailing

[Ada] Add colors to GNATprove messages output to a terminal

2021-04-29 Thread Pierre-Marie de Rodat
Add the possibility for a tool to enable colored output using SGR when outputting to a terminal. This is currently used only in GNATprove, but could be enabled for compiler messages in the future. Use the same colors (including bold) as gcc/g++ as much as possible. Tested on x86_64-pc-linux-gnu, c

[Ada] Error on T'Reduce of when T is not a container

2021-04-29 Thread Pierre-Marie de Rodat
This patch fixes a bug that caused the compiler to crash on T'Reduce, if T is something like Integer. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_attr.adb (Analyze_Attribute): Change "$" to "&". Otherwise, Errout will trip over an uninitialized (invalid)

[Ada] Clean up Makefile.rtl

2021-04-29 Thread Pierre-Marie de Rodat
ADA_EXCLUDE_SRCS and ADA_INCLUDE_SRCS contain old references to non existing files. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * Makefile.rtl (ADA_EXCLUDE_SRCS): Remove unused files. (ADA_INCLUDE_SRCS): Remove libgnat/system.adsdiff --git a/gcc/ada/Makefile.rtl b/

[Ada] Change rounding mode of 'Machine for static floating point

2021-04-29 Thread Pierre-Marie de Rodat
This changes the rounding mode used for the static evaluation of the Machine attribute of floating-point types to the mode used for the static evaluation of real expressions, for the sake of consistency. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_attr.adb (Eval_Attr

[Ada] Tree inconsistency between -O0 and -O1

2021-04-29 Thread Pierre-Marie de Rodat
The expansion performed in Expand_N_If_Statement only at -O1 and above can create inconsistencies in the tree that can cause trouble when compiling different files with different optimization levels. This is visible in particular in GNAT LLVM when generating C code on ACATS test cc50a01. Fixed by

[Ada] Fix interaction of 128-bit integer types and -gnato2 mode

2021-04-29 Thread Pierre-Marie de Rodat
The -gnato2 mode of overflow checking, aka Minimized overflow checking, cannot work for 128-bit integer types because it is implemented using 64-bit integer types. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_ch4.adb (Expand_Compare_Minimize_Eliminate_Overflow): Remov

[Ada] Eliminate useless 128-bit overflow check for conversion

2021-04-29 Thread Pierre-Marie de Rodat
This gets rid of overflow checks done using a 128-bit integer type on 64-bit platforms and that can be done in a narrower type, by reusing the machinery already implemented to narrow the type of operations. This runs afoul of the processing for Max_Size_In_Storage_Elements in Expand_N_Attribute_Re

[Ada] Self reference access discriminant

2021-04-29 Thread Pierre-Marie de Rodat
GNAT does not accept a declaration of the form: type Rec (D : access Rec) is null record; To solve this, we factor out Check_Anonymous_Access_Components and reuse it from Process_Discriminants and adjust Freeze_Record_Type accordingly. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada

[PATCH] aarch64: Fix ICE in aarch64_add_offset_1_temporaries [PR100302]

2021-04-29 Thread Jakub Jelinek via Gcc-patches
Hi! In PR94121 I've changed aarch64_add_offset_1 to use absu_hwi instead of abs_hwi because offset can be HOST_WIDE_INT_MIN. As can be seen with the testcase below, aarch64_add_offset_1_temporaries suffers from the same problem and should be in sync with aarch64_add_offset_1, i.e. for HOST_WIDE_I

Re: [PATCH] aarch64: Fix ICE in aarch64_add_offset_1_temporaries [PR100302]

2021-04-29 Thread Richard Sandiford via Gcc-patches
Jakub Jelinek writes: > Hi! > > In PR94121 I've changed aarch64_add_offset_1 to use absu_hwi instead of > abs_hwi because offset can be HOST_WIDE_INT_MIN. As can be seen with > the testcase below, aarch64_add_offset_1_temporaries suffers from the same > problem and should be in sync with aarch64_

New French PO file for 'gcc' (version 11.1.0)

2021-04-29 Thread Translation Project Robot
Hello, gentle maintainer. This is a message from the Translation Project robot. A revised PO file for textual domain 'gcc' has been submitted by the French team of translators. The file is available at: https://translationproject.org/latest/gcc/fr.po (This file, 'gcc-11.1.0.fr.po', has jus

[committed] c++: Fix up detach clause vs. data-sharing clause checking [PR100319]

2021-04-29 Thread Jakub Jelinek via Gcc-patches
Hi! The standard says that "The event-handle will be considered as if it was specified on a firstprivate clause." which means that it can't be explicitly specified in some other data-sharing clause. The checking is implemented correctly for C, but for C++ when detach_seen is true (i.e. the constru

[patch] Add parallelism support to gcov for MinGW platforms

2021-04-29 Thread Eric Botcazou
Hi, if you attempt a profiled bootstrap on the MinGW platforms with -jN, N > 1, it miserably fails because of profile mismatches all over the place, the reason being that gcov has no support for parallelism on these platforms. The attached patch adds it and, therefore, makes it possible to do a p

[committed] testsuite: Remove dg-options from pr100305.c [PR100305]

2021-04-29 Thread Jakub Jelinek via Gcc-patches
Hi! The test FAILs on i?86-linux (due to -Wpsabi warnings). But, on closer inspection it seems there is another problem, the dg-options in the testcase means that the test is compiled with -O0 -O, -O1 -O, -O2 -O, -O3 -O, -Os -O etc. options, so effectively is tested multiple times with the same o

[PATCH] split loop for NE condition.

2021-04-29 Thread Jiufu Guo via Gcc-patches
When there is the possibility that overflow 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 code, if "l > n", overflow may happen. if "l < n" at begining, it c

Re: [committed] testsuite: Remove dg-options from pr100305.c [PR100305]

2021-04-29 Thread Richard Sandiford via Gcc-patches
Jakub Jelinek writes: > Hi! > > The test FAILs on i?86-linux (due to -Wpsabi warnings). But, on closer > inspection it seems there is another problem, the dg-options in the testcase > means that the test is compiled with -O0 -O, -O1 -O, -O2 -O, -O3 -O, -Os -O > etc. options, so effectively is tes

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

2021-04-29 Thread Richard Biener via Gcc-patches
On Wed, Apr 28, 2021 at 1:52 PM Andreas Krebbel wrote: > > On 4/28/21 10:12 AM, Richard Biener wrote: > > On Wed, Apr 28, 2021 at 8:54 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

Re: [PATCH] rtl-ssa: Fix -fcompare-debug failure [PR100303]

2021-04-29 Thread Richard Biener via Gcc-patches
On Wed, Apr 28, 2021 at 9:07 PM Richard Sandiford via Gcc-patches wrote: > > This patch fixes an oversight in the handling of debug instructions > in rtl-ssa. At the moment (and whether this is a good idea or not > remains to be seen), we maintain a linear RPO sequence of definitions > and non-de

[PATCH] tree-optimization/100253 - fix bogus aligned vectorized loads/stores

2021-04-29 Thread Richard Biener
At some point DR_MISALIGNMENT was supposed to be -1 when the access was not element aligned. That's obviously not true at this point so this adjusts both store and load vectorizing to no longer assume this which in turn allows simplifying the code. Bootstrapped and tested on x86_64-unknown-linux-

Re: [PATCH v3 2/2] Generate offset adjusted operation for op_by_pieces operations

2021-04-29 Thread Richard Biener via Gcc-patches
On Tue, Apr 27, 2021 at 3:14 AM H.J. Lu wrote: > > Add an overlap_op_by_pieces_p target hook for op_by_pieces operations > between two areas of memory to generate one offset adjusted operation > in the smallest integer mode for the remaining bytes on the last piece > operation of a memory region t

Re: [PATCH V7 0/7] Support for the CTF and BTF debug formats

2021-04-29 Thread Richard Biener via Gcc-patches
On Mon, Apr 19, 2021 at 7:30 PM Jose E. Marchesi via Gcc-patches wrote: > > [Changes from V6: > - Rebased to today's master. > - A GC related regression introduced in V5 has been fixed. This > regression also uncovered a related bug that has been also fixed in > this version. Basically ctfc_t

Re: [PATCH V7 1/7] dwarf: add a dwarf2int.h internal interface

2021-04-29 Thread Richard Biener via Gcc-patches
On Mon, Apr 19, 2021 at 7:31 PM Jose E. Marchesi via Gcc-patches wrote: > > This patch introduces a dwarf2int.h header, to be used by code that > needs access to the internal DIE structures and their attributes. > > The following functions which were previously defined as static in > dwarf2out.c a

Re: [PATCH V7 2/7] dwarf: new dwarf_debuginfo_p predicate

2021-04-29 Thread Richard Biener via Gcc-patches
On Mon, Apr 19, 2021 at 7:32 PM Jose E. Marchesi via Gcc-patches wrote: > > This patch introduces a dwarf_debuginfo_p predicate that abstracts and > replaces complex checks on write_symbols. I've heard you're considering more changes in this area but the patch would be OK as-is with me as well.

Re: rs6000: add support for powerpc64le-unknown-freebsd

2021-04-29 Thread Piotr Kubaj via Gcc-patches
Hello again, sorry to reopen this issue, but one part was skipped. It was just now found out, because it doesn't cause build issues, but only runtime issues (GCC fails to build binaries): /usr/local/bin/ld: /usr/local/lib/gcc10/libgcc_s.so: undefined reference to `.__udivmodti4' /usr/local/bin/

Re: [PATCH] c++: Substitute into function parms in lexical order [PR96560]

2021-04-29 Thread Patrick Palka via Gcc-patches
On Wed, 28 Apr 2021, Jason Merrill wrote: > On 4/28/21 2:24 PM, Patrick Palka wrote: > > This makes tsubst_arg_types substitute into a function's parameter types > > in left-to-right order instead of right-to-left order, in accordance with > > DR 1227. > > > > Bootstrapped and regtested on x86_64

[SPARC] Small housekeeping work

2021-04-29 Thread Eric Botcazou
Tested on SPARC/Solaris and SPARC64/Linux, applied on the mainline. 2021-04-29 Eric Botcazou * config/sparc/sparc.c (gen_load_pcrel_sym): Delete. (load_got_register): Do the PIC dance here. (sparc_legitimize_tls_address): Simplify. (sparc_emit_probe_stack_range

Re: [PATCH 2/3] LTO plugin: use startswith function.

2021-04-29 Thread Richard Biener via Gcc-patches
On Wed, Apr 21, 2021 at 10:13 AM Martin Liska wrote: > OK. > lto-plugin/ChangeLog: > > * lto-plugin.c (LTO_SEGMENT_NAME): Remove. > (LTO_SYMTAB_PREFIX): Likewise. > (LTO_SYMTAB_PREFIX_LEN): Likewise. > (LTO_SYMTAB_EXT_PREFIX): Likewise. > (LTO_SYMTAB_EXT_P

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

2021-04-29 Thread Richard Biener via Gcc-patches
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) vector. > > Patch can bootstrap on x86

Re: [PATCH] c++: remove redundand NULL check.

2021-04-29 Thread Richard Biener via Gcc-patches
On Wed, Apr 21, 2021 at 11:19 AM Martin Liška wrote: > > The check is redundant. > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Ready to be installed? OK. > Thanks, > Martin > > gcc/cp/ChangeLog: > > PR c++/99616 > * decl.c (grokdeclarator): Remove

Re: [patch] Add parallelism support to gcov for MinGW platforms

2021-04-29 Thread Richard Biener via Gcc-patches
On Thu, Apr 29, 2021 at 1:20 PM Eric Botcazou wrote: > > Hi, > > if you attempt a profiled bootstrap on the MinGW platforms with -jN, N > 1, > it miserably fails because of profile mismatches all over the place, the > reason being that gcov has no support for parallelism on these platforms. > > Th

[committed][omp, simt] Handle alternative IV

2021-04-29 Thread Tom de Vries
On 4/22/21 1:46 PM, Tom de Vries wrote: > On 12/17/20 5:46 PM, Tom de Vries wrote: >> On 10/15/20 5:05 PM, Tom de Vries wrote: >>> On 10/2/20 3:21 PM, Tom de Vries wrote: Hi, Consider the test-case libgomp.c/pr81778.c added in this commit, with this core loop (note: CANARY_SIZE

Re: [PATCH v2 09/21] libcc1: add more uses of 'deleter'

2021-04-29 Thread Jeff Law via Gcc-patches
On 4/27/2021 7:01 PM, Tom Tromey wrote: This changes libcc1 to use the 'deleter' template in a few more places. The template and basic specializations are moved to a new header, then some unmarshall functions are changed to use this code. This change avoids the need to repeat cleanup code in t

Re: [PATCH v2 10/21] libcc1: use unique_ptr more

2021-04-29 Thread Jeff Law via Gcc-patches
On 4/27/2021 7:01 PM, Tom Tromey wrote: This changes libcc1 to use unique_ptr in a few more places, removing some manual memory management. libcc1/ChangeLog 2021-04-27 Tom Tromey * libcp1.cc (struct libcp1) : Use unique_ptr. (~libcp1): Remove. (libcp1_compil

Re: [PATCH v2 11/21] libcc1: unify compiler handling

2021-04-29 Thread Jeff Law via Gcc-patches
On 4/27/2021 7:01 PM, Tom Tromey wrote: Both libcc1 plugins have nearly identical copies of code to find the underlying compiler. This seemed wasteful to me, so this patch unifies the copies. Two minor API changes were needed. First, the old code used a back-link from the compiler object to

Re: [PATCH v2 14/21] libcc1: share basic context code

2021-04-29 Thread Jeff Law via Gcc-patches
On 4/27/2021 7:01 PM, Tom Tromey wrote: Both plugins in libcc1 share a fair amount of boilerplate. They both share error-emission code, context management code, and tree GC code. This patch unifies these two bodies of code, avoiding needless duplication. libcc1/ChangeLog 2021-04-27 Tom Trome

[PATCH 02/12] Allow generating pseudo register with specific alignment

2021-04-29 Thread H.J. Lu via Gcc-patches
gen_reg_rtx tracks stack alignment needed for pseudo registers so that associated hard registers can be properly spilled onto stack. But there are cases where associated hard registers will never be spilled onto stack. gen_reg_rtx is changed to take an argument for register alignment so that stac

[PATCH 00/12] Allow TImode/OImode/XImode in op_by_pieces operations

2021-04-29 Thread H.J. Lu via Gcc-patches
The maximum size of the current op_by_pieces operations are limited by MAX_FIXED_MODE_SIZE which is an integer expression for the size in bits of the largest integer machine mode that should actually be used. But a target can use TImode/OImode/XImode, which can be larger than MAX_FIXED_MODE_SIZE,

[PATCH 07/12] x86: Add AVX2 tests for PR middle-end/90773

2021-04-29 Thread H.J. Lu via Gcc-patches
PR middle-end/90773 * gcc.target/i386/pr90773-20.c: New test. * gcc.target/i386/pr90773-21.c: Likewise. * gcc.target/i386/pr90773-22.c: Likewise. * gcc.target/i386/pr90773-23.c: Likewise. --- gcc/testsuite/gcc.target/i386/pr90773-20.c | 13 + gcc

[PATCH 04/12] x86: Avoid stack realignment when copying data

2021-04-29 Thread H.J. Lu via Gcc-patches
Pass UNITS_PER_WORD * BITS_PER_UNIT to force_reg, when copying data from one memory location to another with vector registers, to avoid stack realignment. * config/i386/i386-expand.c (ix86_expand_vector_move): Pass UNITS_PER_WORD * BITS_PER_UNIT to force_reg when copying data

[PATCH 01/12] Update alignment_for_piecewise_move

2021-04-29 Thread H.J. Lu via Gcc-patches
alignment_for_piecewise_move is called only with MOVE_MAX_PIECES or STORE_MAX_PIECES, which are the number of bytes at a time that we can move or store efficiently. We should call mode_for_size without limit to MAX_FIXED_MODE_SIZE, which is an integer expression for the size in bits of the largest

[PATCH 06/12] x86: Update piecewise move and store

2021-04-29 Thread H.J. Lu via Gcc-patches
We can use TImode/OImode/XImode integers for piecewise move and store. When vector register is used for piecewise move and store, we don't increase stack_alignment_needed since vector register spill isn't required for piecewise move and store. Since stack_realign_needed is set to true by checking

[PATCH 05/12] Remove MAX_BITSIZE_MODE_ANY_INT

2021-04-29 Thread H.J. Lu via Gcc-patches
It is only defined for i386 and everyone uses the default: #define MAX_BITSIZE_MODE_ANY_INT (64*BITS_PER_UNIT) Whatever problems we had before, they have been fixed now. * config/i386/i386-modes.def (MAX_BITSIZE_MODE_ANY_INT): Removed. --- gcc/config/i386/i386-modes.def | 15 +++---

[PATCH 09/12] x86: Also pass -mno-avx to pr72839.c

2021-04-29 Thread H.J. Lu via Gcc-patches
Also pass -mno-avx to pr72839.c to avoid copying data with YMM or ZMM registers. * gcc.target/i386/pr72839.c: Also pass -mno-avx. --- gcc/testsuite/gcc.target/i386/pr72839.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.target/i386/pr72839.c b/gcc/

[PATCH 03/12] Add TARGET_READ_MEMSET_VALUE/TARGET_GEN_MEMSET_VALUE

2021-04-29 Thread H.J. Lu via Gcc-patches
Add TARGET_READ_MEMSET_VALUE and TARGET_GEN_MEMSET_VALUE to support target instructions to duplicate QImode value to TImode/OImode/XImode value for memmset. gcc/ PR middle-end/90773 * builtins.c (builtin_memset_read_str): Call targetm.read_memset_value. (builtin_me

[PATCH 12/12] x86: Update gcc.target/i386/incoming-11.c

2021-04-29 Thread H.J. Lu via Gcc-patches
Expect no stack realignment since we no longer realign stack when copying data. * gcc.target/i386/incoming-11.c: Expect no stack realignment. --- gcc/testsuite/gcc.target/i386/incoming-11.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.target/i386/i

[PATCH 10/12] x86: Also pass -mno-avx to cold-attribute-1.c

2021-04-29 Thread H.J. Lu via Gcc-patches
Also pass -mno-avx to pr72839.c to avoid copying data with YMM or ZMM registers. * gcc.target/i386/cold-attribute-1.c: Also pass -mno-avx. --- gcc/testsuite/gcc.target/i386/cold-attribute-1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.target/i386

[PATCH 08/12] x86: Add tests for piecewise move and store

2021-04-29 Thread H.J. Lu via Gcc-patches
* gcc.target/i386/pieces-memcpy-10.c: New test. * gcc.target/i386/pieces-memcpy-11.c: Likewise. * gcc.target/i386/pieces-memcpy-12.c: Likewise. * gcc.target/i386/pieces-memcpy-13.c: Likewise. * gcc.target/i386/pieces-memcpy-14.c: Likewise. * gcc.targe

[PATCH 11/12] x86: Also pass -mno-avx to sw-1.c for ia32

2021-04-29 Thread H.J. Lu via Gcc-patches
Also pass -mno-avx to sw-1.c for ia32 since copying data with YMM or ZMM registers disables shrink-wrapping when the second argument is passed on stack. * gcc.target/i386/sw-1.c: Also pass -mno-avx for ia32. --- gcc/testsuite/gcc.target/i386/sw-1.c | 1 + 1 file changed, 1 insertion(+) d

[PATCH] i386: Cleanup comparison predicates.

2021-04-29 Thread Uros Bizjak via Gcc-patches
CCCmode is allowed only with GEU and LTU comparison codes. Also allow CCGZmode for these two codes. There is no need to check for trivial FP comparison operator, ix86_fp_compare_code_to_integer will return UNKNOWN code for unsupported operators. 2021-04-29 Uroš Bizjak gcc/ * config/i386/

Re: [PATCH] c++: Overeager use of deleted function before ADL [PR68942]

2021-04-29 Thread Jason Merrill via Gcc-patches
On 4/28/21 3:03 PM, Patrick Palka wrote: Here, at template definition time, ordinary name lookup for 'foo(t)' finds the deleted function, and so we form a CALL_EXPR thereof. Later at instantiation time, when initially substituting into this CALL_EXPR with T=N::A, we end up calling mark_used on t

Re: [PATCH/RFC] Add a new memory gathering optimization for loop (PR98598)

2021-04-29 Thread David Malcolm via Gcc-patches
On Thu, 2021-01-21 at 06:27 +, Feng Xue OS via Gcc-patches wrote: > This patch implements a new loop optimization according to the proposal > in RFC given at > https://gcc.gnu.org/pipermail/gcc/2021-January/234682.html. > So do not repeat the idea in this mail. Hope your comments on it. With

Re: [PATCH] target/100312 - make x86 masked load builtins pure

2021-04-29 Thread Uros Bizjak via Gcc-patches
On Thu, Apr 29, 2021 at 9:25 AM Richard Biener wrote: > > > It eventually runs into the gcc_unreachable () at the very end of > > > ix86_expand_builtin since IX86_BUILTIN_MASKLOADD and friends are > > > no longer in the range of IX86_BUILTIN__BDESC_SPECIAL_ARGS_FIRST > > > to IX86_BUILTIN__BDESC_

[PATCH] c++: Implement P2367 changes to avoid some list-initialization

2021-04-29 Thread Patrick Palka via Gcc-patches
This implements the wording changes of P2367R0 "Remove misuses of list-initialization from Clause 24", modulo the parts that depend on P1739R4 which we don't yet implement (due to LWG 3407). Tested on x86_64-pc-linux-gnu, does this look OK for trunk? libstdc++-v3/ChangeLog: * include/bit

[committed] Trivial fix to get nios2 building again

2021-04-29 Thread Jeff Law via Gcc-patches
The recent improvements to complex divide added this nugget to c-cppbuiltins: #ifdef HAVE_adddf3   builtin_define_with_int_value ("__LIBGCC_HAVE_HWDBL__", HAVE_adddf3); #endif This is breaking the nios2 port: In file included from ./tm.h:33,   

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

2021-04-29 Thread Martin Sebor via Gcc-patches
On 4/29/21 6:22 AM, Richard Biener via Gcc-patches 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 sta

Regression with recent change

2021-04-29 Thread Jeff Law via Gcc-patches
This change: 985b3a6837dee7001e6b618f073ed74f0edf5787 is the first bad commit commit 985b3a6837dee7001e6b618f073ed74f0edf5787 Author: H.J. Lu Date:   Mon Jun 10 09:57:15 2019 -0700     Generate offset adjusted operation for op_by_pieces operations     Add an overlap_op_by_pieces_p target hook

[PATCH] Fix PR bootstrap/100327 (_divkf3.c) on PowerPC

2021-04-29 Thread Michael Meissner via Gcc-patches
Fix PR bootstrap/100327 (_divkf3.c) on PowerPC. This patch fixes the PowerPC _divkf3.c module to use the appropriate FLT128 constants if long double is not IEEE 128-bit. I have tested this patch by doing a bootstrap on a little endian power9 system running Linux. Can I check this into the trunk?

Re: [PATCH v2] Add line debug info for virtual thunks [PR97937]

2021-04-29 Thread Bernd Edlinger
Hi! I've re-based and re-tested this patch on current trunk. Otherwise the patch is unchanged, from the previous v2 version. This patch is fixing two issues with functions where we do not have proper debug info: 1. Functions without line-numbers at all, are excluded from the CU's address range

Re: [PATCH] Fix PR bootstrap/100327 (_divkf3.c) on PowerPC

2021-04-29 Thread Joseph Myers
On Thu, 29 Apr 2021, Michael Meissner via Gcc-patches wrote: > Fix PR bootstrap/100327 (_divkf3.c) on PowerPC. > > This patch fixes the PowerPC _divkf3.c module to use the appropriate > FLT128 constants if long double is not IEEE 128-bit. > > I have tested this patch by doing a bootstrap on a li

Re: [PATCH] Fix PR bootstrap/100327 (_divkf3.c) on PowerPC

2021-04-29 Thread Michael Meissner via Gcc-patches
On Thu, Apr 29, 2021 at 04:31:50PM +, Joseph Myers wrote: > On Thu, 29 Apr 2021, Michael Meissner via Gcc-patches wrote: > > > Fix PR bootstrap/100327 (_divkf3.c) on PowerPC. > > > > This patch fixes the PowerPC _divkf3.c module to use the appropriate > > FLT128 constants if long double is no

Re: [PATCH] Fix PR bootstrap/100327 (_divkf3.c) on PowerPC

2021-04-29 Thread Joseph Myers
On Thu, 29 Apr 2021, Michael Meissner via Gcc-patches wrote: > On Thu, Apr 29, 2021 at 04:31:50PM +, Joseph Myers wrote: > > On Thu, 29 Apr 2021, Michael Meissner via Gcc-patches wrote: > > > > > Fix PR bootstrap/100327 (_divkf3.c) on PowerPC. > > > > > > This patch fixes the PowerPC _divkf3

[pushed] c++: Add testcase for already fixed PR [PR94102]

2021-04-29 Thread Marek Polacek via Gcc-patches
We correctly accept this testcase since r11-1571. Tested x86_64-pc-linux-gnu, applying to trunk. gcc/testsuite/ChangeLog: PR c++/94102 * g++.dg/cpp1z/class-deduction87.C: New test. --- gcc/testsuite/g++.dg/cpp1z/class-deduction87.C | 15 +++ 1 file changed, 15 insert

[PATCH] Don't use nullptr return from simplify_gen_subreg

2021-04-29 Thread H.J. Lu via Gcc-patches
On Thu, Apr 29, 2021 at 8:52 AM Jeff Law wrote: > > This change: > > 985b3a6837dee7001e6b618f073ed74f0edf5787 is the first bad commit > commit 985b3a6837dee7001e6b618f073ed74f0edf5787 > Author: H.J. Lu > Date: Mon Jun 10 09:57:15 2019 -0700 > > Generate offset adjusted operation for op_by_

[pushed] c++: unset COMPOUND_LITERAL_P [PR100079]

2021-04-29 Thread Jason Merrill via Gcc-patches
Once a CONSTRUCTOR has been digested and used as an initializer, it no longer represents a compound literal by itself, so we can clear the flag, letting us use it consistently to distinguish between digested and undigested initializer-lists. Tested x86_64-pc-linux-gnu, applying to trunk. gcc/cp/C

[pushed] c++: constant expressions are evaluated [PR93314]

2021-04-29 Thread Jason Merrill via Gcc-patches
My GCC 11 patch for PR93314 turned off cp_unevaluated_operand while processing an id-expression that names a non-static data member, but the broader issue is that in general, a constant-expression is evaluated even in an unevaluated operand. Tested x86_64-pc-linux-gnu, applying to trunk. gcc/cp/C

[pushed] c++: ICE with anonymous union [PR97974]

2021-04-29 Thread Jason Merrill via Gcc-patches
While working on the GCC 11 patch, it occurred to me that we could move the errors about invalid members from finish_struct_anon_r to here, so we properly get a diagnostic in g++.law/union4.C. Tested x86_64-pc-linux-gnu, applying to trunk. gcc/cp/ChangeLog: PR c++/97974 * class.c

[pushed] c++: Fix friend attributes [PR51344]

2021-04-29 Thread Jason Merrill via Gcc-patches
51344 was a problem with calling save_template_attributes twice for the same friend function: once from do_friend and once from grokmethod. The 2012 patch for the bug avoided creating an infinite loop when this happens, but it's better to avoid the duplication in the first place. This also restor

[pushed] c++: Use empty field in constexpr eval.

2021-04-29 Thread Jason Merrill via Gcc-patches
In discussion of PR98463, Jakub noted that cxx_fold_indirect_ref_1 was bailing out early for empty bases even when we do have fields for them (in C++17 mode or later). This corrects that. Tested x86_64-pc-linux-gnu, applying to trunk. gcc/cp/ChangeLog: * constexpr.c (cxx_fold_indirect_r

[PATCH] Disable section anchors for VAR_DECLs if -fdata-sections

2021-04-29 Thread David Edelsohn via Gcc-patches
-fdata-sections places data symbols into their own, unique, named sections. -fsection-anchors create an anchor to access neighboring symbols within a section. When both are enabled, a separate section anchor is created for each symbol, which provides no benefit. This patch

Re: preprocessor: Handle digit separators in #line [PR82359]

2021-04-29 Thread Joseph Myers
I've now committed this patch as preparation for further digit separator fixes and enabling digit separators for C2x, but would still welcome any C++ maintainer comments. -- Joseph S. Myers jos...@codesourcery.com

New Swedish PO file for 'gcc' (version 11.1.0)

2021-04-29 Thread Translation Project Robot
Hello, gentle maintainer. This is a message from the Translation Project robot. A revised PO file for textual domain 'gcc' has been submitted by the Swedish team of translators. The file is available at: https://translationproject.org/latest/gcc/sv.po (This file, 'gcc-11.1.0.sv.po', has ju

Re: [PATCH V7 4/7] CTF/BTF debug formats

2021-04-29 Thread Indu Bhagat via Gcc-patches
Hello, On 4/29/21 5:10 AM, Richard Biener wrote: On Thu, 29 Apr 2021, Jose E. Marchesi wrote: This commit introduces support for generating CTF debugging information and BTF debugging information from GCC. Comments inline. Thanks for your reviews. My responses and questions inline at resp

[PATCH] i386: Optimize carry flag comparisons a bit

2021-04-29 Thread Uros Bizjak via Gcc-patches
In ix86_int_compare, opportunistically swap operands of GTU and LEU comparisons to emit carry flag comparison, with the expectation that the comparison will combine to *add3_carry_0 or *sub3_carry_0 insn pattern. Do not use ix86_expand_carry_flag_compare because this function prefers carry flag co

Re: [PATCH, libstdc++] GLIBCXX_HAVE_INT64_T

2021-04-29 Thread David Edelsohn via Gcc-patches
On Fri, Jan 8, 2021 at 1:37 PM Jonathan Wakely wrote: > > On 06/01/21 19:41 -0500, David Edelsohn wrote: > >Thanks for clarifying the issue. > > > >As you implicitly point out, GCC knows the type of INT64 and defines > >the macro __INT64_TYPE__ . The revised code can use that directly, > >such as

Re: [PATCH, libstdc++] GLIBCXX_HAVE_INT64_T

2021-04-29 Thread Jonathan Wakely via Gcc-patches
On 29/04/21 16:06 -0400, David Edelsohn wrote: On Fri, Jan 8, 2021 at 1:37 PM Jonathan Wakely wrote: On 06/01/21 19:41 -0500, David Edelsohn wrote: >Thanks for clarifying the issue. > >As you implicitly point out, GCC knows the type of INT64 and defines >the macro __INT64_TYPE__ . The revised

Re: [PATCH] c++: Implement P2367 changes to avoid some list-initialization

2021-04-29 Thread Jonathan Wakely via Gcc-patches
On 29/04/21 11:04 -0400, Patrick Palka via Libstdc++ wrote: This implements the wording changes of P2367R0 "Remove misuses of list-initialization from Clause 24", modulo the parts that depend on P1739R4 which we don't yet implement (due to LWG 3407). Tested on x86_64-pc-linux-gnu, does this look

Re: [PATCH] Fix PR bootstrap/100327 (_divkf3.c) on PowerPC

2021-04-29 Thread Michael Meissner via Gcc-patches
On Thu, Apr 29, 2021 at 04:48:07PM +, Joseph Myers wrote: > On Thu, 29 Apr 2021, Michael Meissner via Gcc-patches wrote: > > > On Thu, Apr 29, 2021 at 04:31:50PM +, Joseph Myers wrote: > > > On Thu, 29 Apr 2021, Michael Meissner via Gcc-patches wrote: > > > > > > > Fix PR bootstrap/100327

[PATCH, V2] Define KFmode constants for libgcc.

2021-04-29 Thread Michael Meissner via Gcc-patches
[PATCH, V2] Define KFmode constants for libgcc. This patch defines the constants needed for libgcc for the PowerPC specific IEEE 128-bit floating point types (KFmode). The 4/28 changes to libgcc need these constants defined. We only define the KFmode constants if IEEE 128-bit floating point is s

Re: [PATCH] [RISCV] Add Pattern for builtin overflow

2021-04-29 Thread Jim Wilson
On Wed, Apr 28, 2021 at 4:04 PM Andrew Waterman wrote: > > This is a good suggestion, but in the interests of making forward > progress here, I'd like to accept the patch and then file these as > bugzillas as ways to further improve the patch. > > Agreed, these potential improvements are definite

Re: [PATCH V7 4/7] CTF/BTF debug formats

2021-04-29 Thread Indu Bhagat via Gcc-patches
On 4/29/21 1:02 PM, Indu Bhagat wrote: +{ +  dw_die_ref c; + +  if (!ctf_do_die (die)) +    return; + +  FOR_EACH_CHILD (die, c, ctf_do_die (c)); +} +   /* Perform any cleanups needed after the early debug generation pass has run.  */ @@ -32471,6 +32491,16 @@ dwarf2out_early_finish (const

  1   2   >