Re: [PATCH] pch: Add support for PCH for relocatable executables

2021-11-10 Thread Iain Sandoe
> On 9 Nov 2021, at 12:18, Jakub Jelinek via Gcc-patches > wrote: > > On Tue, Nov 09, 2021 at 11:40:08AM +, Iain Sandoe wrote: >> There were two issues, of which one remains and probably affects all targets. >> >> 1. The Darwin PCH memory allocation scheme used a system that works relia

Re: [PATCH] Improve integer bit test on __atomic_fetch_[or|and]_* returns

2021-11-10 Thread Richard Biener via Gcc-patches
On Wed, Nov 10, 2021 at 6:21 AM liuhongt via Gcc-patches wrote: > > > > > > > +#if GIMPLE > > > +(match (nop_atomic_bit_test_and_p @0 @1) > > > + (bit_and:c (nop_convert?@4 (ATOMIC_FETCH_OR_XOR_N @2 INTEGER_CST@0 @3)) > > > + INTEGER_CST@1) > > > > no need for the :c on the bit_and when

Re: [PATCH] rs6000: Fix a handful of 32-bit built-in function problems in the new support

2021-11-10 Thread Segher Boessenkool
On Tue, Nov 09, 2021 at 03:46:54PM -0600, Bill Schmidt wrote: > Hi! Some time ago I realized I hadn't tested the new builtin support against > 32-bit > big-endian in quite a while. When I did, I found a handful of errors that > needed > correcting. > - One builtin needs to be disabled for 32-b

Re: [EXTERNAL] Re: [PATCH] PR tree-optimization/102232 Adding a missing pattern to match.pd

2021-11-10 Thread Richard Biener via Gcc-patches
On Tue, Nov 9, 2021 at 5:25 PM Navid Rahimi wrote: > > Hi Richard, > > Thank you so much for your detailed feedback. I am attaching another version > of the patch which does include all the changes you mentioned. > > Bellow you can see my response to your feedbacks: > > > the canonical order of t

Re: Values of WIDE_INT_MAX_ELTS in gcc11 and gcc12 are different

2021-11-10 Thread Richard Biener via Gcc-patches
On Tue, Nov 9, 2021 at 6:48 PM Qing Zhao wrote: > > So, based on the discussion so far, is the following patch good to go? OK. Thanks, Richard. > Let me know if you have more comments on the following patch: > > (At the same time, I am testing this patch on both x86 and aarch64) > > thanks. >

[PATCH] rs6000, libgcc: Fix up -Wmissing-prototypes warning on rs6000/linux-unwind.h

2021-11-10 Thread Jakub Jelinek via Gcc-patches
Hi! Jonathan reported and I've verified a In file included from ../../../libgcc/unwind-dw2.c:412: ./md-unwind-support.h:398:6: warning: no previous prototype for ‘ppc_backchain_fallback’ [-Wmissing-prototypes] 398 | void ppc_backchain_fallback (struct _Unwind_Context *context, void *a) |

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-11-10 Thread Richard Biener via Gcc-patches
On Tue, Nov 9, 2021 at 5:41 PM Andrew MacLeod wrote: > > On 11/9/21 8:37 AM, Richard Biener wrote: > > On Mon, Nov 8, 2021 at 8:45 PM Andrew MacLeod wrote: > >> On 11/8/21 10:05 AM, Martin Liška wrote: > >>> On 9/28/21 22:39, Andrew MacLeod wrote: > In Theory, modifying the IL should be fine

Re: [PATCH] rs6000/doc: Rename future cpu with power10

2021-11-10 Thread Segher Boessenkool
Hi! On Wed, Nov 10, 2021 at 01:41:25PM +0800, Kewen.Lin wrote: > Commmit 5d9d0c94588 renamed future to power10 and ace60939fd2 > updated the documentation for "future" renaming. This patch > is to rename the remaining "future architecture" references in > documentation. Good find :-) > @@ -2861

Re: [PATCH] rs6000, libgcc: Fix up -Wmissing-prototypes warning on rs6000/linux-unwind.h

2021-11-10 Thread Segher Boessenkool
On Wed, Nov 10, 2021 at 09:39:12AM +0100, Jakub Jelinek wrote: > Hi! > > Jonathan reported and I've verified a > In file included from ../../../libgcc/unwind-dw2.c:412: > ./md-unwind-support.h:398:6: warning: no previous prototype for > ‘ppc_backchain_fallback’ [-Wmissing-prototypes] > 398 | vo

[Ada] Better error message on missing parentheses

2021-11-10 Thread Pierre-Marie de Rodat via Gcc-patches
Adapt the test to issue a different error message when it is likely that an if-expression is suspected, but parentheses are missing. This makes the test more in line with its comment. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * par-ch4.adb (P_Primary): Adapt test for get

[Ada] Create explicit ghost mirror unit for big integers

2021-11-10 Thread Pierre-Marie de Rodat via Gcc-patches
So far, only one light runtime units was using the standard unit for big integers. A special ghost mirror had been created for the reduced runtimes. In order to use more liberally big integers for proof of the runtime, rename this ghost mirror into Big_Integers_Ghost at the same level in the hierar

[Ada] Warn when interfaces swapped between full and partial view

2021-11-10 Thread Pierre-Marie de Rodat via Gcc-patches
The following package declaration is legal but the declaration of D leads to performing a tree transformation. Defining D as `type D is new B and A with null record` would be consistent with the partial view and thus does not require any transformation. This is helpful in the case of generic pack

