[PATCH] Fix typo in r12-5486.

2021-11-24 Thread liuhongt via Gcc-patches
TYPE_PRECISION (type) < TYPE_PRECISION (TREE_TYPE (@2)) supposed to check integer type but not pointer type, so use second parameter instead. i.e. first parameter is VPTR, second parameter is I4. 582DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_OR_4, 583 "__atomic_fetch_or_4", 584

Re: [PATCH][RFC] middle-end/46476 - resurrect -Wunreachable-code

2021-11-24 Thread Richard Biener via Gcc-patches
On Wed, 24 Nov 2021, Martin Sebor wrote: > On 11/24/21 8:21 AM, Richard Biener via Gcc-patches wrote: > > This resurrects -Wunreachable-code and implements a warning for > > trivially unreachable code as of CFG construction. Most problematic > > with this is the C/C++ frontend added 'return 0;'

[PATCH] bswap: Improve perform_symbolic_merge [PR103376]

2021-11-24 Thread Jakub Jelinek via Gcc-patches
On Wed, Nov 24, 2021 at 09:45:16AM +0100, Richard Biener wrote: > > Thinking more about it, perhaps we could do more for BIT_XOR_EXPR. > > We could allow masked1 == masked2 case for it, but would need to > > do something different than the > > n->n = n1->n | n2->n; > > we do on all the bytes

Re: [PATCH][RFC] middle-end/46476 - resurrect -Wunreachable-code

2021-11-24 Thread Richard Biener via Gcc-patches
On Wed, 24 Nov 2021, Jason Merrill wrote: > On 11/24/21 11:15, Marek Polacek wrote: > > On Wed, Nov 24, 2021 at 04:21:31PM +0100, Richard Biener via Gcc-patches > > wrote: > >> This resurrects -Wunreachable-code and implements a warning for > >> trivially unreachable code as of CFG construction.

Re: [PATCH] pr103194-5.c: Replace long with int64_t

2021-11-24 Thread Hongtao Liu via Gcc-patches
On Thu, Nov 25, 2021 at 12:18 PM H.J. Lu via Gcc-patches wrote: > > Replace long with int64_t to work with -mx32. Thanks. > > * gcc.target/i386/pr103194-5.c: Replace long with int64_t. > --- > gcc/testsuite/gcc.target/i386/pr103194-5.c | 3 ++- > 1 file changed, 2 insertions(+), 1

Re: [PATCH] rs6000/test: Add emulated gather test case

2021-11-24 Thread Kewen.Lin via Gcc-patches
on 2021/11/25 下午1:17, Hongtao Liu wrote: > On Thu, Nov 25, 2021 at 11:21 AM Kewen.Lin via Gcc-patches > wrote: >> >> Hi, >> >> This patch is to add a test case similar to the one in i386 >> to add testing coverage for 510.parest_r hotspots. >> >> As evaluated, the emulated gather capability of

Re: [PATCH] rs6000/test: Add emulated gather test case

2021-11-24 Thread Hongtao Liu via Gcc-patches
On Thu, Nov 25, 2021 at 11:21 AM Kewen.Lin via Gcc-patches wrote: > > Hi, > > This patch is to add a test case similar to the one in i386 > to add testing coverage for 510.parest_r hotspots. > > As evaluated, the emulated gather capability of vectorizer > (r12-2733) can help to speed up SPEC2017

[PATCH] pr103194-5.c: Replace long with int64_t

2021-11-24 Thread H.J. Lu via Gcc-patches
Replace long with int64_t to work with -mx32. * gcc.target/i386/pr103194-5.c: Replace long with int64_t. --- gcc/testsuite/gcc.target/i386/pr103194-5.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.target/i386/pr103194-5.c

[PATCH] rs6000/test: Add emulated gather test case

2021-11-24 Thread Kewen.Lin via Gcc-patches
Hi, This patch is to add a test case similar to the one in i386 to add testing coverage for 510.parest_r hotspots. As evaluated, the emulated gather capability of vectorizer (r12-2733) can help to speed up SPEC2017 510.parest_r on Power8/9/10 by 5% to 9% with option sets Ofast unroll and Ofast

Re: [PATCH] c++: Return early in apply_late_template_attributes if there are no late attribs [PR101180]

2021-11-24 Thread Jason Merrill via Gcc-patches
On 11/24/21 03:16, Jakub Jelinek wrote: On Fri, Nov 19, 2021 at 10:40:50AM -0500, Jason Merrill wrote: Shall we also change the function so that it doesn't call cplus_decl_attributes if late_attrs is NULL [...]? Please. Here it is. Bootstrapped/regtested on x86_64-linux and i686-linux, ok

Re: [PATCH] c++, v2: Implement C++23 P2128R6 - Multidimensional subscript operator [PR102611]

