Re: [PATCH] regcprop: Determine subreg offset depending on endianness [PR101260]

2021-10-11 Thread Richard Biener via Gcc-patches
On Fri, Oct 8, 2021 at 1:31 PM Stefan Schulze Frielinghaus via Gcc-patches wrote: > > gcc/ChangeLog: > > * regcprop.c (maybe_mode_change): Determine offset relative to > high or low part depending on endianness. > > Bootstrapped and regtested on IBM Z. Ok for mainline and gcc-{11,1

Re: [PATCH] options: use cl_optimization_hash.

2021-10-11 Thread Martin Liška
On 10/8/21 12:23, Martin Liška wrote: Patch can bootstrap on x86_64-linux-gnu and survives regression tests. I've spoken to Honza and he approves the patch. I'm going to install it. Martin

Re: [PATCH][i386] Support reduc_{plus, smax, smin, umax, umin}_scal_v4qi.

2021-10-11 Thread Uros Bizjak via Gcc-patches
On Mon, Oct 11, 2021 at 8:26 AM liuhongt wrote: > > After providing expanders for reduc_umin/umax/smin/smax_scal_v4qi, > perfomance are a little bit faster than before for reduce operations > w/ options -O2 -march=haswell, -O2 -march=skylake-avx512 > and -Ofast -march=skylake-avx512. > > gcc/Cha

[PATCH] x86_64: Some SUBREG related optimization tweaks to i386 backend.

2021-10-11 Thread Roger Sayle
This patch contains two SUBREG-related optimization enabling tweaks to the x86 backend. The first change, to ix86_expand_vector_extract, cures the strange -march=cascadelake related non-determinism that affected my new test cases last week. Extracting a QImode or HImode element from an SSE vecto

Re: [PATCH] Adjust more testcases for O2 vectorization enabling.

2021-10-11 Thread Jakub Jelinek via Gcc-patches
On Sat, Oct 09, 2021 at 12:55:15PM +0800, liuhongt via Gcc-patches wrote: > Pushed to trunk. > > libgomp/ChangeLog: > > * testsuite/libgomp.c++/scan-10.C: Add option -fvect-cost-model=cheap. > * testsuite/libgomp.c++/scan-11.C: Ditto. > * testsuite/libgomp.c++/scan-12.C: Ditto.

[Patch] libgomp: Add tests for omp_atv_serialized and deprecate omp_atv_sequential.

2021-10-11 Thread Marcel Vollweiler
Hi, The variable omp_atv_sequential was replaced by omp_atv_serialized in OpenMP 5.1. This was already implemented by Jakub (C/C++, commit ea82325afec) and Tobias (Fortran, commit fff15bad1ab). This patch adds two tests to check if omp_atv_serialized is available (one test for C/C++ and one for

Re: [Patch] libgomp: Add tests for omp_atv_serialized and deprecate omp_atv_sequential.

2021-10-11 Thread Jakub Jelinek via Gcc-patches
On Mon, Oct 11, 2021 at 11:40:54AM +0200, Marcel Vollweiler wrote: > libgomp: Add tests for omp_atv_serialized and deprecate omp_atv_sequential. > > The variable omp_atv_sequential was replaced by omp_atv_serialized in OpenMP > 5.1. This was already implemented by Jakub (C/C++, commit ea82325afec)

[committed] openmp: Add omp_set_num_teams, omp_get_max_teams, omp_[gs]et_teams_thread_limit

2021-10-11 Thread Jakub Jelinek via Gcc-patches
Hi! OpenMP 5.1 adds env vars and functions to set and query new ICVs used as fallback if thread_limit or num_teams clauses aren't specified on teams construct. The following patch implements those, though further work will be needed: 1) OpenMP 5.1 also changed the num_teams clause, so that it can

[PATCH v3] MIPS: R6: load/store can process unaligned address

2021-10-11 Thread YunQiang Su
MIPS release 6 requires the lw/ld/sw/sd can work with unaligned address, while it can be implemented by full hardware or trap&emulate. Since it doesn't have to be fully done by hardware, we add a pair of options -m(no-)unaligned-access. Kernels may need them. gcc/ChangeLog: * config/mips

[PATCH] opts: Remove AUTODETECT_VALUE usage.

2021-10-11 Thread Martin Liška
The patch is about using OPTION_SET_P instead of a default option value set in common.opt. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin gcc/ChangeLog: * common.opt: Remove Init(2) for some options. * toplev.c (proc

[PATCH] Remove usage of IRA_REGION_AUTODETECT

2021-10-11 Thread Martin Liška
Similar patch, let's rely on OPTION_SET_P and not a default options value. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin gcc/ChangeLog: * common.opt: Remove usage of IRA_REGION_AUTODETECT. * flag-types.h (enum ira_r

Re: [SVE] [gimple-isel] PR93183 - SVE does not use neg as conditional

2021-10-11 Thread Prathamesh Kulkarni via Gcc-patches
On Fri, 8 Oct 2021 at 21:19, Richard Sandiford wrote: > > Thanks for looking at this. > > Prathamesh Kulkarni writes: > > Hi, > > As mentioned in PR, for the following test-case: > > > > typedef unsigned char uint8_t; > > > > static inline uint8_t > > x264_clip_uint8(uint8_t x) > > { > > uint8_

[PATCH] options: Fix variable tracking option processing.

2021-10-11 Thread Martin Liška
After the recent change in Optimize attribute handling, we need finish_option function properly auto-detecting variable tracking options. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin PR debug/102585 gcc/ChangeLog:

Re: [PATCH][i386] target: support spaces in target attribute.

2021-10-11 Thread Martin Liška
On 10/4/21 23:02, Andrew Pinski wrote: It might be useful to skip tabs for the same reason as spaces really. Sure, be my guest. MartinFrom b66d7be2c1b3ac286257e3df4d9796e391751bef Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Mon, 4 Oct 2021 14:06:14 +0200 Subject: [PATCH] target: support

[PATCH] c++: Fix up push_local_extern_decl_alias error recovery [PR102642]

2021-10-11 Thread Jakub Jelinek via Gcc-patches
Hi! My recent push_local_extern_decl_alias change broke error-recovery, do_pushdecl can return error_mark_node and set_decl_tls_model can't be called on that. There are other code paths that store error_mark_node into DECL_LOCAL_DECL_ALIAS, with the intent to differentiate the cases where we have

Re: [PATCH] x86_64: Some SUBREG related optimization tweaks to i386 backend.

2021-10-11 Thread Hongtao Liu via Gcc-patches
On Mon, Oct 11, 2021 at 4:55 PM Roger Sayle wrote: > > > This patch contains two SUBREG-related optimization enabling tweaks to > the x86 backend. > > The first change, to ix86_expand_vector_extract, cures the strange > -march=cascadelake related non-determinism that affected my new test > cases l

Re: [Patch] libgomp: Add tests for omp_atv_serialized and deprecate omp_atv_sequential.

2021-10-11 Thread Marcel Vollweiler
Hi Jakub, Am 11.10.2021 um 11:49 schrieb Jakub Jelinek: On Mon, Oct 11, 2021 at 11:40:54AM +0200, Marcel Vollweiler wrote: libgomp: Add tests for omp_atv_serialized and deprecate omp_atv_sequential. The variable omp_atv_sequential was replaced by omp_atv_serialized in OpenMP 5.1. This was alre

Re: [Patch] libgomp: Add tests for omp_atv_serialized and deprecate omp_atv_sequential.

2021-10-11 Thread Jakub Jelinek via Gcc-patches
On Mon, Oct 11, 2021 at 01:28:11PM +0200, Marcel Vollweiler wrote: > > > libgomp/ChangeLog: > > > > > > * allocator.c (omp_init_allocator): Replace omp_atv_sequential with > > > omp_atv_serialized. > > > * omp.h.in: Add deprecated flag for omp_atv_sequential. > > > * omp_lib.f9

Re: [Patch] Fortran: Various CLASS + assumed-rank fixed [PR102541]

2021-10-11 Thread Tobias Burnus
Hi Harald, On 10.10.21 21:27, Harald Anlauf via Fortran wrote: just some random remarks from initially browsing your patch. Thanks for browsing the patch :-) - leftover from debugging? Yes. - code that could be shortened/made slightly more readable: ... Is there a reason to not use strcmp (c

RE: [PATCH]middle-end convert negate + right shift into compare greater.

2021-10-11 Thread Tamar Christina via Gcc-patches
Hi all, Here's a new version of the patch. > >>> " If an exceptional condition occurs during the evaluation of an > >>> expression > >> (that is, if the result is not mathematically defined or not in the > >> range of representable values for its type), the behavior is undefined." > >>> > >>> So

Re: [PATCH] Adjust testcase for O2 vectorization enabling.

2021-10-11 Thread H.J. Lu via Gcc-patches
On Sun, Oct 10, 2021 at 10:19 PM liuhongt wrote: > > gcc/testsuite/ChangeLog: > > PR middle-end/102669 > * gnat.dg/unroll1.adb: Add -fno-tree-vectorize. > --- > gcc/testsuite/gnat.dg/unroll1.adb | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/gcc/testsuite

Re: [PATCH] regcprop: Determine subreg offset depending on endianness [PR101260]

2021-10-11 Thread Stefan Schulze Frielinghaus via Gcc-patches
On Mon, Oct 11, 2021 at 09:38:36AM +0200, Richard Biener wrote: > On Fri, Oct 8, 2021 at 1:31 PM Stefan Schulze Frielinghaus via > Gcc-patches wrote: > > > > gcc/ChangeLog: > > > > * regcprop.c (maybe_mode_change): Determine offset relative to > > high or low part depending on endi

[PATCH] vectorizer: Fix up -fsimd-cost-model= handling

2021-10-11 Thread Jakub Jelinek via Gcc-patches
On Mon, Oct 11, 2021 at 11:28:55AM +0200, Jakub Jelinek via Gcc-patches wrote: > I don't think this is the right thing to do. > This just means that at some point between 2013 when -fsimd-cost-model has > been introduced and now -fsimd-cost-model= option at least partially stopped > working properl

Re: [PATCH] vectorizer: Fix up -fsimd-cost-model= handling

2021-10-11 Thread Richard Biener via Gcc-patches
On Mon, 11 Oct 2021, Jakub Jelinek wrote: > On Mon, Oct 11, 2021 at 11:28:55AM +0200, Jakub Jelinek via Gcc-patches wrote: > > I don't think this is the right thing to do. > > This just means that at some point between 2013 when -fsimd-cost-model has > > been introduced and now -fsimd-cost-model=

Re: [PATCH] vectorizer: Fix up -fsimd-cost-model= handling

2021-10-11 Thread Hongtao Liu via Gcc-patches
On Monday, October 11, 2021, Jakub Jelinek via Gcc-patches < gcc-patches@gcc.gnu.org> wrote: > On Mon, Oct 11, 2021 at 11:28:55AM +0200, Jakub Jelinek via Gcc-patches > wrote: > > I don't think this is the right thing to do. > > This just means that at some point between 2013 when -fsimd-cost-mode

Re: [Patch 1/7, Arm, GCC] Add Armv8.1-M Mainline target feature +pacbti.

2021-10-11 Thread Richard Earnshaw via Gcc-patches
On 08/10/2021 13:17, Tejas Belagod via Gcc-patches wrote: Hi, This patch adds the -march feature +pacbti to Armv8.1-M Mainline. This feature enables pointer signing and authentication instructions on M-class architectures. Tested on arm-none-eabi. OK for trunk? 2021-10-04 Tejas Belagod gcc

[RFC] Port git gcc-descr to Python

2021-10-11 Thread Martin Liška
On 10/8/21 13:12, Jakub Jelinek wrote: I think changing the default is ok, but dropping --full is not, it should stay and behave the way it did before (i.e. print r12-4245-gdb3d7270b42fe27fb05664c4fdf524ab7ad13a75 same thing as the new default except for full hash instead of first 14 chars from i

Re: [PATCH 03/13] arm: Add test for PR target/101325

2021-10-11 Thread Christophe LYON via Gcc-patches
On 28/09/2021 15:30, Christophe LYON via Gcc-patches wrote: On 28/09/2021 13:14, Kyrylo Tkachov wrote: -Original Message- From: Gcc-patches On Behalf Of Christophe Lyon via Gcc-patches Sent: 07 September 2021 10:15 To: gcc-patches@gcc.gnu.org Subject: [PATCH 03/13] arm: Add test for

Re: [PATCH 04/13] arm: Add GENERAL_AND_VPR_REGS regclass

2021-10-11 Thread Christophe LYON via Gcc-patches
On 28/09/2021 15:32, Christophe LYON via Gcc-patches wrote: On 28/09/2021 13:18, Kyrylo Tkachov wrote: Hi Christophe, -Original Message- From: Gcc-patches On Behalf Of Christophe LYON via Gcc-patches Sent: 08 September 2021 08:49 To: Richard Earnshaw ; gcc- patc...@gcc.gnu.org Subje

Re: [PATCH] opts: Remove AUTODETECT_VALUE usage.

2021-10-11 Thread Richard Biener via Gcc-patches
On Mon, Oct 11, 2021 at 12:58 PM Martin Liška wrote: > > The patch is about using OPTION_SET_P instead of a default > option value set in common.opt. > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Ready to be installed? OK, but... > Thanks, > Martin > > gcc/Change

Re: [Patch 2/7, Arm, GCC] Add option -mbranch-protection.

2021-10-11 Thread Richard Earnshaw via Gcc-patches
On 08/10/2021 13:17, Tejas Belagod via Gcc-patches wrote: Hi, Add -mbranch-protection option and its associated parsing routines. This option enables the code-generation of pointer signing and authentication instructions in function prologues and epilogues. Tested on arm-none-eabi. OK for trunk

Re: [PATCH] Remove usage of IRA_REGION_AUTODETECT

2021-10-11 Thread Richard Biener via Gcc-patches
On Mon, Oct 11, 2021 at 12:58 PM Martin Liška wrote: > > Similar patch, let's rely on OPTION_SET_P and not a default > options value. > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Ready to be installed? OK. > Thanks, > Martin > > gcc/ChangeLog: > > * comm

Re: [PATCH] options: Fix variable tracking option processing.

2021-10-11 Thread Richard Biener via Gcc-patches
On Mon, Oct 11, 2021 at 1:02 PM Martin Liška wrote: > > After the recent change in Optimize attribute handling, we need > finish_option function properly auto-detecting variable tracking options. > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Ready to be installed?

Re: [PATCH] tree-optimization: [PR102622]: wrong code due to signed one bit integer and "a?-1:0"

2021-10-11 Thread Michael Matz via Gcc-patches
Hello, On Sat, 9 Oct 2021, apinski--- via Gcc-patches wrote: > + (lshift (convert (convert:boolean_type_node @0)) { shift; }))) > +/* a ? -1 : 0 -> -a. No need to check the TYPE_PRECISION not being 1 > + here as the powerof2cst case above will handle that case correctly. > */ W

Re: [PATCH 05/13] arm: Add support for VPR_REG in arm_class_likely_spilled_p

2021-10-11 Thread Richard Sandiford via Gcc-patches
Sorry for the very long delay in reviewing this. Things have been a bit hectic recently. Christophe Lyon via Gcc-patches writes: > VPR_REG is the only register in its class, so it should be handled by > TARGET_CLASS_LIKELY_SPILLED_P. No test fails without this patch, but > it seems it should be

Re: [PATCH] options: Fix variable tracking option processing.

2021-10-11 Thread Martin Liška
On 10/11/21 15:05, Richard Biener wrote: + if (!opts_set->x_flag_var_tracking) +opts->x_flag_var_tracking = optimize >= 1; That's still not equivalent to the old code for -fvar-tracking-uninit which sets opts->x_flag_var_tracking to 1 and the old code checked that for AUTOINIT_VALUE but you

Re: [Patch 3/7, Arm, GCC] Add testsuite library support for PACBTI target.

2021-10-11 Thread Richard Earnshaw via Gcc-patches
On 08/10/2021 13:17, Tejas Belagod via Gcc-patches wrote: Hi, Add targeting-checking entities for PACBTI in testsuite framework. Tested on arm-none-eabi. OK for trunk? 2021-10-04 Tejas Belagod gcc/ChangeLog: * testsuite/lib/target-supports.exp (check_effective_target_arm_p

Re: [Patch 3/7, Arm, GCC] Add testsuite library support for PACBTI target.

2021-10-11 Thread Richard Earnshaw via Gcc-patches
On 11/10/2021 14:36, Richard Earnshaw via Gcc-patches wrote: On 08/10/2021 13:17, Tejas Belagod via Gcc-patches wrote: Hi, Add targeting-checking entities for PACBTI in testsuite framework. Tested on arm-none-eabi. OK for trunk? 2021-10-04  Tejas Belagod  gcc/ChangeLog: * testsuite/lib

[Ada] Size of time_t in newer verions of VxWorks7

2021-10-11 Thread Pierre-Marie de Rodat via Gcc-patches
Set the default size of time_t_bits to match the standard runtimes. The size must match that which is used in the VSB, since the same VSB is used to build all of the runtimes. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/s-parame__ae653.ads (time_t_bits): Change t

[Ada] Simplify code for checks within an initialization procedure

2021-10-11 Thread Pierre-Marie de Rodat via Gcc-patches
It is simpler to access the type of first formal using semantic instead of syntactic query. Behaviour is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_util.adb (Compile_Time_Constraint_Error): Simplify getting the type of the first formal parameter.

[Ada] Fix crash on array component with Default_Value

2021-10-11 Thread Pierre-Marie de Rodat via Gcc-patches
When complaining about a compile-time constraint error within a default initialization procedure we assumed that this procedure initializes a record object. However, it can initialize an array object too. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_util.adb (Inside_I

[Ada] Do not clear Analyzed flag in expand if already set by preanalysis

2021-10-11 Thread Pierre-Marie de Rodat via Gcc-patches
During Expand, prevent the clearing of the Analyzed flag if it has already been set by Fold_Ureal. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * expander.adb (Expand): Skip clearing of Analyzed flag if already set for N_Real_Literal.diff --git a/gcc/ada/expander.ad

[Ada] RTEMS: use default stack checking emulation package

2021-10-11 Thread Pierre-Marie de Rodat via Gcc-patches
Remove the RTEMS specific version of System.Stack_Checking.Operations as the internal RTEMS API it uses can only detect stack overflow after the event, whereas the stack checking emulation is meant to detect the stack overflow before it occurs. Use the standard System.Stack_Checking.Operations pack

[Ada] Simplify initialization of concurrent components

2021-10-11 Thread Pierre-Marie de Rodat via Gcc-patches
Concurrent record types are either task record types or protected record types. Now we detect them collectively (when looking for any of them) or exclusively (when looking for one or the other). Cleanup code related to fixes in expansion of boxes in record aggregates. Behaviour is unaffected. Tes

[Ada] Remove redundant guard against an empty component list

2021-10-11 Thread Pierre-Marie de Rodat via Gcc-patches
There is no need to explicitly guard against an empty list where the subsequent iteration with First/Next/Present works fine. Cleanup related to expansion of aggregates in GNATprove mode; behaviour is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_aggr.adb

[Ada] Move rewriting of boxes in aggregates from resolution to expansion

2021-10-11 Thread Pierre-Marie de Rodat via Gcc-patches
Rewriting of boxes in record aggregates into the corresponding default values was done in resolution, where we special-cased access types and scalar types with a Default_Value aspect. However, this rewriting rather belong to expansion. Also, the special-casing didn't take Normalize_Scalars nor Ini

[Ada] Simplify detection of record components with default initialization

2021-10-11 Thread Pierre-Marie de Rodat via Gcc-patches
When detecting record components with default initialization we did two iteration over the component list; now we do only one. Also, there was no need to explicitly guard against an empty list where the subsequent iteration with First/Next/Present works fine. Cleanup related to expansion of aggre

[Ada] Simplify detection of delayed aggregates

2021-10-11 Thread Pierre-Marie de Rodat via Gcc-patches
Replace IF with a single RETURN statement. Cleanup related to expansion of aggregates in GNATprove mode; semantics is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_aggr.adb (Is_Delayed_Aggregate): Simplify.diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_agg

[Ada] Rewrite extended names in derived class-wide expressions

2021-10-11 Thread Pierre-Marie de Rodat via Gcc-patches
When building a derived class-wide pre- or postcondition we are mapping references to inherited formals and subprogram. Originally we only did it for simple names; recently we fixed this mapping to also work for operator symbols; with this patch we also do this for extended names. Tested on x86_6

[Ada] Reorder subprogram spec and bodies in alphabetical order

2021-10-11 Thread Pierre-Marie de Rodat via Gcc-patches
Required by the style guide and by future changes in this function. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch4.adb (Analyze_Membership_Op): Reorder subprogram spec and bodies in alphabetical order.diff --git a/gcc/ada/sem_ch4.adb b/gcc/ada/sem_ch4.adb --

[Ada] Import binder globals as constant

2021-10-11 Thread Pierre-Marie de Rodat via Gcc-patches
The various __gl_XYZ binder globals prevent some link-time optimizations when imported as mutable. Work around this by turning them into constants. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnarl/s-intman__android.adb, libgnarl/s-intman__lynxos.adb, libgnarl

[Ada] RTEMS: use hardware interrupts instead of signals for interrupt handling

2021-10-11 Thread Pierre-Marie de Rodat via Gcc-patches
RTEMS supports attaching interrupt handlers to hardware interrupt vectors, which is superior to the current approach of attaching handlers to signals. Direct attachment of handlers removes the execution overhead of converting hardware interrupts to signals and their subsequent propagation to the i

[Ada] Fix internal error on fixed-point divide, multiply and scaling

2021-10-11 Thread Pierre-Marie de Rodat via Gcc-patches
This fixes a couple of long-standing oversights in the fixed-point multiply implementation that were recently copied into the divide implementation and thus made more visible: when computing the operand size for compile-time known values, the negative case must be taken into account and comparisons

[Ada] Find an interpretation for membership test with a singleton value

2021-10-11 Thread Pierre-Marie de Rodat via Gcc-patches
When resolving type Color is (Blue, Orange); function Get_Color return Color is begin return Blue; end Get_Color; function Get_Color return String is begin return "Blue"; end Get_Color; Test : Boolean := Get_Color in Blue; we did not try all the possible interpretations of

[PATCH] middle-end/102682 - avoid invalid subreg on the LHS

2021-10-11 Thread Richard Biener via Gcc-patches
The following avoids generating (insn 6 5 7 2 (set (subreg:OI (concatn/v:TI [ (reg:DI 92 [ buffer ]) (reg:DI 93 [ buffer+8 ]) ]) 0) (subreg:OI (reg/v:V8SI 85 [ __x ]) 0)) "t.ii":76:21 74 {*movoi_internal_avx} (nil)) via store_b

[Ada] Remove constant arguments

2021-10-11 Thread Pierre-Marie de Rodat via Gcc-patches
All these arguments were identified programmatically as being always used with the same value (often the default one). As such, they can be omitted. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * ali.adb (Get_Name): Ignore_Spaces is always False. * bindo-graphs.adb

[Ada] Simplify membership tests with N_Generic_Declaration

2021-10-11 Thread Pierre-Marie de Rodat via Gcc-patches
Use collective N_Generic_Declaration subtype instead of its members N_Generic_Subprogram_Declaration and N_Generic_Package_Declaration where reasonable. Code cleanup related to handling of Global contracts in generic units; semantics is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk

[Ada] RTEMS: use regular RTEMS API for minimum stack size calculation

2021-10-11 Thread Pierre-Marie de Rodat via Gcc-patches
Use _POSIX_Threads_Minimum_stack_size instead of ada_pthread_minimum_stack_size so the runtime does not require the RTEMS kernel to be configured to have Ada support. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/s-parame__rtems.adb: use _POSIX_Threads_Mini

[Ada] Incorrect Dynamic_Predicate results for static arguments

2021-10-11 Thread Pierre-Marie de Rodat via Gcc-patches
In determining at run time whether a statically-known discrete value satisifies the predicate of a subtype where both - a Dynamic_Predicate aspect specification applies (directly or indirectly) to a subtype; and - at least one other predicate aspect specification (that is, either

[Ada] Warn about conversion with any predefined time types

2021-10-11 Thread Pierre-Marie de Rodat via Gcc-patches
We already had a warning for unchecked conversions that involve the private type Ada.Calendar.Time, whose representation might differ between releases and targets of the compiler. Now this warning is extended to Ada.Real_Time.Time and Ada.Real_Time.Time_Span, which is similarly non-portable. Previ

[Ada] Valid postconditions incorrectly rejected.

2021-10-11 Thread Pierre-Marie de Rodat via Gcc-patches
For users, 'Old attribute references are only allowed within postcondition expressions. Internally, the FE may build trees that transiently (before some subsequent transformation) violate these rules; this is ok, but these violations were being incorrectly flagged in some cases. Fix this problem.

[Ada] Runtime transition: System.Threads

2021-10-11 Thread Pierre-Marie de Rodat via Gcc-patches
Rewrite the former System.Threads implementation for AE653 to work on the new Light runtime for VxWworks7r2Cert. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/s-thread.ads: Fix comments. Remove unused package imports. (Thread_Body_Exception_Exit):

[Ada] Remove redundant guard in expansion of dispatching calls

2021-10-11 Thread Pierre-Marie de Rodat via Gcc-patches
Routines Make_Predefined_Primitive_Specs and Predefined_Primitive_Bodies, which create predefined primitives for derived tagged types, are only called when restriction No_Dispatching_Calls is inactive. There is no need to recheck this restriction when creating individual primitive operations relate

[Ada] Fix for atomic wrongly rejected on object of discriminated type

2021-10-11 Thread Pierre-Marie de Rodat via Gcc-patches
The reason is that the automatic alignment promotion is not yet performed in the case where the nominal subtype is of variable size. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * gcc-interface/decl.c (promote_object_alignment): Add GNU_SIZE parameter and use it for

[Ada] Tweak the warning about missing local raises

2021-10-11 Thread Pierre-Marie de Rodat via Gcc-patches
This prevents the warning from being given when there may still be regular exception handlers in the code, although some of them have been turned into local raises, by querying the predicate that determines whether such regular handlers are removed or not in the front-end. Tested on x86_64-pc-linu

[Ada] Fix problematic import of type-generic GCC atomic builtin

2021-10-11 Thread Pierre-Marie de Rodat via Gcc-patches
This implements the support for most type-generic GCC atomic builtins. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * gcc-interface/gigi.h (resolve_atomic_size): Declare. (list_third): New inline function. * gcc-interface/decl.c (type_for_atomic_builtin_p):

[PATCH 1/2] OpenMP: Handle reference-typed struct members

2021-10-11 Thread Julian Brown
This patch fixes the baseptrs-3.C test case introduced in the patch: https://gcc.gnu.org/pipermail/gcc-patches/2021-October/580729.html The problematic case concerns OpenMP mapping clauses containing struct members of reference type, e.g. "mystruct.myref.myptr[:N]". To be able to access the ar

[PATCH 2/2] OpenACC: Make deep-copy-arrayofstruct.c a libgomp/runtime test

2021-10-11 Thread Julian Brown
I noticed that the test in question now compiles properly, and in fact runs properly too. Thus it's more useful as a runtime test than a passing compilation test that otherwise doesn't do much. This patch moves it to libgomp. Tested with offloading to NVPTX and bootstrapped. (I can probably self

Re: [PATCH 06/13] arm: Fix mve_vmvnq_n_ argument mode

2021-10-11 Thread Richard Sandiford via Gcc-patches
Christophe Lyon via Gcc-patches writes: > The vmvnq_n* intrinsics and have [u]int[16|32]_t arguments, so use > iterator instead of HI in mve_vmvnq_n_. > > 2021-09-03 Christophe Lyon > > gcc/ > * config/arm/mve.md (mve_vmvnq_n_): Use V_elem mode > for operand 1. > > diff --git

Re: [PATCH] options: Fix variable tracking option processing.

2021-10-11 Thread Richard Biener via Gcc-patches
On Mon, Oct 11, 2021 at 3:21 PM Martin Liška wrote: > > On 10/11/21 15:05, Richard Biener wrote: > >> + if (!opts_set->x_flag_var_tracking) > >> +opts->x_flag_var_tracking = optimize >= 1; > > That's still not equivalent to the old code for -fvar-tracking-uninit which > > sets opts->x_flag_va

Re: [PATCH v3 1/6] rs6000: Support SSE4.1 "round" intrinsics

2021-10-11 Thread Paul A. Clarke via Gcc-patches
On Fri, Oct 08, 2021 at 05:31:11PM -0500, Segher Boessenkool wrote: > On Fri, Oct 08, 2021 at 02:27:28PM -0500, Paul A. Clarke wrote: > > On Fri, Oct 08, 2021 at 12:39:15PM -0500, Segher Boessenkool wrote: > > I see. Thanks for the reference. If I understand correctly, volatile > > prevents some op

Re: [PATCH] gcov: make profile merging smarter

2021-10-11 Thread Martin Liška
On 10/5/21 12:04, Richard Biener wrote: On Mon, Oct 4, 2021 at 1:32 PM Martin Liška wrote: On 10/4/21 13:16, Richard Biener wrote: I meant in merge_one_data do not check ->stamp or ->checksum but instead rely on the counter merging code to detect mismatches (there's read_mismatch and read_err

Re: [PATCH 07/13] arm: Implement MVE predicates as vectors of booleans

2021-10-11 Thread Richard Sandiford via Gcc-patches
Christophe Lyon via Gcc-patches writes: > This patch implements support for vectors of booleans to support MVE > predicates, instead of HImode. Since the ABI mandates pred16_t (aka > uint16_t) to represent predicates in intrinsics prototypes, we > introduce a new "predicate" type qualifier so tha

Re: [Patch 4/7, Arm. GCC] Implement target feature macros for PACBTI.

2021-10-11 Thread Richard Earnshaw via Gcc-patches
On 08/10/2021 13:18, Tejas Belagod via Gcc-patches wrote: Hi, This patch implements target feature macros when PACBTI is enabled through the -march option or -mbranch-protection. Tested on arm-none-eabi. OK for trunk? 2021-10-04 Tejas Belagod gcc/ChangeLog: * config/arm/arm-c.c (a

Re: [PATCH 08/13] arm: Implement auto-vectorized MVE comparisons with vectors of boolean predicates

2021-10-11 Thread Richard Sandiford via Gcc-patches
Christophe Lyon via Gcc-patches writes: > We make use of qualifier_predicate to describe MVE builtins > prototypes, restricting to auto-vectorizable vcmp* and vpsel builtins, > as they are exercised by the tests added earlier in the series. > > Special handling is needed for mve_vpselq because it

Re: [PATCH] gcov: make profile merging smarter

2021-10-11 Thread Martin Liška
On 10/11/21 15:49, Martin Liška wrote: Let me update the documentation bits. There's the updated patch. May I install the patch now? Thanks, MartinFrom fdeb81a960faa19f75316e279a79c231da212f99 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Thu, 9 Sep 2021 13:02:24 +0200 Subject: [PATCH] g

Re: [PATCH 09/13] arm: Fix vcond_mask expander for MVE (PR target/100757)

2021-10-11 Thread Richard Sandiford via Gcc-patches
Christophe Lyon via Gcc-patches writes: > From: Christophe Lyon > > The problem in this PR is that we call VPSEL with a mask of vector > type instead of HImode. This happens because operand 3 in vcond_mask > is the pre-computed vector comparison and has vector type. > > This patch fixes it by imp

Re: [PATCH 10/13] arm: Convert remaining MVE vcmp builtins to predicate qualifiers

2021-10-11 Thread Richard Sandiford via Gcc-patches
Christophe Lyon via Gcc-patches writes: > This is mostly a mechanical change, only tested by the intrinsics > expansion tests. > > 2021-09-02 Christophe Lyon > > gcc/ > PR target/100757 > PR target/101325 > * config/arm/arm-builtins.c (BINOP_UNONE_NONE_NONE_QUALIFIERS):

[PATCH] middle-end/101480 - overloaded global new/delete

2021-10-11 Thread Richard Biener via Gcc-patches
The following fixes the issue of ignoring side-effects on memory from overloaded global new/delete operators by not marking them as effectively 'const' apart from other explicitely specified side-effects. This will cause FAIL: g++.dg/warn/Warray-bounds-16.C -std=gnu++1? (test for excess errors)

Re: [PATCH 12/13] arm: Convert more load/store MVE builtins to predicate qualifiers

2021-10-11 Thread Richard Sandiford via Gcc-patches
Christophe Lyon via Gcc-patches writes: > This patch covers a few builtins where we do not use the > iterator and thus we cannot use . > > However this introduces a problem for the v2di instructions, because > there is not predicate for this case. For instance, changing > STRSBS_P_QUALIFIERS bre

Re: [PATCH 13/13] arm: Convert more MVE/CDE builtins to predicate qualifiers

2021-10-11 Thread Richard Sandiford via Gcc-patches
Christophe Lyon via Gcc-patches writes: > This patch covers a few non-load/store builtins where we do not use > the iterator and thus we cannot use . > > We need to update the expected code in cde-mve-full-assembly.c because > we now use mve_movv16qi instead of movhi to generate the vmsr > instru

[PATCH] middle-end/102683 - fix .DEFERRED_INIT expansion

2021-10-11 Thread Richard Biener via Gcc-patches
This avoids using an integer type for which we don't have an approprate mode when expanding .DEFERRED_INIT to a non-memory entity. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. Will push after it finished. Richard. 2021-10-11 Richard Biener PR middle-end/102683

Re: [PATCH] libstdc++: Fix compare_three_way for constexpr and Clang

2021-10-11 Thread Paul Keir via Gcc-patches
*ping* From: Paul Keir Sent: 03 September 2021 11:31 To: gcc-patches@gcc.gnu.org Cc: libstd...@gcc.gnu.org Subject: Re: [PATCH] libstdc++: Fix compare_three_way for constexpr and Clang *ping* From: Paul Keir Sent

[PATCH] libgomp: alloc* test fixes [PR102628, PR102668]

2021-10-11 Thread Jakub Jelinek via Gcc-patches
Hi! As reported, the alloc-9.c test and alloc-{1,2,3}.F* and alloc-11.f90 tests fail on powerpc64-linux with -m32. The reason why it fails just there is that malloc doesn't guarantee there 128-bit alignment (historically glibc guaranteed 2 * sizeof (void *) alignment from malloc). There are two s

Re: [PATCH 07/11] OpenMP: Fix non-zero attach/detach bias for struct dereferences

2021-10-11 Thread Julian Brown
On Fri, 1 Oct 2021 10:09:05 -0700 Julian Brown wrote: > libgomp/ > * testsuite/libgomp.c++/baseptrs-3.C: Add test (XFAILed for > now). This XFAILed test is addressed in the followup patch: https://gcc.gnu.org/pipermail/gcc-patches/2021-October/581342.html Cheers, Julian

Re: [PATCH 12/13] arm: Convert more load/store MVE builtins to predicate qualifiers

2021-10-11 Thread Richard Sandiford via Gcc-patches
Richard Sandiford via Gcc-patches writes: > Christophe Lyon via Gcc-patches writes: >> This patch covers a few builtins where we do not use the >> iterator and thus we cannot use . >> >> However this introduces a problem for the v2di instructions, because >> there is not predicate for this case.

Re: [SVE] [gimple-isel] PR93183 - SVE does not use neg as conditional

2021-10-11 Thread Richard Sandiford via Gcc-patches
Prathamesh Kulkarni writes: > On Fri, 8 Oct 2021 at 21:19, Richard Sandiford > wrote: >> >> Thanks for looking at this. >> >> Prathamesh Kulkarni writes: >> > Hi, >> > As mentioned in PR, for the following test-case: >> > >> > typedef unsigned char uint8_t; >> > >> > static inline uint8_t >> > x

Re: [PATCH v4] attribs: Implement -Wno-attributes=vendor::attr [PR101940]

2021-10-11 Thread Marek Polacek via Gcc-patches
Ping. On Tue, Sep 28, 2021 at 04:20:46PM -0400, Marek Polacek wrote: > On Thu, Sep 23, 2021 at 02:25:16PM -0400, Jason Merrill wrote: > > On 9/20/21 18:59, Marek Polacek via Gcc-patches wrote: > > > +void > > > +handle_ignored_attributes_option (vec *v) > > > +{ > > > + if (v == nullptr) > > > +

Re: [PATCH] attribs: Allow optional second arg for attr deprecated [PR102049]

2021-10-11 Thread Marek Polacek via Gcc-patches
Any thoughts? On Thu, Sep 23, 2021 at 12:16:36PM -0400, Marek Polacek via Gcc-patches wrote: > Clang implements something we don't have: > > __attribute__((deprecated("message", "replacement"))); > > which seems pretty neat so I wrote this patch to add it to gcc. > > It doesn't allow the option

Re: [PATCH] rs6000/test: Adjust some cases due to O2 vect [PR102658]

2021-10-11 Thread Segher Boessenkool
Hi! On Mon, Oct 11, 2021 at 10:47:00AM +0800, Kewen.Lin wrote: > As PR102658 shows, commit r12-4240 enables vectorization at O2, > some cases need to be adjusted accordingly for rs6000 port. > > - For target specific test cases, this adds -fno-tree-vectorize > to retain original test points, othe

Re: [PATCH, rs6000] Disable gimple fold for float or double vec_minmax when fast-math is not set

2021-10-11 Thread Segher Boessenkool
Hi! On Thu, Aug 26, 2021 at 09:19:30AM +0800, HAO CHEN GUI wrote: > gcc/ > ?? * config/rs6000/rs6000-call.c (rs6000_gimple_fold_builtin): > ?? Modify the VSX_BUILTIN_XVMINDP, ALTIVEC_BUILTIN_VMINFP, > ?? VSX_BUILTIN_XVMAXDP, ALTIVEC_BUILTIN_VMAXFP expansions. Something mangles your em

Re: [RFC] ldist: Recognize rawmemchr loop patterns

2021-10-11 Thread Stefan Schulze Frielinghaus via Gcc-patches
On Fri, Sep 17, 2021 at 10:08:27AM +0200, Richard Biener wrote: > On Mon, Sep 13, 2021 at 4:53 PM Stefan Schulze Frielinghaus > wrote: > > > > On Mon, Sep 06, 2021 at 11:56:21AM +0200, Richard Biener wrote: > > > On Fri, Sep 3, 2021 at 10:01 AM Stefan Schulze Frielinghaus > > > wrote: > > > > > >

Re: [PATCH, rs6000] Disable gimple fold for float or double vec_minmax when fast-math is not set

2021-10-11 Thread Segher Boessenkool
On Mon, Oct 11, 2021 at 10:55:36AM -0500, Segher Boessenkool wrote: > On Thu, Aug 26, 2021 at 09:19:30AM +0800, HAO CHEN GUI wrote: > > gcc/ > > ?? * config/rs6000/rs6000-call.c (rs6000_gimple_fold_builtin): > > ?? Modify the VSX_BUILTIN_XVMINDP, ALTIVEC_BUILTIN_VMINFP, > > ?? VSX_BUILT

Re: *PING* [PATCH] doc: improve -fsanitize=undefined description

2021-10-11 Thread Richard Sandiford via Gcc-patches
Diane Meirowitz via Gcc-patches writes: > Please review my patch. It is tiny. Thank you. Thanks for the patch and sorry for the very slow response. I've now pushed this to master and all active branches. Thanks, Richard > Diane > > On 9/15/21, 5:02 PM, "Diane Meirowitz" wrote: > > > d

Re: [PATCH] rs6000/test: Adjust some cases due to O2 vect [PR102658]

2021-10-11 Thread Martin Sebor via Gcc-patches
On 10/11/21 9:30 AM, Segher Boessenkool wrote: Hi! On Mon, Oct 11, 2021 at 10:47:00AM +0800, Kewen.Lin wrote: As PR102658 shows, commit r12-4240 enables vectorization at O2, some cases need to be adjusted accordingly for rs6000 port. - For target specific test cases, this adds -fno-tree-vector

Re: [PATCH 1/5]AArch64 sve: combine inverted masks into NOTs

2021-10-11 Thread Richard Sandiford via Gcc-patches
Tamar Christina writes: > Hi, > > Sending a new version of the patch because I noticed the pattern was > overriding the nor pattern. > > A second pattern is needed to capture the nor case as combine will match the > longest sequence first. So without this pattern we end up de-optimizing nor > an

Re: *PING* [PATCH] doc: improve -fsanitize=undefined description

2021-10-11 Thread Diane Meirowitz via Gcc-patches
Richard, Thank you! Diane > On Oct 11, 2021, at 12:15 PM, Richard Sandiford > wrote: > > Diane Meirowitz via Gcc-patches writes: >> Please review my patch. It is tiny. Thank you. > > Thanks for the patch and sorry for the very slow response. > I've now pushed this to master and all active b

Re: [PATCH v3 1/6] rs6000: Support SSE4.1 "round" intrinsics

2021-10-11 Thread Segher Boessenkool
On Mon, Oct 11, 2021 at 08:46:17AM -0500, Paul A. Clarke wrote: > On Fri, Oct 08, 2021 at 05:31:11PM -0500, Segher Boessenkool wrote: > > "asm volatile" means there is a side effect in the asm. This means that > > it has to be executed on the real machine the same as on the abstract > > machine, w

Re: [PATCH 2/5]AArch64 sve: combine nested if predicates

2021-10-11 Thread Richard Sandiford via Gcc-patches
Tamar Christina writes: >> > Note: This patch series is working incrementally towards generating the >> most >> > efficient code for this and other loops in small steps. >> >> It looks like this could be done in the vectoriser via an extension of the >> scalar_cond_masked_set mechanism. We

[PATCH] libstdc++: Check [ptr,end) and [ptr,ptr+n) ranges with _GLIBCXX_ASSERTIONS

2021-10-11 Thread Jonathan Wakely via Gcc-patches
This enables lightweight checks for the __glibcxx_requires_valid_range and __glibcxx_requires_string_len macros when _GLIBCXX_ASSERTIONS is defined. By using __builtin_object_size we can check whether the end of the range is part of the same object as the start of the range, and detect problems l

  1   2   >