[Ada] Extend optimized equality of 2-element arrays

2021-11-10 Thread Pierre-Marie de Rodat via Gcc-patches
Array equality is typically expanded into a loop, but for small arrays such loops are inefficient (and the code generator might fail to turn them into linear code, especially when the array contains records). We optimize equality of 2-element arrays into an AND THEN expression, but only for array

[Ada] Fix Constraint error on rexgexp close bracket find algorithm

2021-11-10 Thread Pierre-Marie de Rodat via Gcc-patches
In pattern syntax checking, make a procedure out of the algorithm to find the close bracket matching an open bracket. Fix cases where the close bracket is missing in the special cases '-' and '\', e.g.: - "[a-b" - "[\b" - "[\]" misses either a backslash or a close bracket These three cases would

[Ada] Fix oversight in latest change to Has_Compatible_Type

2021-11-10 Thread Pierre-Marie de Rodat via Gcc-patches
Adding manual calls to Covers in the callers overlooks the overloaded case, so this follow-up change adds back the reversed calls to Has_Compatible_Type but guard them with a boolean flag set to true for comparison operators. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * s

[Ada] Use predefined equality for arrays inside records

2021-11-10 Thread Pierre-Marie de Rodat via Gcc-patches
The equality of arrays inside records always applies the predefined equality, just like for elementary types. In Expand_Composite_Equality we had some dedicated code for arrays inside records which was failing to duplicate a similar code in Expand_N_Op_Eq, e.g. it was failing to apply validity chec

[Ada] Don't carry action bodies for expansion of array equality

2021-11-10 Thread Pierre-Marie de Rodat via Gcc-patches
Expansion of array equality creates a function, which needs to be inserted into the AST. The insertion point was carried from Expand_N_Op_Eq to Expand_Record_Equality and Expand_Array_Equality, which were mutually recursive (via Expand_Composite_Equality). Now these routines are no longer recursive

[Ada] Prove double precision integer arithmetic unit

2021-11-10 Thread Pierre-Marie de Rodat via Gcc-patches
This unit is used to implement the rutime support for fixed-point operations (conversions, multiplication, division and I/O). Its correctness is proved with GNATprove. Proof is performed with GNATprove options --level=4 --prover=all Proof requires use of the special Big_Integers_Ghost unit for s

[Ada] Do not assume a priority value of zero is a valid priority

2021-11-10 Thread Pierre-Marie de Rodat via Gcc-patches
While a priority value of zero is typically valid on most systems, there are some targets where zero may be reserved for OS purposes (for example: RTEMS where zero is reserved for use by the idle thread and should not be used by applications). This patch removes one occurrence in GNARL where a Prio

[Ada] ACATS BDC1002 shall not error on arbitrary aspect

2021-11-10 Thread Pierre-Marie de Rodat via Gcc-patches
When giving an arbitrary pragma Restrictions (No_Specification_of_Aspect => Future_Aspect); Future_Aspect shall not be rejected. Nevertheless a warning shall be emitted. In case the unknown aspect might be a misspelling, a hint should be emitted accordingly. To ease this spell-checking, Aspe

[Ada] Avoid warnings regarding rep clauses in generics