2021-11-24 Thread Jason Merrill via Gcc-patches
On 11/24/21 08:37, Jakub Jelinek wrote: On Tue, Nov 23, 2021 at 10:28:48PM -0500, Jason Merrill wrote: Thanks. + while (true) + { + cp_expr expr (NULL_TREE); + /* Parse the next assignment-expression. */ + if (cp_lexer_next_token_is

Re: [PATCH][RFC] middle-end/46476 - resurrect -Wunreachable-code

2021-11-24 Thread Jason Merrill via Gcc-patches
On 11/24/21 11:15, Marek Polacek wrote: On Wed, Nov 24, 2021 at 04:21:31PM +0100, Richard Biener via Gcc-patches wrote: This resurrects -Wunreachable-code and implements a warning for trivially unreachable code as of CFG construction. Most problematic with this is the C/C++ frontend added

[PATCH] Avoid expecting nonzero size for access none void* arguments [PR101751]

2021-11-24 Thread Martin Sebor via Gcc-patches
When the optional size-index argument to attribute index is omitted for a pointer, GCC expects the actual pointer argument to point to an object at least as big as its size implies, or at least one byte for void*. This is done to make it possible to detect past-the-end accesses in calls to

Re: [PATCH] c++, v2: Fix up diagnostics about taking address of an immediate member function [PR102753]

2021-11-24 Thread Jason Merrill via Gcc-patches
On 11/24/21 17:42, Jakub Jelinek wrote: On Wed, Nov 24, 2021 at 05:15:51PM -0500, Jason Merrill wrote: +case CALL_EXPR: + if (tree fndecl = cp_get_callee_fndecl_nofold (stmt)) + if (DECL_IMMEDIATE_FUNCTION_P (fndecl) + && source_location_current_p (fndecl)) + {

[PATCH v7] rtl: builtins: (not just) rs6000: Add builtins for fegetround, feclearexcept and feraiseexcept [PR94193]

2021-11-24 Thread Raoni Fassina Firmino via Gcc-patches
Changes since v6[6] and v5[5]: - Based this version on the v5 one. - Reworked all builtins back to the way they are in v5 and added the following changes: + Added a test to target libc, only expanding with glibc as the target libc. + Updated all three expanders header comment

Re: aix: adjust installation directories for GCC64

2021-11-24 Thread David Edelsohn via Gcc-patches
On Wed, Sep 15, 2021 at 4:12 AM CHIGOT, CLEMENT wrote: > > As gcc on 64bit for AIX is built with "MULTILIB_MATCHES= .=maix32", > "-print-multi-directory" and similar flags aren't returning the > correct directory when used with -maix32: "." is returned instead > of "ppc32". > Libgcc installation

[PATCH] c++, v2: Fix up diagnostics about taking address of an immediate member function [PR102753]

2021-11-24 Thread Jakub Jelinek via Gcc-patches
On Wed, Nov 24, 2021 at 05:15:51PM -0500, Jason Merrill wrote: > > +case CALL_EXPR: > > + if (tree fndecl = cp_get_callee_fndecl_nofold (stmt)) > > + if (DECL_IMMEDIATE_FUNCTION_P (fndecl) > > + && source_location_current_p (fndecl)) > > + { > > + tree fn = cp_get_callee

Re: [PATCH] c++: Fix up diagnostics about taking address of an immediate member function [PR102753]

2021-11-24 Thread Jason Merrill via Gcc-patches
On 11/24/21 13:02, Jakub Jelinek wrote: On Wed, Nov 24, 2021 at 05:02:03PM +0100, Jakub Jelinek via Gcc-patches wrote: Unfortunately, the location wrappers are optimized away before we get a chance to use them in cp_fold_r. So, on the following patch, we get the location right on PTRMEM_CSTs

Re: [PATCH v6] rtl: builtins: (not just) rs6000: Add builtins for fegetround, feclearexcept and feraiseexcept [PR94193]

2021-11-24 Thread Segher Boessenkool
On Wed, Nov 24, 2021 at 05:22:57PM -0300, Raoni Fassina Firmino wrote: > Hi Joseph, > > Thanks for the detailed review and explanations. >From me as well :-) > On Mon, Oct 18, 2021 at 03:54:53PM +, Joseph Myers wrote: > > However, it's better to get things right automatically without

[PATCH] PR fortran/103411 - ICE in gfc_conv_array_initializer, at fortran/trans-array.c:6377

2021-11-24 Thread Harald Anlauf via Gcc-patches
Dear all, when checking the SOURCE and SHAPE arguments to the RESHAPE intrinsic, for absent PAD argument we failed to handle the case when SHAPE was a parameter. Fortunately, the proper check was already there, and the code just needs some tweaking, as well as one of the testcases. Regtested on

Fix handling of static chain in modref

2021-11-24 Thread Jan Hubicka via Gcc-patches
Hi, this patch fixes wrong code issue where modref did not propagate flags for static chain in ipa_merge_modref_summary_after_inlininig. It is a place I missed to update in original patch extending return slot tracking to static chain. Unlike return slot we need to propagate flags here (return

Re: [PATCH v6] rtl: builtins: (not just) rs6000: Add builtins for fegetround, feclearexcept and feraiseexcept [PR94193]

2021-11-24 Thread Raoni Fassina Firmino via Gcc-patches
Hi Joseph, Thanks for the detailed review and explanations. On Mon, Oct 18, 2021 at 03:54:53PM +, Joseph Myers wrote: > However, it's better to get things right automatically without needing any > macros or other header additions at all. That is, define feclearexcept as > a built-in

[PATCH] PR tree-optimization/103359 - Check for equivalences between PHI argument and def.

2021-11-24 Thread Andrew MacLeod via Gcc-patches
PHI nodes frequently feed each other, and this is particularly true of the one/two incoming edge PHIs inserted by some of the loop analysis code which is introduced at the start of the VRP passes. Ranger has a hybrid of optimistic vs pessimistic evaluation, and when it switches to

Re: Reduce scope of a few 'class loop *loop' variables (was: [PATCH v4] Use range-based for loops for traversing loops)

2021-11-24 Thread Jeff Law via Gcc-patches
On 11/24/2021 7:24 AM, Thomas Schwinge wrote: Hi! On 2021-07-30T15:58:36+0800, "Kewen.Lin" wrote: on 2021/7/30 下午3:18, Thomas Schwinge wrote: Curious why in some instances we're not removing the 'class loop *loop' declaration, I had a look, and this may suggest some further clean-up?

Re: [PATCH][RFC] middle-end/46476 - resurrect -Wunreachable-code

2021-11-24 Thread Eric Gallager via Gcc-patches
On Wed, Nov 24, 2021 at 10:22 AM Richard Biener via Gcc-patches wrote: > > This resurrects -Wunreachable-code and implements a warning for > trivially unreachable code as of CFG construction. Most problematic > with this is the C/C++ frontend added 'return 0;' stmt in main > which the patch

Re: [PATCH][RFC] middle-end/46476 - resurrect -Wunreachable-code

2021-11-24 Thread Martin Sebor via Gcc-patches
On 11/24/21 8:21 AM, Richard Biener via Gcc-patches wrote: This resurrects -Wunreachable-code and implements a warning for trivially unreachable code as of CFG construction. Most problematic with this is the C/C++ frontend added 'return 0;' stmt in main which the patch handles for C++ like the

[PATCH] c++: Fix up diagnostics about taking address of an immediate member function [PR102753]

2021-11-24 Thread Jakub Jelinek via Gcc-patches
On Wed, Nov 24, 2021 at 05:02:03PM +0100, Jakub Jelinek via Gcc-patches wrote: > Unfortunately, the location wrappers are optimized away before we get a > chance to use them in cp_fold_r. > So, on the following patch, we get the location right on PTRMEM_CSTs not > used inside of initializers, but

Re: [PATCH][RFC] middle-end/46476 - resurrect -Wunreachable-code

2021-11-24 Thread Michael Matz via Gcc-patches
Hello, On Wed, 24 Nov 2021, Richard Biener wrote: > >> +/* Unreachable code in if (0) block. */ > >> +void baz(int *p) > >> +{ > >> + if (0) > >> + { > >> +return; /* { dg-bogus "not reachable" } */ > > > >Hmm? Why are you explicitely saying that warning here would be bogus? >

Re: [PATCH] C, C++, Fortran, OpenMP: Add 'has_device_addr' clause to 'target' construct

2021-11-24 Thread Marcel Vollweiler
Hi Jakub, this is again a new version of the 'has_device_addr' patch. It includes further minor changes in the C/C++ part and in addition the Fortran implementation. Tested on x86_64-linux with nvptx offloading with no regressions. Marcel - Siemens Electronic Design Automation

Re: Reduce scope of a few 'class loop *loop' variables (was: [PATCH v4] Use range-based for loops for traversing loops)

2021-11-24 Thread Martin Jambor
Hi, On Wed, Nov 24 2021, Thomas Schwinge wrote: > Hi! > > On 2021-07-30T15:58:36+0800, "Kewen.Lin" wrote: >> on 2021/7/30 下午3:18, Thomas Schwinge wrote: >>> Curious why in some instances we're not removing the 'class loop *loop' >>> declaration, I had a look, and this may suggest some further

Re: [PATCH] AArch64: Improve address rematerialization costs

2021-11-24 Thread Wilco Dijkstra via Gcc-patches
Hi Richard, > Can you fold in the rtx costs part of the original GOT relaxation patch? Sure, see below for the updated version. > I don't think there's enough information here for me to be able to review > the patch though.  I'll need to find testcases, look in detail at what > the rtl passes

Re: [PATCH v2 0/2] RISC-V: add gcc support for Scalar Cryptography v1.0.0-rc6

2021-11-24 Thread Palmer Dabbelt
On Wed, 24 Nov 2021 02:00:33 PST (-0800), Kito Cheng wrote: I would prefer to accept those patchset even with no builtin function or intrinsic function yet, this not only add the support of -march option, but also introduce the predefined macros like __riscv_zk*, which could be used in *.S file

Re: [PATCH] implement -Winfinite-recursion [PR88232]

2021-11-24 Thread Martin Sebor via Gcc-patches
On 11/24/21 3:16 AM, Thomas Schwinge wrote: Hi! On 2021-11-09T21:28:43-0700, Martin Sebor via Gcc-patches wrote: The attached patch adds support to the middle end for detecting infinitely recursive calls. The warning is controlled by the new -Winfinite-recursion option. The option name is

Re: [PATCH][RFC] middle-end/46476 - resurrect -Wunreachable-code

2021-11-24 Thread Marek Polacek via Gcc-patches
On Wed, Nov 24, 2021 at 04:21:31PM +0100, Richard Biener via Gcc-patches wrote: > This resurrects -Wunreachable-code and implements a warning for > trivially unreachable code as of CFG construction. Most problematic > with this is the C/C++ frontend added 'return 0;' stmt in main > which the

Re: [PATCH, v2] c++: Diagnose taking address of an immediate member function [PR102753]

2021-11-24 Thread Jakub Jelinek via Gcc-patches
On Tue, Nov 23, 2021 at 03:45:20PM -0500, Jason Merrill wrote: > > I've played a little bit with this (tried to do it at cp_fold time), but > > there are problems with that. > > cp_fold of course isn't a good spot for this because it can be called from > > fold_for_warn and at that point we don't

Re: [PATCH][RFC] middle-end/46476 - resurrect -Wunreachable-code

2021-11-24 Thread Richard Biener via Gcc-patches
On November 24, 2021 4:43:45 PM GMT+01:00, Michael Matz wrote: >Hello, > >> +/* Unreachable code in if (0) block. */ >> +void baz(int *p) >> +{ >> + if (0) >> + { >> +return; /* { dg-bogus "not reachable" } */ > >Hmm? Why are you explicitely saying that warning here would be

Re: [PATCH][RFC] middle-end/46476 - resurrect -Wunreachable-code

2021-11-24 Thread Michael Matz via Gcc-patches
Hello, > +/* Unreachable code in if (0) block. */ > +void baz(int *p) > +{ > + if (0) > + { > +return; /* { dg-bogus "not reachable" } */ Hmm? Why are you explicitely saying that warning here would be bogus? It quite clearly _is_ unreachable, so warning there makes sense.

[PATCH][RFC] middle-end/46476 - resurrect -Wunreachable-code

2021-11-24 Thread Richard Biener via Gcc-patches
This resurrects -Wunreachable-code and implements a warning for trivially unreachable code as of CFG construction. Most problematic with this is the C/C++ frontend added 'return 0;' stmt in main which the patch handles for C++ like the C frontend already does by using BUILTINS_LOCATION. Another

Re: [PATCH] tree-optimization/103168 - Improve VN of pure function calls

2021-11-24 Thread Jan Hubicka via Gcc-patches
> > Yes, note that we don't have callused unless IPA PTA is enabled, > but it might be salveagable from IPA reference info? What we're > missing is a stmt_clobbers_pt_solution_p, or rather a reasonably > cheap way to construct an ao_ref covering all of a points-to > solution. The not-so-cheap

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

2021-11-24 Thread Martin Liška
On 11/24/21 15:14, Martin Liška wrote: It likely miscompiles gcc.dg/loop-unswitch-5.c, working on that.. Fixed that in the updated version. Martindiff --git a/gcc/dbgcnt.def b/gcc/dbgcnt.def index f8a15f3d1d1..278fb1112b3 100644 --- a/gcc/dbgcnt.def +++ b/gcc/dbgcnt.def @@ -187,6 +187,7 @@

Reduce scope of a few 'class loop *loop' variables (was: [PATCH v4] Use range-based for loops for traversing loops)

2021-11-24 Thread Thomas Schwinge
Hi! On 2021-07-30T15:58:36+0800, "Kewen.Lin" wrote: > on 2021/7/30 下午3:18, Thomas Schwinge wrote: >> Curious why in some instances we're not removing the 'class loop *loop' >> declaration, I had a look, and this may suggest some further clean-up? > > [...] I like your nice proposed further

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

2021-11-24 Thread Martin Liška
On 11/24/21 13:48, Richard Biener wrote: Yup. You did have a branch, right? Maybe I'll poke at it a bit as well. Well, I rebase quite a bit as it's under heavy development now. Do you want me creating a devel/* branch? Anyway, I've got a proof-of-concept patch that does: -

Re: [PATCH 1/2] Split return functionality of get_non_stale_global_range.

2021-11-24 Thread Andrew MacLeod via Gcc-patches
On 11/24/21 04:16, Richard Biener wrote: On Tue, Nov 23, 2021 at 6:03 PM Andrew MacLeod via Gcc-patches wrote: This is the first of 2 patches which will reduce the depth of the call chain in ranger. This patch simply splits the functionality of the routine get_non_stale_global_range() from a

Re: [PATCH 2/2] PR tree-optimization/103231 - Directly resolve range_of_stmt dependencies.

2021-11-24 Thread Andrew MacLeod via Gcc-patches
On 11/24/21 04:17, Richard Biener wrote: On Tue, Nov 23, 2021 at 6:04 PM Andrew MacLeod via Gcc-patches wrote: This is the second patch in the series. Ranger uses its own API to recursively satisfy dependencies. When range_of_stmt is called on _1482 = _1154 + _1177; it picks up the ranges of

[COMMITTED] Range-on-edge trace tweak.

2021-11-24 Thread Andrew MacLeod via Gcc-patches
When working with the trace output, I noticed the columns were getting out of sync. When range_on_edge is called with a constant value, it use to not output a trace for that. When I added the unexecutable edge code, It possible to request a constant on an unexecutable edge  that now returns

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

2021-11-24 Thread Maciej W. Rozycki
On Wed, 24 Nov 2021, Richard Biener wrote: > > > All my concerns have been addressed.  This is fine for the trunk. Thanks > > > for > > > your patience & explanations. > > > > Thank you for your review, I have committed this change to trunk now. > > > > Richard, OK for GCC 11 (correcting a

[PATCH] c++, v2: Implement C++23 P2128R6 - Multidimensional subscript operator [PR102611]

2021-11-24 Thread Jakub Jelinek via Gcc-patches
On Tue, Nov 23, 2021 at 10:28:48PM -0500, Jason Merrill wrote: Thanks. > > + while (true) > > + { > > + cp_expr expr (NULL_TREE); > > + /* Parse the next assignment-expression. */ > > + if (cp_lexer_next_token_is (parser->lexer, CPP_OPEN_BRACE)) > > +

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

2021-11-24 Thread Richard Biener via Gcc-patches
On Wed, 24 Nov 2021, Maciej W. Rozycki wrote: > On Tue, 23 Nov 2021, Jeff Law wrote: > > > > Let me know if it clears your concerns and whether there's anything else > > > you want me to retrieve from that GDB session. > > Thanks for the clarifications.  I never would have guessed that we

[PATCH] libstdc++: Remove broken std::allocator base classes [PR103340]

2021-11-24 Thread Jonathan Wakely via Gcc-patches
I plan to commit this Real Soon. Please yell if you need these alternative std::allocator back-ends to stay (and explain how you're using them when they've been broken for years, and start sending test results to the gcc-testresults mailing list, and ideally offer to maintain them). Tested

[committed] libstdc++: Add xfail to some printer tests for debug mode

2021-11-24 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. The type printers are not substituting std::string for std::basic_string in debug mode, mark some tests as xfail. libstdc++-v3/ChangeLog: * testsuite/libstdc++-prettyprinters/80276.cc: Add xfail for debug mode. *

[committed] libstdc++: Replace hyphens in effective target keywords

2021-11-24 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. An effective target like foo-bar-baz will match a target selector of *-*-* and cause problems in the testsuite. Several libstdc++ et keywords are of the form foo-bar, which could still be a problem for *-* selectors. Replace hyphens with underscores in

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

2021-11-24 Thread Maciej W. Rozycki
On Tue, 23 Nov 2021, Jeff Law wrote: > > Let me know if it clears your concerns and whether there's anything else > > you want me to retrieve from that GDB session. > Thanks for the clarifications.  I never would have guessed that we could get > into that code in the way you've described, but

[PATCH] ipa: Teach IPA-CP transformation about IPA-SRA modifications (PR 103227)

2021-11-24 Thread Martin Jambor
Hi, PR 103227 exposed an issue with ordering of transformations of IPA passes. IPA-CP can create clones for constants passed by reference and at the same time IPA-SRA can also decide that the parameter does not need to be a pointer (or an aggregate) and plan to convert it into (a) simple

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

2021-11-24 Thread Richard Biener via Gcc-patches
On Wed, Nov 24, 2021 at 11:48 AM Martin Liška wrote: > > On 11/24/21 09:00, Richard Biener wrote: > > On Tue, Nov 23, 2021 at 5:36 PM Martin Liška wrote: > >> > >> On 11/23/21 16:20, Martin Liška wrote: > >>> Sure, so for e.g. case 1 ... 5 we would need to create a new > >>> unswitch_predicate

Re: [PATCH] tree-optimization/103168 - Improve VN of pure function calls

2021-11-24 Thread Richard Biener via Gcc-patches
On Wed, 24 Nov 2021, Jan Hubicka wrote: > > This improves value-numbering of calls that read memory, calls > > to const functions with aggregate arguments and calls to > > pure functions where the latter include const functions we > > demoted to pure for the fear of interposing with a less > >

Re: [PATCH 1/2][GCC] arm: Move arm_simd_info array declaration into header

2021-11-24 Thread Richard Earnshaw via Gcc-patches
On 24/11/2021 12:15, Murray Steele wrote: On 18/11/2021 15:40, Richard Earnshaw wrote: On 16/11/2021 10:14, Murray Steele via Gcc-patches wrote: Hi all, This patch moves the arm_simd_type and arm_type_qualifiers enums, and arm_simd_info struct from arm-builtins.c into arm-builtins.h

Re: [PATCH 1/2][GCC] arm: Move arm_simd_info array declaration into header

2021-11-24 Thread Murray Steele via Gcc-patches
On 18/11/2021 15:40, Richard Earnshaw wrote: > > > On 16/11/2021 10:14, Murray Steele via Gcc-patches wrote: >> Hi all, >> >> This patch moves the arm_simd_type and arm_type_qualifiers enums, and >> arm_simd_info struct from arm-builtins.c into arm-builtins.h header. >> >> This is a first step

Re: [PATCH] tree-optimization/103168 - Improve VN of pure function calls

2021-11-24 Thread Jan Hubicka via Gcc-patches
> This improves value-numbering of calls that read memory, calls > to const functions with aggregate arguments and calls to > pure functions where the latter include const functions we > demoted to pure for the fear of interposing with a less > optimized version. Note that for pure functions we

[PATCH] tree-optimization/103168 - Improve VN of pure function calls

2021-11-24 Thread Richard Biener via Gcc-patches
This improves value-numbering of calls that read memory, calls to const functions with aggregate arguments and calls to pure functions where the latter include const functions we demoted to pure for the fear of interposing with a less optimized version. Note that for pure functions we do not

Re: [PATCH, v2, OpenMP 5.0] Implement relaxation of implicit map vs. existing device mappings (for mainline trunk)

2021-11-24 Thread Thomas Schwinge
Hi! On 2021-11-06T00:51:59+0800, Chung-Lin Tang wrote: > On 2021/6/24 11:55 PM, Jakub Jelinek wrote: >> On Fri, May 14, 2021 at 09:20:25PM +0800, Chung-Lin Tang wrote: >>> diff --git a/gcc/gimplify.c b/gcc/gimplify.c >>> index e790f08b23f..69c4a8e0a0a 100644 >>> --- a/gcc/gimplify.c >>> +++

Re: [PATCH 1v2/3][vect] Add main vectorized loop unrolling

2021-11-24 Thread Richard Biener via Gcc-patches
On Wed, 24 Nov 2021, Andre Vieira (lists) wrote: > > On 22/11/2021 12:39, Richard Biener wrote: > > + if (first_loop_vinfo->suggested_unroll_factor > 1) > > +{ > > + if (LOOP_VINFO_EPIL_USING_PARTIAL_VECTORS_P (first_loop_vinfo)) > > + { > > + if (dump_enabled_p ()) > > +

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

2021-11-24 Thread Martin Liška
On 11/24/21 09:00, Richard Biener wrote: On Tue, Nov 23, 2021 at 5:36 PM Martin Liška wrote: On 11/23/21 16:20, Martin Liška wrote: Sure, so for e.g. case 1 ... 5 we would need to create a new unswitch_predicate with 1 <= index && index <= 5 tree predicate (and the corresponding irange

Re: [PATCH][pushed] jit: Initialize function::m_blocks in ctor

2021-11-24 Thread Andrea Corallo via Gcc-patches
Martin Liška writes: [...] >> Question: that piece of code is there since 2014, should we >> back-port >> the fix as well? > > I've just pushed to to all active code streams (master, > releases/gcc-{9,10,11}). Wonderful, thanks again. Andrea

Re: [PATCH][pushed] jit: Initialize function::m_blocks in ctor

2021-11-24 Thread Martin Liška
On 11/24/21 11:06, Andrea Corallo wrote: Martin Liška writes: This resolves the problem reported here: https://mail.gnu.org/archive/html/bug-gnu-emacs/2021-11/msg00606.html https://bugzilla.opensuse.org/show_bug.cgi?id=1192951 I'm going to push it as obvious. Martin Hi Martin, thanks for

'gengtype' (was: Get rid of infinite recursion for 'typedef' used with GTY-marked 'gcc/diagnostic-spec.h:nowarn_map' [PR101204])

2021-11-24 Thread Thomas Schwinge
Hi! On 2021-11-09T21:52:50-0700, Martin Sebor wrote: > Amazing how riddled with bugs this > gengtype stuff is. Relevant Mike Stump quote from long ago, that I ran into while researching 'gengtype' vs. 'typedef', : | Think of it this way,

Re: [PATCH] implement -Winfinite-recursion [PR88232]

2021-11-24 Thread Thomas Schwinge
Hi! On 2021-11-09T21:28:43-0700, Martin Sebor via Gcc-patches wrote: > The attached patch adds support to the middle end for detecting > infinitely recursive calls. The warning is controlled by the new > -Winfinite-recursion option. The option name is the same as > Clang's. Thanks! > The

Re: [PATCH] [1/2] arm: Implement cortex-M return signing address codegen

2021-11-24 Thread Andrea Corallo via Gcc-patches
Andrea Corallo via Gcc-patches writes: > Hi all, > > this patch enables address return signature and verification based on > Armv8.1-M Pointer Authentication [1]. > > To sign the return address, we use the PAC R12, LR, SP instruction > upon function entry. This is signing LR using SP and

Re: [PATCH][pushed] jit: Initialize function::m_blocks in ctor

2021-11-24 Thread Andrea Corallo via Gcc-patches
Martin Liška writes: > This resolves the problem reported here: > https://mail.gnu.org/archive/html/bug-gnu-emacs/2021-11/msg00606.html > https://bugzilla.opensuse.org/show_bug.cgi?id=1192951 > > I'm going to push it as obvious. > > Martin Hi Martin, thanks for the fix! Question: that piece

Re: [PATCH v2 0/2] RISC-V: add gcc support for Scalar Cryptography v1.0.0-rc6

2021-11-24 Thread Kito Cheng via Gcc-patches
I would prefer to accept those patchset even with no builtin function or intrinsic function yet, this not only add the support of -march option, but also introduce the predefined macros like __riscv_zk*, which could be used in *.S file to check if those instructions are available or not. On Wed,

Re: [PATCH 1v2/3][vect] Add main vectorized loop unrolling

2021-11-24 Thread Andre Vieira (lists) via Gcc-patches
On 22/11/2021 12:39, Richard Biener wrote: + if (first_loop_vinfo->suggested_unroll_factor > 1) +{ + if (LOOP_VINFO_EPIL_USING_PARTIAL_VECTORS_P (first_loop_vinfo)) + { + if (dump_enabled_p ()) + dump_printf_loc (MSG_NOTE, vect_location, +

[committed] openmp: Fix up handling of kind(host) and kind(nohost) in ACCEL_COMPILERs [PR103384]

2021-11-24 Thread Jakub Jelinek via Gcc-patches
Hi! As the testcase shows, we weren't handling kind(host) and kind(nohost) properly in the ACCEL_COMPILERs, the code written in there is valid for the host compiler only, where if we are maybe offloaded, we defer resolution after IPA, otherwise return 0 for kind(nohost) and accept it for

[PATCH][pushed] jit: Initialize function::m_blocks in ctor

2021-11-24 Thread Martin Liška
This resolves the problem reported here: https://mail.gnu.org/archive/html/bug-gnu-emacs/2021-11/msg00606.html https://bugzilla.opensuse.org/show_bug.cgi?id=1192951 I'm going to push it as obvious. Martin gcc/jit/ChangeLog: * jit-playback.c (function): Initialize m_blocks vector. ---

Re: [PATCH 2/2] PR tree-optimization/103231 - Directly resolve range_of_stmt dependencies.

2021-11-24 Thread Richard Biener via Gcc-patches
On Tue, Nov 23, 2021 at 6:04 PM Andrew MacLeod via Gcc-patches wrote: > > This is the second patch in the series. > > Ranger uses its own API to recursively satisfy dependencies. When > range_of_stmt is called on _1482 = _1154 + _1177; it picks up the > ranges of _1154 and _1177 from it's cache.

Re: [PATCH 1/2] Split return functionality of get_non_stale_global_range.

2021-11-24 Thread Richard Biener via Gcc-patches
On Tue, Nov 23, 2021 at 6:03 PM Andrew MacLeod via Gcc-patches wrote: > > This is the first of 2 patches which will reduce the depth of the call > chain in ranger. > > This patch simply splits the functionality of the routine > get_non_stale_global_range() from a single boolean return to a

Re: [PATCH] attribs: Fix ICEs on attributes starting with _ [PR103365]

2021-11-24 Thread Jakub Jelinek via Gcc-patches
On Wed, Nov 24, 2021 at 12:53:02AM -0800, Andrew Pinski wrote: > Only one comment on the new testcases, you might want to add a > testcase for the option on the command line too. You're right, I've committed the patch with the following incremental diff in it: ---

RE: [PATCH] i386: vcvtph2ps and vcvtps2ph should be used to convert _Float16 to SFmode with -mf16c [PR 102811]

2021-11-24 Thread Kong, Lingling via Gcc-patches
OK, This is the patch I prepare to check in. -Original Message- From: Uros Bizjak Sent: Wednesday, November 24, 2021 4:49 PM To: Kong, Lingling Cc: Liu, Hongtao ; gcc-patches@gcc.gnu.org Subject: Re: [PATCH] i386: vcvtph2ps and vcvtps2ph should be used to convert _Float16 to SFmode

Re: [PATCH] middle-end/103193 - avoid canonicalizing <= and >= to == for floats

2021-11-24 Thread Jakub Jelinek via Gcc-patches
On Wed, Nov 24, 2021 at 10:00:56AM +0100, Richard Biener via Gcc-patches wrote: > On Mon, Nov 15, 2021 at 12:16 PM Richard Biener via Gcc-patches > wrote: > > > > This avoids doing aforementioned canoncalization when -ftrapping-math > > is in effect and we honor NaNs. > > > > Bootstrapped and

Re: [PATCH] attribs: Fix ICEs on attributes starting with _ [PR103365]

2021-11-24 Thread Richard Biener via Gcc-patches
On Wed, 24 Nov 2021, Jakub Jelinek wrote: > Hi! > > As the patch shows, we have quite a few asserts that we don't call > lookup_attribute etc. with attr_name that starts with an underscore, > to make sure nobody is trying to call it with non-canonicalized > attribute name like "__cold__" instead

Re: [PATCH] middle-end/103193 - avoid canonicalizing <= and >= to == for floats

2021-11-24 Thread Richard Biener via Gcc-patches
On Mon, Nov 15, 2021 at 12:16 PM Richard Biener via Gcc-patches wrote: > > This avoids doing aforementioned canoncalization when -ftrapping-math > is in effect and we honor NaNs. > > Bootstrapped and tested on x86_64-unknown-linux-gnu. > > OK? Ping. > > Thanks, > Richard. > > 2021-11-15

Re: [PATCH] attribs: Fix ICEs on attributes starting with _ [PR103365]

2021-11-24 Thread Andrew Pinski via Gcc-patches
On Wed, Nov 24, 2021 at 12:48 AM Jakub Jelinek via Gcc-patches wrote: > > Hi! > > As the patch shows, we have quite a few asserts that we don't call > lookup_attribute etc. with attr_name that starts with an underscore, > to make sure nobody is trying to call it with non-canonicalized > attribute

Re: [PATCH] i386: vcvtph2ps and vcvtps2ph should be used to convert _Float16 to SFmode with -mf16c [PR 102811]

2021-11-24 Thread Uros Bizjak via Gcc-patches
On Wed, Nov 24, 2021 at 9:44 AM Kong, Lingling wrote: > > Hi, > > vcvtph2ps and vcvtps2ph should be used to convert _Float16 to SFmode with > -mf16c. So added define_insn extendhfsf2 and truncsfhf2 for target_f16c. > Cleared before conversion, updated movhi_internal and >

[PATCH] attribs: Fix ICEs on attributes starting with _ [PR103365]

2021-11-24 Thread Jakub Jelinek via Gcc-patches
Hi! As the patch shows, we have quite a few asserts that we don't call lookup_attribute etc. with attr_name that starts with an underscore, to make sure nobody is trying to call it with non-canonicalized attribute name like "__cold__" instead of "cold". We canonicalize only attributes that start

Re: [PATCH] bswap: Fix up symbolic merging for xor and plus [PR103376]

2021-11-24 Thread Richard Biener via Gcc-patches
On Wed, 24 Nov 2021, Jakub Jelinek wrote: > On Mon, Nov 22, 2021 at 08:39:42AM -, Roger Sayle wrote: > > This patch implements PR tree-optimization/103345 to merge adjacent > > loads when combined with addition or bitwise xor. The current code > > in gimple-ssa-store-merging.c's

[PATCH] i386: vcvtph2ps and vcvtps2ph should be used to convert _Float16 to SFmode with -mf16c [PR 102811]

2021-11-24 Thread Kong, Lingling via Gcc-patches
Hi, vcvtph2ps and vcvtps2ph should be used to convert _Float16 to SFmode with -mf16c. So added define_insn extendhfsf2 and truncsfhf2 for target_f16c. Cleared before conversion, updated movhi_internal and ix86_can_change_mode_class. And fixed some commit message. OK for master?

Re: Update GMP/MPFR/MPC/ISL version in contrib/download_prerequisites (and gcc/infrastructure)

2021-11-24 Thread Richard Biener via Gcc-patches
On Wed, 24 Nov 2021, Tobias Burnus wrote: > Note: This change has has no effect on > https://gcc.gnu.org/install/prerequisites.html, > i.e. the minimal versions remain: GMP 4.3.2, MPFR 3.1.0, MPC 1.0.1, ISL 0.15. > However, > not all features might work with the minimal version and in the future,

Re: [PATCH] i386: vcvtph2ps and vcvtps2ph should be used to convert _Float16 to SFmode with -mf16c [PR 102811]

2021-11-24 Thread Uros Bizjak via Gcc-patches
On Wed, Nov 24, 2021 at 9:06 AM Kong, Lingling wrote: > > Hi Uros, > > > BTW: When playing with my patch, I introduced (define_insn > > "*vec_set_0" ...) to optimize scalar load to a vector. Does > > ix86_expand_vector_set work OK without this pattern? > > Yes, ix86_expand_vector_set could

[PATCH] bswap: Fix up symbolic merging for xor and plus [PR103376]

2021-11-24 Thread Jakub Jelinek via Gcc-patches
On Mon, Nov 22, 2021 at 08:39:42AM -, Roger Sayle wrote: > This patch implements PR tree-optimization/103345 to merge adjacent > loads when combined with addition or bitwise xor. The current code > in gimple-ssa-store-merging.c's find_bswap_or_nop alreay handles ior, > so that all that's

[PATCH] c++: Return early in apply_late_template_attributes if there are no late attribs [PR101180]

2021-11-24 Thread Jakub Jelinek via Gcc-patches
On Fri, Nov 19, 2021 at 10:40:50AM -0500, Jason Merrill wrote: > > Shall we also change the function so that it doesn't call > > cplus_decl_attributes if late_attrs is NULL [...]? > > Please. Here it is. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2021-11-24 Jakub

RE: [PATCH] i386: vcvtph2ps and vcvtps2ph should be used to convert _Float16 to SFmode with -mf16c [PR 102811]

2021-11-24 Thread Kong, Lingling via Gcc-patches
Hi Uros, > BTW: When playing with my patch, I introduced (define_insn "*vec_set_0" > ...) to optimize scalar load to a vector. Does ix86_expand_vector_set work OK > without this pattern? Yes, ix86_expand_vector_set could work ok with (define_insn "_pinsr"), this insn can optimize scalar load

Update GMP/MPFR/MPC/ISL version in contrib/download_prerequisites (and gcc/infrastructure)

2021-11-24 Thread Tobias Burnus
Note: This change has has no effect on https://gcc.gnu.org/install/prerequisites.html, i.e. the minimal versions remain: GMP 4.3.2, MPFR 3.1.0, MPC 1.0.1, ISL 0.15. However, not all features might work with the minimal version and in the future, the minimal version might change. (There is a

[PATCH] Avoid redundant get_loop_body calls in IVOPTs

2021-11-24 Thread Richard Biener via Gcc-patches
This removes redundant get_loop_body calls in IVOPTs by passing around the body we're gathering early. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2021-11-23 Richard Biener * tree-ssa-loop-ivopts.c (find_givs): Take loop body as argument instead of

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

2021-11-24 Thread Richard Biener via Gcc-patches
On Tue, Nov 23, 2021 at 5:36 PM Martin Liška wrote: > > On 11/23/21 16:20, Martin Liška wrote: > > Sure, so for e.g. case 1 ... 5 we would need to create a new > > unswitch_predicate > > with 1 <= index && index <= 5 tree predicate (and the corresponding irange > > range). > > Later once we