2021-11-10 Thread Pierre-Marie de Rodat via Gcc-patches
Representation-related node fields are not set for types in generic units, so we should not warn based on the values of such fields. Also avoid printing the values of such fields for -gnatR. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * repinfo.adb (List_Common_Type_Info,

[Ada] Fix comments about expansion of array equality

2021-11-10 Thread Pierre-Marie de Rodat via Gcc-patches
Expansion of array equality involves two index variables. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_ch4.adb (Expand_Array_Equality): Fix inconsistent casing in comment about the template for expansion of array equality; now we use lower case for tru

[Ada] Avoid warnings regarding rep clauses in generics -- follow-on

2021-11-10 Thread Pierre-Marie de Rodat via Gcc-patches
Codepeer is complaining about uninitialized variables. This fixes it. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * repinfo.adb (List_Component_Layout): Initialize Sbit.diff --git a/gcc/ada/repinfo.adb b/gcc/ada/repinfo.adb --- a/gcc/ada/repinfo.adb +++ b/gcc/ada/repinfo.

[Ada] Warn for bidirectional characters

2021-11-10 Thread Pierre-Marie de Rodat via Gcc-patches
Bidirectional characters can cause security vulnerabilities, as explained in the paper mentioned in a comment in this patch. Therefore, we warn if such characters appear in string_literals, character_literals, or comments. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * scng

[Ada] Minor cleanup in translation of calls to subprograms

2021-11-10 Thread Pierre-Marie de Rodat via Gcc-patches
This gets rid of the DECL_STUBBED_P macro and adjusts Call_to_gnu. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * gcc-interface/ada-tree.h (DECL_STUBBED_P): Delete. * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set it. * gcc-interface/trans.c (Call_to_

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-11-10 Thread Richard Biener via Gcc-patches
On Tue, Nov 9, 2021 at 5:44 PM Martin Liška wrote: > > On 11/9/21 14:37, Richard Biener wrote: > > On Mon, Nov 8, 2021 at 8:45 PM Andrew MacLeod wrote: > >> > >> On 11/8/21 10:05 AM, Martin Liška wrote: > >>> On 9/28/21 22:39, Andrew MacLeod wrote: > In Theory, modifying the IL should be fin

[PATCH] x86: Update -mtune=alderlake

2021-11-10 Thread Cui,Lili via Gcc-patches
Hi Uros, This patch is to update mtune for alderlake. Bootstrap is ok, and no regressions for i386/x86-64 testsuite. OK for master? Update mtune for alderlake, Alder Lake Intel Hybrid Technology will not support Intel® AVX-512. ISA features such as Intel® AVX, AVX-VNNI, Intel® AVX2, and UMONITO

[PATCH] dwarf2out: Fix up field_byte_offset [PR101378]

2021-11-10 Thread Jakub Jelinek via Gcc-patches
Hi! For PCC_BITFIELD_TYPE_MATTERS field_byte_offset has quite large code to deal with it since many years ago (see it e.g. in GCC 3.2, although it used to be on HOST_WIDE_INTs, then on double_ints, now on offset_ints). But that code apparently isn't able to cope with members with empty class types

Fix modref_tree::remap_params

2021-11-10 Thread Jan Hubicka via Gcc-patches
Hi, this patch fixes wrong compare in remap_params which triggers a wrong code with my followup patch. This needs backporting to gcc11 as well which I plan to do tomorrow. Bootstrapped/regtested x86_64-linux, comitted. gcc/ChangeLog: * ipa-modref-tree.h (modref_tree::remap_params): Fix

Re: [PATCH] dwarf2out: Fix up field_byte_offset [PR101378]

2021-11-10 Thread Eric Botcazou via Gcc-patches
> I think Ada has bitfields of aggregate types, so CCing Eric, though > I'd hope it doesn't have bitfields where type size is smaller than > field decl size like C++ has. Assuming your sentence is written in the right sense :-) then, no, in Ada bit- fields always have DECL_SIZE (bf) <= TYPE_SIZE (

Re: [PATH][_GLIBCXX_DEBUG] Fix unordered container merge

2021-11-10 Thread Jonathan Wakely via Gcc-patches
On Wed, 10 Nov 2021 at 05:47, François Dumont wrote: > On 09/11/21 5:25 pm, Jonathan Wakely wrote: > > > > On Mon, 8 Nov 2021 at 21:36, François Dumont wrote: > >> Yet another version this time with only 1 guard implementation. The >> predicate to invalidate the safe iterators has been externali

[PATCH] gimple-fold: Smarter optimization of _chk variants

2021-11-10 Thread Siddhesh Poyarekar
Instead of comparing LEN and SIZE only if they are constants, use their ranges to decide if LEN will always be lower than or same as SIZE. This change ends up putting the stringop-overflow warning line number against the strcpy implementation, so adjust the warning check to be line number agnostic

Re: [PATCH] rs6000/doc: Rename future cpu with power10

2021-11-10 Thread Kewen.Lin via Gcc-patches
Hi Segher, on 2021/11/10 下午4:52, Segher Boessenkool wrote: > Hi! > > On Wed, Nov 10, 2021 at 01:41:25PM +0800, Kewen.Lin wrote: >> Commmit 5d9d0c94588 renamed future to power10 and ace60939fd2 >> updated the documentation for "future" renaming. This patch >> is to rename the remaining "future ar

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

2021-11-10 Thread Richard Biener via Gcc-patches
On Sun, Oct 24, 2021 at 9:03 PM Di Zhao OS wrote: > > Hi, > > Attached is a new version of the patch, mainly for improving performance > and simplifying the code. The patch doesn't apply anymore, can you update it please? I see the new ssa-fre-101.c test already passing without the patch. Likewi

Re: [PATCH] dwarf2out: Fix up field_byte_offset [PR101378]

2021-11-10 Thread Richard Biener via Gcc-patches
On Wed, 10 Nov 2021, Jakub Jelinek wrote: > Hi! > > For PCC_BITFIELD_TYPE_MATTERS field_byte_offset has quite large code > to deal with it since many years ago (see it e.g. in GCC 3.2, although it > used to be on HOST_WIDE_INTs, then on double_ints, now on offset_ints). > But that code apparently

Re: [PATCH] rs6000/doc: Rename future cpu with power10

2021-11-10 Thread Segher Boessenkool
Hi! On Wed, Nov 10, 2021 at 05:39:27PM +0800, Kewen.Lin wrote: > @@ -27779,10 +27779,10 @@ Enable/disable the @var{__float128} keyword for > IEEE 128-bit floating point > and use either software emulation for IEEE 128-bit floating point or > hardware instructions. > > -The VSX instruction set

[PATCH] testsuite/102690 - XFAIL g++.dg/warn/Warray-bounds-16.C

2021-11-10 Thread Richard Biener via Gcc-patches
This XFAILs the bogus diagnostic test and rectifies the expectation on the optimization. Tested on x86_64-unknown-linux-gnu, pushed. 2021-11-10 Richard Biener PR testsuite/102690 * g++.dg/warn/Warray-bounds-16.C: XFAIL diagnostic part and optimization. --- gcc/testsui

[wwwdocs, patch] gcc-12/changes.html: Update OpenMP status

2021-11-10 Thread Tobias Burnus
Cumulative update of the OpenMP 5.x changes in GCC 12. I hope it covers all essential changes. Of course, some other could be added like 'omp target in_reduction', which was missing before (oversight) and possibly other things, which I have missed. For the last bullet: the implementation-status

[wwwdocs] projects/gomp/: Add OpenMP 5.2

2021-11-10 Thread Tobias Burnus
This is rather obvious – and unless there are comments, I intent to commit it as obvious later today. I think that's the only place to be updated on the webserver. Tobias - Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit be

[PATCH v2] gimple-fold: Smarter optimization of _chk variants

2021-11-10 Thread Siddhesh Poyarekar
Instead of comparing LEN and SIZE only if they are constants, use their ranges to decide if LEN will always be lower than or same as SIZE. This change ends up putting the stringop-overflow warning line number against the strcpy implementation, so adjust the warning check to be line number agnostic

[PATCH] lto-wrapper: fix memory corruption.

2021-11-10 Thread Martin Liška
Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? The first argument of merge_and_complain is actually vector where we merge options and it should be propagated to caller properly. Fixes: ==6656== Invalid read of size 8 ==6656==at 0x408056: merge

Re: [PATCH] dwarf2out: Fix up field_byte_offset [PR101378]

2021-11-10 Thread Jakub Jelinek via Gcc-patches
On Wed, Nov 10, 2021 at 10:52:42AM +0100, Richard Biener wrote: > > The only thing I'm unsure about is whether the test should be > > DECL_BIT_FIELD or DECL_BIT_FIELD_TYPE should be tested. I thought it > > doesn't matter, but it seems stor-layout.c in some cases clears > > DECL_BIT_FIELD if their

Re: [wwwdocs, patch] gcc-12/changes.html: Update OpenMP status

2021-11-10 Thread Jakub Jelinek via Gcc-patches
On Wed, Nov 10, 2021 at 11:33:09AM +0100, Tobias Burnus wrote: > Cumulative update of the OpenMP 5.x changes in GCC 12. > > I hope it covers all essential changes. Of course, > some other could be added like 'omp target in_reduction', > which was missing before (oversight) and possibly other > thi

[PATCH][GCC] aarch64: Add new vector mode V8DI

2021-11-10 Thread Przemyslaw Wirkus via Gcc-patches
Hi, This patch is adding new V8DI mode which will be used with new Armv8.7-A LS64 extension intrinsics. Regtested on aarch64-elf and no issues. OK for master? gcc/ChangeLog: 2021-11-10 Przemyslaw Wirkus * config/aarch64/aarch64-modes.def (VECTOR_MODE): New V8DI mode. * confi

Re: [PATCH] lto-wrapper: fix memory corruption.

2021-11-10 Thread Richard Biener via Gcc-patches
On Wed, Nov 10, 2021 at 11:47 AM Martin Liška wrote: > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Ready to be installed? OK. Is this also latent on branches? > The first argument of merge_and_complain is actually vector where > we merge options and it should b

Re: [PATCH] dwarf2out: Fix up field_byte_offset [PR101378]

2021-11-10 Thread Richard Biener via Gcc-patches
On Wed, 10 Nov 2021, Jakub Jelinek wrote: > On Wed, Nov 10, 2021 at 10:52:42AM +0100, Richard Biener wrote: > > > The only thing I'm unsure about is whether the test should be > > > DECL_BIT_FIELD or DECL_BIT_FIELD_TYPE should be tested. I thought it > > > doesn't matter, but it seems stor-layout

Re: [PATCH] dwarf2out: Fix up field_byte_offset [PR101378]

2021-11-10 Thread Jakub Jelinek via Gcc-patches
On Wed, Nov 10, 2021 at 12:36:04PM +0100, Richard Biener wrote: > > I'm afraid I forgot the DECL_FIELD_OFFSET vs. DECL_FIELD_BIT_OFFSET stuff > > enough that I'm not sure what is the right fix for that case, maybe it would > > work if we dropped the && TREE_CODE (DECL_FIELD_OFFSET (decl)) == > > I

[PATCH][committed]middle-end vect: remove unused variable in complex numbers detection code.

2021-11-10 Thread Tamar Christina via Gcc-patches
Hi All, This removed an unused variable that clang seems to catch when compiling GCC with Clang. Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. Committed under the obvious rule. Thanks, Tamar gcc/ChangeLog: * tree-vect-slp-patterns.c (complex_mul_pattern::matches): Re

[PATCH][committed]middle-end: Fix signbit tests when ran on ISA with support for masks.

2021-11-10 Thread Tamar Christina via Gcc-patches
Hi All, These test don't work on vector ISAs where the truth type don't match the vector mode of the operation. However I still want the tests to run on these architectures but just turn off the ISA modes that enable masks. This thus turns off SVE is it's on and turns off AVX512 if it's on. Reg

Extend modref by side-effect analysis

2021-11-10 Thread Jan Hubicka via Gcc-patches
Hi, this patch makes modref to also collect info whether function has side effects. This allows pure/const function detection and also handling functions which do store some memory in similar way as we handle pure/consts now. The code is symmetric to what ipa-pure-const does. Modref is actually

Re: [PATH][_GLIBCXX_DEBUG] Fix unordered container merge

2021-11-10 Thread Jonathan Wakely via Gcc-patches
On Tue, 9 Nov 2021 at 16:25, Jonathan Wakely wrote: > > > On Mon, 8 Nov 2021 at 21:36, François Dumont wrote: > >> Yet another version this time with only 1 guard implementation. The >> predicate to invalidate the safe iterators has been externalized. >> >> Ok to commit ? >> > > I like this vers

[PATCH][committed][testsuite]: change vect_long to vect_long_long in complex tests.

2021-11-10 Thread Tamar Christina via Gcc-patches
Hi All, These tests are still failing on SPARC and it looks like this is because I need to use vect_long_long instead of vect_long. Committed under the obvious rule. Thanks, Tamar gcc/testsuite/ChangeLog: PR testsuite/103042 * gcc.dg/vect/complex/bb-slp-complex-add-pattern-long

[PATCH] Apply TLC to control dependence compute

2021-11-10 Thread Richard Biener via Gcc-patches
This makes the control dependence compute avoid a find_edge and optimizes allocation by embedding the bitmap head into the vector of control dependences instead of allocating all of them. It also uses a local bitmap obstack. The bitmap changes make it necessary to shuffle some includes. Bootstrap

[committed] libstdc++: Disable gthreads weak symbols for glibc 2.34 [PR103133]

2021-11-10 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, glibc 2.17 and 2.34, pushed to trunk. We also want something like this for musl-based targets. And Florian has suggested we should also disable the weak symbols for libstdc++.a, but those need more work. ... Since Glibc 2.34 all pthreads symbols are defined directly in

[committed] libstdc++: Fix test for libstdc++ not including [PR100117]

2021-11-10 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. The headers for the C library are not under our control, so we can't prevent them from including . Change the PR 49745 test to only include the C++ library headers, not the ones. To ensure isn't included automatically we need to use no_pch to disable

[PATCH]AArch64 Remove shuffle pattern for rounding variant.

2021-11-10 Thread Tamar Christina via Gcc-patches
Hi All, This removed the patterns to optimize the rounding shift and narrow. The optimization is valid only for the truncating rounding shift and narrow, for the rounding shift and narrow we need a different pattern that I will submit separately. This wasn't noticed before as the benchmarks did n

Re: [PATCH v2] gimple-fold: Smarter optimization of _chk variants

2021-11-10 Thread Siddhesh Poyarekar
On 11/10/21 16:15, Siddhesh Poyarekar wrote: Instead of comparing LEN and SIZE only if they are constants, use their ranges to decide if LEN will always be lower than or same as SIZE. This change ends up putting the stringop-overflow warning line number against the strcpy implementation, so adju

Re: [PATCH] fixincludes: don't assume getcwd() can handle NULL argument

2021-11-10 Thread Xi Ruoyao via Gcc-patches
On Wed, 2021-11-10 at 00:02 +, Joseph Myers wrote: > On Tue, 9 Nov 2021, Xi Ruoyao via Gcc-patches wrote: > > > POSIX says: > > > >     On some implementations, if buf is a null pointer, getcwd() may > > obtain > >     size bytes of memory using malloc(). In this case, the pointer > > returne

Re: [PATCH] x86: Update -mtune=alderlake

2021-11-10 Thread Uros Bizjak via Gcc-patches
On Wed, Nov 10, 2021 at 10:09 AM Cui,Lili wrote: > > Hi Uros, > > This patch is to update mtune for alderlake. > > Bootstrap is ok, and no regressions for i386/x86-64 testsuite. > > OK for master? > > Update mtune for alderlake, Alder Lake Intel Hybrid Technology will not > support > Intel® AVX-5

RE: [PATCH]AArch64 Remove shuffle pattern for rounding variant.

2021-11-10 Thread Kyrylo Tkachov via Gcc-patches
> -Original Message- > From: Tamar Christina > Sent: Wednesday, November 10, 2021 12:09 PM > To: gcc-patches@gcc.gnu.org > Cc: nd ; Richard Earnshaw ; > Marcus Shawcroft ; Kyrylo Tkachov > ; Richard Sandiford > > Subject: [PATCH]AArch64 Remove shuffle pattern for rounding variant. > >

[committed] aarch64: Tweak FMAX/FMIN iterators

2021-11-10 Thread Richard Sandiford via Gcc-patches
There was some duplication between the maxmin_uns (uns for unspec rather than unsigned) int attribute and the optab int attribute. The difficulty for FMAXNM and FMINNM is that the instructions really correspond to two things: the smax/smin optabs for floats (used only for fast-math-like flags) and

Re: [PATCH] lto-wrapper: fix memory corruption.

2021-11-10 Thread Martin Liška
On 11/10/21 12:31, Richard Biener wrote: Is this also latent on branches? No, I made the refactoring early in this stage 1 in r12-741-g227a2ecf663d69972b851f51f1934d18927b62cd Martin

Use modref summary to DSE calls to non-pure functions

2021-11-10 Thread Jan Hubicka via Gcc-patches
Hi, this patch implements DSE using modref summaries: if function has no side effects besides storing to memory pointed to by its argument and if we can prove those stores to be dead, we can optimize out. So we handle for example: volatile int *ptr; struct a { int a,b,c; } a; __attribute

[PATCH 1/5] Add IFN_COND_FMIN/FMAX functions

2021-11-10 Thread Richard Sandiford via Gcc-patches
This patch adds conditional forms of FMAX and FMIN, following the pattern for existing conditional binary functions. Tested on aarch64-linux-gnu and x86_64-linux-gnu. OK to install? Richard gcc/ * doc/md.texi (cond_fmin@var{mode}, cond_fmax@var{mode}): Document. * optabs.def (c

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

2021-11-10 Thread Richard Sandiford via Gcc-patches
code_helper and gimple_match_op seem like generally useful ways of summing up a gimple_assign or gimple_call (or gimple_cond). This patch adds a gimple_extract_op function that can be used for that. Tested on aarch64-linux-gnu and x86_64-linux-gnu. OK to install? Richard gcc/ * gimple-

[PATCH 3/5] gimple-match: Make code_helper conversions explicit

2021-11-10 Thread Richard Sandiford via Gcc-patches
code_helper provides conversions to tree_code and combined_fn. Now that the codebase is C++11, we can mark these conversions as explicit. This avoids accidentally using code_helpers with functions that take tree_codes, which would previously entail a hidden unchecked conversion. Tested on aarch64

[PATCH 4/5] vect: Make reduction code handle calls

2021-11-10 Thread Richard Sandiford via Gcc-patches
This patch extends the reduction code to handle calls. So far it's a structural change only; a later patch adds support for specific function reductions. Most of the patch consists of using code_helper and gimple_match_op to describe the reduction operations. The other main change is that vector

[PATCH 5/5] vect: Add support for fmax and fmin reductions

2021-11-10 Thread Richard Sandiford via Gcc-patches
This patch adds support for reductions involving calls to fmax*() and fmin*(), without the -ffast-math flags that allow them to be converted to MAX_EXPR and MIN_EXPR. Tested on aarch64-linux-gnu and x86_64-linux-gnu. OK to install? Richard gcc/ * doc/md.texi (reduc_fmin_scal_@var{m}):

[PATCH 1/4] Canonicalize argument order for commutative functions

2021-11-10 Thread Richard Sandiford via Gcc-patches
This patch uses information about internal functions to canonicalize the argument order of calls. Tested on aarch64-linux-gnu and x86_64-linux-gnu. OK to install? Richard gcc/ * gimple-fold.c: Include internal-fn.h. (fold_stmt_1): If a function maps to an internal one, use

[PATCH 2/4] Mark IFN_COMPLEX_MUL as commutative

2021-11-10 Thread Richard Sandiford via Gcc-patches
Mark IFN_COMPLEX_MUL as commutative. Tested on aarch64-linux-gnu and x86_64-linux-gnu. OK to install? Richard gcc/ * internal-fn.c (commutative_binary_fn_p): Handle IFN_COMPLEX_MUL. gcc/testsuite/ * gcc.target/aarch64/sve/complex_mul_1.c: New test. --- gcc/internal-fn.c

[PATCH 3/4] Mark IFN_UBSAN_CHECK_ADD/MUL as commutative

2021-11-10 Thread Richard Sandiford via Gcc-patches
Mark IFN_UBSAN_CHECK_ADD/MUL as commutative. Tested on aarch64-linux-gnu and x86_64-linux-gnu. OK to install? Richard gcc/ * internal-fn.c (commutative_binary_fn_p): Handle IFN_UBSAN_CHECK_ADD and IFN_UBSAN_CHECK_MUL. gcc/testsuite/ * gcc.dg/ubsan/commutative-1.c: New

[PATCH 4/4] Mark IFN_ADD/MUL_OVERFLOW as commutative

2021-11-10 Thread Richard Sandiford via Gcc-patches
Mark IFN_ADD/MUL_OVERFLOW as commutative. Tested on aarch64-linux-gnu and x86_64-linux-gnu. OK to install? Richard gcc/ * internal-fn.c (first_commutative_operand): Handle IFN_ADD_OVERFLOW and IFN_MUL_OVERFLOW. gcc/testsuite/ * gcc.dg/add-mul-overflow-1.c: New test. --

[PATCH]Arm Update missing entries of cost tables

2021-11-10 Thread Tamar Christina via Gcc-patches
Hi All, My previous patch missed these tuning structures in arm.c as they are not where the rest of the structure are located. This applies the same default values to silence initialization warnings. Bootstrapped Regtested on arm-none-linux-gnueabihf and no issues. Ok for master? Thanks, Tamar

Re: [PATCH 3/4] Mark IFN_UBSAN_CHECK_ADD/MUL as commutative

2021-11-10 Thread Jakub Jelinek via Gcc-patches
On Wed, Nov 10, 2021 at 12:49:36PM +, Richard Sandiford via Gcc-patches wrote: > * internal-fn.c (commutative_binary_fn_p): Handle IFN_UBSAN_CHECK_ADD > and IFN_UBSAN_CHECK_MUL. > > gcc/testsuite/ > * gcc.dg/ubsan/commutative-1.c: New test. Ok. Jakub

Re: [PATCH 4/4] Mark IFN_ADD/MUL_OVERFLOW as commutative

2021-11-10 Thread Jakub Jelinek via Gcc-patches
On Wed, Nov 10, 2021 at 12:50:09PM +, Richard Sandiford via Gcc-patches wrote: > gcc/ > * internal-fn.c (first_commutative_operand): Handle IFN_ADD_OVERFLOW > and IFN_MUL_OVERFLOW. > > gcc/testsuite/ > * gcc.dg/add-mul-overflow-1.c: New test. Ok. Jakub

[committed][AArch64] Fix bootstrap failure due to missing ATTRIBUTE_UNUSED,andsim01,Wed 10-Nov-21 12:58 PM,View with a light background,Like,Reply,Reply all,Forward

2021-11-10 Thread Andre Vieira (lists) via Gcc-patches
Hi, Committed this as obvious. My earlier patch removed the need for the GSI to be used. gcc/ChangeLog:     * config/aarch64/aarch64-builtins.c     (aarch64_general_gimple_fold_builtin): Mark argument as unused. diff --git a/gcc/config/aarch64/aarch64-builtins.c b/gcc/config/aarch64/

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-11-10 Thread Martin Liška
On 11/10/21 09:59, Richard Biener wrote: On Tue, Nov 9, 2021 at 5:44 PM Martin Liška wrote: On 11/9/21 14:37, Richard Biener wrote: On Mon, Nov 8, 2021 at 8:45 PM Andrew MacLeod wrote: On 11/8/21 10:05 AM, Martin Liška wrote: On 9/28/21 22:39, Andrew MacLeod wrote: In Theory, modifying t

Re: [PATCH]Arm Update missing entries of cost tables

2021-11-10 Thread Christophe Lyon via Gcc-patches
On Wed, Nov 10, 2021 at 1:54 PM Tamar Christina via Gcc-patches < gcc-patches@gcc.gnu.org> wrote: > Hi All, > > My previous patch missed these tuning structures in arm.c as they > are not where the rest of the structure are located. > > This applies the same default values to silence initializatio

Re: [Patch 1/8, Arm, AArch64, GCC] Refactor mbranch-protection option parsing and make it common to AArch32 and AArch64 backends. [Was RE: [Patch 2/7, Arm, GCC] Add option -mbranch-protection.]

2021-11-10 Thread Andrea Corallo via Gcc-patches
Tejas Belagod via Gcc-patches writes: [...] > This change refactors all the mbranch-protection option parsing code and types > to make it common to both AArch32 and AArch64 backends. This change also > pulls > in some supporting types from AArch64 to make it common > (aarch_parse_opt_result).

Re: [PATCH][GCC] arm: enable cortex-a710 CPU

2021-11-10 Thread Przemyslaw Wirkus via Gcc-patches
> > Hi, > > > > This patch is adding support for Cortex-A710 CPU [0]. > > > >   [0] https://www.arm.com/products/silicon-ip-cpu/cortex-a/cortex-a710 > > > > OK for master? > Ok. > Thanks, > Kyrill commit 9701f153f6dfcc365ac0d96cdcf7df69a2de81dc > > > > gcc/ChangeLog: > > > >  * config/arm/a

[PATCH v2] powerpc: Remove LINK_OS_EXTRA_SPEC{32, 64} from --with-advance-toolchain

2021-11-10 Thread Lucas A. M. Magalhaes via Gcc-patches
Historically this was added to fill gaps from ld.so.cache on early AT releases. This now are just causing errors and rework. Since AT5.0 the AT's ld.so is using a correctly configured ld.so.cache and sets the DT_INTERP to AT's ld.so. This two factors are sufficient for an AT builded program to get

Re: [PATCH v2] powerpc: Remove LINK_OS_EXTRA_SPEC{32, 64} from --with-advance-toolchain

2021-11-10 Thread Segher Boessenkool
On Wed, Nov 10, 2021 at 11:21:26AM -0300, Lucas A. M. Magalhaes wrote: > Historically this was added to fill gaps from ld.so.cache on early AT > releases. This now are just causing errors and rework. Since AT5.0 the > AT's ld.so is using a correctly configured ld.so.cache and sets the > DT_INTERP t

Re: [PATCH] powerpc: Remove LINK_OS_EXTRA_SPEC{32, 64} from --with-advance-toolchain

2021-11-10 Thread Segher Boessenkool
On Tue, Nov 09, 2021 at 04:03:55PM -0300, Lucas A. M. Magalhaes wrote: > Quoting Segher Boessenkool (2021-11-09 11:19:58) > > On Tue, Nov 09, 2021 at 10:39:46AM -0300, Lucas A. M. Magalhaes wrote: > > > Ping. > > > > I did not get the original, and neither did the archives? > > > Strange, it's on

Silence additional warning in gfortran.dg/do_subscript_3.f90

2021-11-10 Thread Jan Hubicka via Gcc-patches
Hi, the testcase tests for out of bound accesses warnings and with ipa-modref improvements it now triggers a new warning: /aux/hubicka/trunk-git/gcc/testsuite/gfortran.dg/do_subscript_3.f90:11:9: Warning: (1) /aux/hubicka/trunk-git/gcc/testsuite/gfortran.dg/do_subscript_3.f90:10:47: Warning: Ar

RE: [PATCH] arm: Initialize vector costing fields

2021-11-10 Thread Kyrylo Tkachov via Gcc-patches
Hi Christophe > -Original Message- > From: Gcc-patches bounces+kyrylo.tkachov=arm@gcc.gnu.org> On Behalf Of Christophe > Lyon via Gcc-patches > Sent: Monday, November 8, 2021 6:13 PM > To: gcc-patches@gcc.gnu.org > Subject: [PATCH] arm: Initialize vector costing fields > > The movi,

[COMMITTED] Grow sbr_vector in ranger's on-entry cache as needed.

2021-11-10 Thread Aldy Hernandez via Gcc-patches
From: Andrew MacLeod The on-entry cache does not expect the number of BBs to change. This could happen in various scenarios, recently in the suggestion to use ranger with loop unswitching and also with a work in progress to use the path solver in the loopch pass. This patch fixes both. This is

RE: [PATCH v4 1/1] [ARM] Add support for TLS register based stack protector canary access

2021-11-10 Thread Kyrylo Tkachov via Gcc-patches
Hi Ard, Thanks for working on this, comments inline. > -Original Message- > From: Gcc-patches bounces+kyrylo.tkachov=arm@gcc.gnu.org> On Behalf Of Ard > Biesheuvel via Gcc-patches > Sent: Thursday, October 28, 2021 12:27 PM > To: linux-harden...@vger.kernel.org > Cc: keesc...@chromiu

Re: [PATCH] PR middle-end/103059: reload: Also accept ASHIFT with indexed addressing

2021-11-10 Thread Maciej W. Rozycki
On Mon, 8 Nov 2021, Jeff Law wrote: > > Well, the context of this code (around and including hunk #1) is: > > > >else if (insn_extra_address_constraint > >(lookup_constraint (constraints[i]))) > > { > > address_operand_reloaded[i] > > = find_reloads_address

[COMMITTED] path solver: Adjustments for use outside of the backward threader.

2021-11-10 Thread Aldy Hernandez via Gcc-patches
Here are some enhancements to make it easier for other clients to use the path solver. First, I've made the imports to the solver optional since we can calculate them ourselves. However, I've left the ability to set them, since the backward threader adds a few SSA names in addition to the default

Re: [PATCH] vect: Remove vec_outside/inside_cost fields

2021-11-10 Thread Martin Liška
On 11/8/21 11:43, Richard Sandiford via Gcc-patches wrote: |Tested on aarch64-linux-gnu and x86_64-linux-gnu. OK to install?| I think the patch causes the following on x86_64-linux-gnu: FAIL: gfortran.dg/inline_matmul_17.f90 -O scan-tree-dump-times optimized "matmul_r4" 2 Martin

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

2021-11-10 Thread Patrick Palka via Gcc-patches
Here when partially instantiating the call get(T{}) with T=N::A (for which earlier unqualified name lookup for 'get' found nothing) the arguments after substitution are no longer dependent but the callee still is, so perform_koenig_lookup postpones ADL. But then we go on to diagnose the unresolved

Re: [PATCH v4 1/1] [ARM] Add support for TLS register based stack protector canary access

2021-11-10 Thread Qing Zhao via Gcc-patches
> On Nov 9, 2021, at 4:02 PM, Ard Biesheuvel wrote: > > On Tue, 9 Nov 2021 at 21:45, Qing Zhao wrote: >> >> Hi, Ard, >> >> Sorry for the late reply (since I don’t have the right to approve a patch, I >> has been waiting for any arm port maintainer to review this patch). >> The following is

Re: [PATCH] arm: Initialize vector costing fields

2021-11-10 Thread Christophe Lyon via Gcc-patches
On Wed, Nov 10, 2021 at 4:34 PM Kyrylo Tkachov via Gcc-patches < gcc-patches@gcc.gnu.org> wrote: > Hi Christophe > > > -Original Message- > > From: Gcc-patches > bounces+kyrylo.tkachov=arm@gcc.gnu.org> On Behalf Of Christophe > > Lyon via Gcc-patches > > Sent: Monday, November 8, 2021

Re: [PATCH] c++: use auto_vec in cp_parser_template_argument_list

2021-11-10 Thread Patrick Palka via Gcc-patches
On Wed, Nov 10, 2021 at 12:16 AM Jason Merrill wrote: > > On 11/9/21 13:42, Patrick Palka wrote: > > On Tue, 9 Nov 2021, Jason Merrill wrote: > > > >> On 11/9/21 11:02, Patrick Palka wrote: > >>> Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? > >> > >> OK, though I wonder about u

Re: [PATCH] vect: Remove vec_outside/inside_cost fields

2021-11-10 Thread Richard Sandiford via Gcc-patches
Martin Liška writes: > On 11/8/21 11:43, Richard Sandiford via Gcc-patches wrote: >> |Tested on aarch64-linux-gnu and x86_64-linux-gnu. OK to install?| > > I think the patch causes the following on x86_64-linux-gnu: > FAIL: gfortran.dg/inline_matmul_17.f90 -O scan-tree-dump-times optimized >

[PATCH] gimple-fold: Transform stp*cpy_chk to strcpy

2021-11-10 Thread Siddhesh Poyarekar
Use the ignore flag to transform BUILT_IN_STPCPY_CHK to BUILT_IN_STRCPY when set. This transformation will happen in a subsequent fold anyway but do it right away and save the additional effort. gcc/ChangeLog: * gimple-fold.c (gimple_fold_builtin_stxcpy_chk, gimple_fold_builtin_s

Re: Values of WIDE_INT_MAX_ELTS in gcc11 and gcc12 are different

2021-11-10 Thread Qing Zhao via Gcc-patches
Pushed the patch as: https://gcc.gnu.org/pipermail/gcc-cvs/2021-November/356543.html Qing > On Nov 10, 2021, at 2:37 AM, Richard Biener > wrote: > > On Tue, Nov 9, 2021 at 6:48 PM Qing Zhao wrote: >> >> So, based on the discussion so far, is the following patch good to go? > > OK. > > T

[PATCH] Allow loop header copying when first iteration condition is known.

2021-11-10 Thread Aldy Hernandez via Gcc-patches
As discussed in the PR, the loop header copying pass avoids doing so when optimizing for size. However, sometimes we can determine the loop entry conditional statically for the first iteration of the loop. This patch uses the path solver to determine the outgoing edge out of preheader->header->xx

Re: [PATCH][committed]middle-end: Fix signbit tests when ran on ISA with support for masks.

2021-11-10 Thread Sandra Loosemore
On 11/10/21 4:54 AM, Tamar Christina via Gcc-patches wrote: Hi All, These test don't work on vector ISAs where the truth type don't match the vector mode of the operation. However I still want the tests to run on these architectures but just turn off the ISA modes that enable masks. This thus

Re: [PATCH][committed]middle-end: Fix signbit tests when ran on ISA with support for masks.

2021-11-10 Thread Tamar Christina via Gcc-patches
FAIL: gcc.dg/signbit-2.c scan-tree-dump-times optimized "[file://\\s+]\\s+>\\s+{ 0, 0, 0, 0 }" 1 That's the old test which this patch has changed. Does it still fail with the new patch? From: Sandra Loosemore Sent: Wednesday, November 10, 2021 6:37 PM To: Tamar

  1   2   >