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

2021-10-20 Thread HAO CHEN GUI via Gcc-patches
On 21/10/2021 上午 12:19, Segher Boessenkool wrote: > Hi! > > On Wed, Oct 20, 2021 at 05:04:56PM +0800, HAO CHEN GUI wrote: >> This patch disables gimple folding for float or double vec_min/max when  >> fast-math is not set. It makes vec_min/max conform with the guide. >> >> Bootstrapped and tested

Re: [Patch][GCC][middle-end] - Lower store and load neon builtins to gimple

2021-10-20 Thread Christophe LYON via Gcc-patches
On 20/10/2021 12:16, Richard Biener via Gcc-patches wrote: On Wed, 20 Oct 2021, Andre Vieira (lists) wrote: On 27/09/2021 12:54, Richard Biener via Gcc-patches wrote: On Mon, 27 Sep 2021, Jirui Wu wrote: Hi all, I now use the type based on the specification of the intrinsic instead of typ

Re: [PATCH] i386: Fix wrong codegen for V8HF move without TARGET_AVX512F

2021-10-20 Thread Hongyu Wang via Gcc-patches
Yes, updated patch. gcc/ChangeLog: PR target/102812 * config/i386/i386.c (ix86_get_ssemov): Adjust HFmode vector move to use the same logic as HImode. gcc/testsuite/ChangeLog: PR target/102812 * gcc.target/i386/pr102812.c: New test. --- gcc/config/i386/i386.c | 15 -

[PATCH] Improve maybe_remove_writeonly_store to do a simple DCE for defining statement

2021-10-20 Thread apinski--- via Gcc-patches
From: Andrew Pinski Instead of putting a full blow DCE after execute_fixup_cfg, it makes sense to try to remove the defining statement for the store that is being removed. Using simple_dce_from_worklist makes this easier, just mark the ssa_name on the rhs side of the store (if it was one) in a bi

Re: [PATCH] i386: Fix wrong codegen for V8HF move without TARGET_AVX512F

2021-10-20 Thread Hongtao Liu via Gcc-patches
On Wed, Oct 20, 2021 at 1:31 PM Hongyu Wang via Gcc-patches wrote: > > Since _Float16 type is enabled under sse2 target, returning > V8HFmode vector without AVX512F target would generate wrong > vmovdqa64 instruction. Adjust ix86_get_ssemov to avoid this. > > Bootstraped/regtested on x86_64-pc-lin

Re: [PATCH] Fortran: Fixes and additional tests for shape/ubound/size [PR94070]

2021-10-20 Thread Sandra Loosemore
On 10/20/21 3:41 PM, Tobias Burnus wrote: Hi Sandra, On 20.10.21 22:03, Sandra Loosemore wrote: The one that was most concerning was an ICE when calling the SHAPE intrinsic with an assumed-rank class type argument ... In this case, SHAPE was calling a library function and trying to copy the ar

Re: [PATCH] Adjust testcase for O2 vectorization.

2021-10-20 Thread Hongtao Liu via Gcc-patches
On Thu, Oct 21, 2021 at 10:06 AM Hongtao Liu wrote: > > On Thu, Oct 21, 2021 at 9:20 AM Hongtao Liu wrote: > > > > On Wed, Oct 20, 2021 at 7:34 PM Christophe Lyon via Gcc-patches > > wrote: > > > > > > Hi, > > > > > > > > > On Tue, Oct 19, 2021 at 11:03 AM liuhongt via Gcc-patches < > > > gcc-pa

Re: [PATCH] Adjust testcase for O2 vectorization.

2021-10-20 Thread Hongtao Liu via Gcc-patches
On Thu, Oct 21, 2021 at 9:20 AM Hongtao Liu wrote: > > On Wed, Oct 20, 2021 at 7:34 PM Christophe Lyon via Gcc-patches > wrote: > > > > Hi, > > > > > > On Tue, Oct 19, 2021 at 11:03 AM liuhongt via Gcc-patches < > > gcc-patches@gcc.gnu.org> wrote: > > > > > updated patch: > > > 1. Add documents

[PATCH] rs6000: Add Power10 optimization for _mm_blendv*

2021-10-20 Thread Paul A. Clarke via Gcc-patches
Power10 ISA added `xxblendv*` instructions which are realized in the `vec_blendv` instrinsic. Use `vec_blendv` for `_mm_blendv_epi8`, `_mm_blendv_ps`, and `_mm_blendv_pd` compatibility intrinsics, when `_ARCH_PWR10`. Also, copy a test from i386 for testing `_mm_blendv_ps`. This should have come w

[r12-4531 Regression] FAIL: gcc.target/i386/pr57106.c (test for excess errors) on Linux/x86_64

2021-10-20 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, 972ee845f54839e9bd2e4611bb268d75440f3845 is the first bad commit commit 972ee845f54839e9bd2e4611bb268d75440f3845 Author: Eric Botcazou Date: Wed Oct 20 10:42:56 2021 +0200 Fix PR middle-end/102764 caused FAIL: gcc.dg/asan/pr78832.c -O1 (test for excess errors) FAIL: g

[r12-4523 Regression] FAIL: gcc.dg/Wstringop-overflow-14.c (test for excess errors) on Linux/x86_64

2021-10-20 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, 3c8d8c0be95e99dc0cba7f6fad2429243582119f is the first bad commit commit 3c8d8c0be95e99dc0cba7f6fad2429243582119f Author: liuhongt Date: Thu Oct 14 09:31:03 2021 +0800 Adjust testcase for O2 vectorization. caused FAIL: gcc.dg/Warray-bounds-51.c (test for excess errors) FA

[r12-4559 Regression] FAIL: gcc.dg/vect/bb-slp-57.c scan-tree-dump-times slp1 "transform load" 1 on Linux/x86_64

2021-10-20 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, 914045dff10fbd27de27b90a0ac78a0058b2c86e is the first bad commit commit 914045dff10fbd27de27b90a0ac78a0058b2c86e Author: Andre Simoes Dias Vieira Date: Wed Oct 20 13:12:09 2021 +0100 [Patch][GCC][middle-end] - Generate FRINTZ for (double)(int) under -ffast-math on aarch64

Re: [PATCH] Adjust testcase for O2 vectorization.

2021-10-20 Thread Hongtao Liu via Gcc-patches
On Wed, Oct 20, 2021 at 7:34 PM Christophe Lyon via Gcc-patches wrote: > > Hi, > > > On Tue, Oct 19, 2021 at 11:03 AM liuhongt via Gcc-patches < > gcc-patches@gcc.gnu.org> wrote: > > > updated patch: > > 1. Add documents in doc/sourcebuild.texi (Effective-Target Keywords). > > 2. Reduce -novec

Re: [committed] libstdc++: Remove constraints from std::optional monadic ops [PR102863]

2021-10-20 Thread Jonathan Wakely via Gcc-patches
On 21/10/21 01:23 +0100, Jonathan Wakely wrote: The constraints on transform and and_then can cause errors when checking satisfaction. The constraints that were present in R6 of the paper were moved for he final F8 revision, and so should have been included in the Bah, I meant "removed for the

[committed] libstdc++: Remove constraints from std::optional monadic ops [PR102863]

2021-10-20 Thread Jonathan Wakely via Gcc-patches
The constraints on transform and and_then can cause errors when checking satisfaction. The constraints that were present in R6 of the paper were moved for he final F8 revision, and so should have been included in the implementation. libstdc++-v3/ChangeLog: PR libstdc++/102863 * in

Re: [PATCH] doc: Fix documentation around 'asm' keyword in C++

2021-10-20 Thread Jason Merrill via Gcc-patches
On 10/20/21 08:28, Jonathan Wakely wrote: The documentation on asm statements suggests asm is always a GNU extension, but it's been part of ISO C++ since the first standard. The documentation of -fno-asm is wrong for C++ as it states that it only affects typeof, but actually it affects typeof an

Re: [PATCH] c++: Reject addresses of immediate functions in constexpr vars inside of immediate functions or consteval if [PR102753]

2021-10-20 Thread Jason Merrill via Gcc-patches
On 10/19/21 09:24, Jakub Jelinek wrote: On Tue, Oct 19, 2021 at 02:00:21PM +0200, Jakub Jelinek via Gcc-patches wrote: And another thing isn't in a patch, but I'm wondering whether we don't handle it incorrectly. constexpr.c has: /* Check that immediate invocation does not return an expressi

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

2021-10-20 Thread Jason Merrill via Gcc-patches
On 10/19/21 08:00, Jakub Jelinek wrote: On Mon, Oct 18, 2021 at 12:42:00PM -0400, Jason Merrill wrote: --- gcc/cp/typeck.c.jj 2021-10-05 09:53:55.382734051 +0200 +++ gcc/cp/typeck.c 2021-10-15 19:28:38.034213437 +0200 @@ -6773,9 +6773,21 @@ cp_build_addr_expr_1 (tree arg, bool str

Re: [PATCH] Fortran: Fixes and additional tests for shape/ubound/size [PR94070]

2021-10-20 Thread Tobias Burnus
Hi Sandra, On 20.10.21 22:03, Sandra Loosemore wrote: The one that was most concerning was an ICE when calling the SHAPE intrinsic with an assumed-rank class type argument ... In this case, SHAPE was calling a library function and trying to copy the array contents to a temporary, which is really

[PATCH] c++: tweak parsing of invalid types

2021-10-20 Thread Jason Merrill via Gcc-patches
cp_parser_parse_and_diagnose_invalid_type_name is called during declaration parsing, so it should pass 'true' for the declarator_p argument. But that caused a diagnostic regression on template/pr84789.C due to undesired lookup in dependent scopes. To fix that, cp_parser_nested_name_specifier_opt

Re: [PATCH v4] Fix ICE when mixing VLAs and statement expressions [PR91038]

2021-10-20 Thread Jason Merrill via Gcc-patches
On 10/20/21 01:58, Uecker, Martin wrote: Am Montag, den 18.10.2021, 12:35 -0400 schrieb Jason Merrill: On 10/17/21 09:52, Uecker, Martin wrote: Here is the 4th version of the patch. I tried to implement Jason's suggestion and this also fixes the problem. But I am not sure I understand the cond

Re: [PATCH] Convert strlen pass from evrp to ranger.

2021-10-20 Thread Jeff Law via Gcc-patches
On 10/18/2021 2:17 AM, Aldy Hernandez wrote: On 10/18/21 12:52 AM, Jeff Law wrote: On 10/8/2021 9:12 AM, Aldy Hernandez via Gcc-patches wrote: The following patch converts the strlen pass from evrp to ranger, leaving DOM as the last remaining user. So is there any reason why we can't con

Re: [PATCH] Try to resolve paths in threader without looking further back.

2021-10-20 Thread Jeff Law via Gcc-patches
On 10/20/2021 4:28 AM, Aldy Hernandez wrote: Sometimes we can solve a candidate path without having to recurse further back. This can mostly happen in fully resolving mode, because we can ask the ranger what the range on entry to the path is, but there's no reason this can't always apply. Th

[PATCH] Fortran: Fixes and additional tests for shape/ubound/size [PR94070]

2021-10-20 Thread Sandra Loosemore
This patch started out as some additional testcases for the SHAPE, UBOUND, and SIZE intrinsic extensions for assumed-rank arrays added by TS29113; I realized a while ago that I had not added test coverage for polymorphic arguments. My guess that this was a likely trouble spot was correct as th

Re: [PATCH] Try to resolve paths in threader without looking further back.

2021-10-20 Thread Jeff Law via Gcc-patches
On 10/20/2021 9:15 AM, Aldy Hernandez wrote: On Wed, Oct 20, 2021 at 4:35 PM Martin Sebor wrote: I appreciate the heads up. I'm happy that the threader has improved. I'm obviously not pleased that it has led to regressions in warnings but I understand that in some cases they might be due

Re: [PATCH 4/4] Improve maybe_remove_writeonly_store to do a simple DCE for defining statement

2021-10-20 Thread Andrew Pinski via Gcc-patches
On Wed, Oct 20, 2021 at 12:54 PM Jeff Law via Gcc-patches wrote: > > > > On 10/20/2021 12:58 AM, Richard Biener wrote: > > On Wed, Oct 20, 2021 at 1:14 AM Jeff Law via Gcc-patches > > wrote: > >> > >> > >> On 10/18/2021 10:54 PM, apinski--- via Gcc-patches wrote: > >>> From: Andrew Pinski > >>>

Re: [PATCH 4/4] Improve maybe_remove_writeonly_store to do a simple DCE for defining statement

2021-10-20 Thread Jeff Law via Gcc-patches
On 10/20/2021 12:58 AM, Richard Biener wrote: On Wed, Oct 20, 2021 at 1:14 AM Jeff Law via Gcc-patches wrote: On 10/18/2021 10:54 PM, apinski--- via Gcc-patches wrote: From: Andrew Pinski Instead of putting a full blow DCE after execute_fixup_cfg, it makes sense to try to remove the def

Re: [PATCH] calls.c: Remove some dead code and target hooks

2021-10-20 Thread Jeff Law via Gcc-patches
On 10/20/2021 8:18 AM, Alex Coplan via Gcc-patches wrote: Hi all, Looking at calls.c:initialize_argument_information, I spotted some dead code that seems to have been left behind from when MPX support was removed. This patch removes that code as well as the associated target hooks (which app

[Ada] Remove unnecessary call to No_Uint_To_0

2021-10-20 Thread Pierre-Marie de Rodat via Gcc-patches
This call to No_Uint_To_0 was unnecessary. We should try to remove all calls to No_Uint_To_0; they are all questionable. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * gcc-interface/decl.c (gnat_to_gnu_entity): Remove unnecessary call to No_Uint_To_0.diff --git a/gc

[Ada] Proof of the runtime support for attribute 'Width

2021-10-20 Thread Pierre-Marie de Rodat via Gcc-patches
This proves the absence of runtime errors and the functional spec of function System.Width_U which implements the runtime support for attribute 'Width. It requires using the library unit Ada.Numerics.Big_Numbers.Big_Integers because it was not possible to achieve even absence of runtime errors by

[Ada] Provide dummy body for big integers library used in reduced runtimes

2021-10-20 Thread Pierre-Marie de Rodat via Gcc-patches
The version of Ada.Numerics.Big_Numbers.Big_Integers used in the light and embedded runtimes is only meant for proof, not execution. As a result, all subprograms were previously marked as imported, but this leads to a spurious compilation error in GNAT. Work around that bug for now by providing a d

[Ada] Fix problematic conversion of real literal in static context

2021-10-20 Thread Pierre-Marie de Rodat via Gcc-patches
This gets rid of a bogus error issued for the conversion to a static floating-point subtype of a named number which is not a machine number of this floating-point subtype but happens to be very close (or equal) to one of the nominal bounds of the subtype. This conversion may not change the value o

[Ada] Factor out machine rounding operations

2021-10-20 Thread Pierre-Marie de Rodat via Gcc-patches
The RM 4.9(38/2) clause specifies that the rounding to be applied to a real static expression that is not part of a larger static expression is implementation defined, so it makes sense to have a single function implementing the operation. The change also sets the Is_Machine_Number flag more consi

[Ada] Reject boxes in delta record aggregates

2021-10-20 Thread Pierre-Marie de Rodat via Gcc-patches
Implement Ada 2022 4.3.1(17.3/5), prevents box compound delimiter <> to appear in record delta aggregates. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_aggr.adb (Resolve_Delta_Record_Aggregate): Reject boxes in record delta aggregates.diff --git a/gcc/ada/sem_

[Ada] Missing accessibility check when returning discriminated types

2021-10-20 Thread Pierre-Marie de Rodat via Gcc-patches
In some cases where a function result type has an access discriminant part, Ada requires that the execution of a return statement include a check that the access discriminant does not designate an object whose accessibility level is too deep (Ada RM 6.5(21)). This check was being incorrectly omitte

[Ada] Crash on object of protected type with defaulted access component

2021-10-20 Thread Pierre-Marie de Rodat via Gcc-patches
This patch corrects issues in the compiler whereby default initializing a protected type component of an access type containing controlled parts with an allocator causes a crash at compile-time at the point of an object declaration of such protected type. Tested on x86_64-pc-linux-gnu, committed o

[Ada] Refine type of a counter function for record delta aggregate

2021-10-20 Thread Pierre-Marie de Rodat via Gcc-patches
Distance of a variant in the enclosing type declaration is never negative. Code cleanup related to fix for boxes in record delta aggregates; semantics is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_aggr.adb (Variant_Depth): Refine type from Integer to

[Ada] tech debt: Clean up Uint fields, such as Esize

2021-10-20 Thread Pierre-Marie de Rodat via Gcc-patches
Use No_Uint to indicate "unknown" or "not yet known" for various fields whose type is Uint, instead of using Uint_0. Otherwise Uint_0 could be ambiguous -- it could also mean "value is known, and is zero". This patch does not fix all bugs in this area, but fixes most of them, and adds assertions th

[Ada] Warning on nonmatching subtypes in fully conforming subprogram specs and bodies

2021-10-20 Thread Pierre-Marie de Rodat via Gcc-patches
When corresponding parameter subtypes or result subtypes denote different declarations between the declaration and body of a subprogram, but those are fully conforming, a warning will be issued indicating that the subtypes come from different declarations. In the case of anonymous access subtypes,

[Ada] Prevent use of an uninitialized AST field with universal integer

2021-10-20 Thread Pierre-Marie de Rodat via Gcc-patches
A temporary workaround needed by GNATprove after cleaning up the handling of AST fields with universal integers. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_spark.adb (Expand_SPARK_N_Attribute_Reference): Guard against equality of an uninitialized RM_Size fie

[Ada] Expose and use type-generic GCC atomic builtins

2021-10-20 Thread Pierre-Marie de Rodat via Gcc-patches
This exposes the newly added support for type-generic GCC atomic builtins to the user through the System.Atomic_Primitives package, where a generic version of the existing routines is added. This also uses this support in the implementation of the System.Atomic_Operations packages. Tested on x86_

[Ada] Rewrite tests on Convention_Intrinsic

2021-10-20 Thread Pierre-Marie de Rodat via Gcc-patches
Testing for Convention_Intrinsic is not the proper way in order to spot intrinsic subprograms, calling the predicate Is_Intrinsic_Subprogram is. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * gcc-interface/decl.c (gnat_to_gnu_entity) : Replace test on Convention_Int

[Ada] Small cleanup in Eval_Integer_Literal

2021-10-20 Thread Pierre-Marie de Rodat via Gcc-patches
This removes an unreachable case in a nested predicate function as well as trims down a verbose condition. No functional changes. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_eval.ads (Check_Non_Static_Context): Update documentation. * sem_eval.adb (In_Any_In

[Ada] Get rid of Frontend_Exceptions refs

2021-10-20 Thread Pierre-Marie de Rodat via Gcc-patches
Cleanup and remove some unused system specs and references to same. These are specs that set Frontend_Exceptions, which is no longer used in GNAT. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * Makefile.rtl: Remove references to system-vxworks-ppc.ads and system-vxw

[Ada] Issue warning on unused quantified expression

2021-10-20 Thread Pierre-Marie de Rodat via Gcc-patches
It is common that a quantified expression takes the form of a conjunction or disjunction. In such a case, it is expected that all conjuncts/ disjuncts reference the quantified variable. Not doing so can be either the symptom of an error, or of a non-optimal expression, as that sub-expression could

[Ada] Fix type conversion handling in validity checks

2021-10-20 Thread Pierre-Marie de Rodat via Gcc-patches
In case of a checked type conversion, correctly update Typ to match the expression being validated and call Analyze_And_Resolve on the modified expression. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * checks.adb (Insert_Valid_Check): in case of checked type conver

Re: (!HELP NEEDED) Where is the doc for the format strings in gcc (for example, %q+D, ...)

2021-10-20 Thread Qing Zhao via Gcc-patches
Hi, Marek, Thanks a lot for the information. Really helpful. Qing > On Oct 20, 2021, at 12:57 PM, Marek Polacek wrote: > > On Wed, Oct 20, 2021 at 03:49:09PM +, Qing Zhao via Gcc-patches wrote: >> Hi, >> >> In GCC, there are many utility routines for reporting error, warning, or >> inf

gcc-patches@gcc.gnu.org

2021-10-20 Thread Jonathan Wakely via Gcc-patches
On Wed, 20 Oct 2021 at 09:42, Jonathan Wakely wrote: > > On Wed, 20 Oct 2021 at 06:48, Tim Song wrote: > > > > On Tue, Oct 19, 2021 at 9:05 AM Jonathan Wakely via Gcc-patches > > wrote: > > > > > > +constexpr bool > > > +test_copy_elision() > > > +{ > > > + return true; > > > +} > > > + > > > +st

Re: [PATCH][WIP] Add install-dvi Makefile targets

2021-10-20 Thread Eric Gallager via Gcc-patches
On Tue, Oct 19, 2021 at 1:41 AM Thomas Koenig wrote: > > Hi Eric, > > > Hi, I have updated this patch and tested it with more languages now; I > > can now confirm that it works with ada, d, and fortran now. The only > > languages that remain untested now are go (since I'm building on > > darwin an

Re: [PATCH] libstdc++: Implement LWG 3595 changes to common_iterator

2021-10-20 Thread Jonathan Wakely via Gcc-patches
On Wed, 20 Oct 2021 at 18:04, Patrick Palka via Libstdc++ wrote: > > Tested on x86_64-pc-linux-gnu, does this look OK for trunk and branches? I thought I'd already done this one, maybe I have it in a local Git stash. OK for all branches, thanks. > > libstdc++-v3/ChangeLog: > > * include

Re: [PATCH] libstdc++: Implement LWG 3535 changes to ranges::join_view

2021-10-20 Thread Jonathan Wakely via Gcc-patches
On Wed, 20 Oct 2021 at 18:03, Patrick Palka via Libstdc++ wrote: > > Tested on x86_64-pc-linux-gnu, does this look OK for trunk, and branches > after a while? Yes for all. > > libstdc++-v3/ChangeLog: > > * include/std/ranges (join_view::__iter_cat::_S_iter_cat): Adjust > criteri

Re: [PATCH] libstdc++: Implement LWG 3481 change to ranges::viewable_range

2021-10-20 Thread Jonathan Wakely via Gcc-patches
On Wed, 20 Oct 2021 at 18:01, Patrick Palka wrote: > > Tested on x86_64-pc-linux-gnu, does this look OK for trunk, and branches > after a while? Yes for all. > > libstdc++-v3/ChangeLog: > > * include/bits/ranges_base.h (viewable_range): Adjust as per > LWG 3481. > * testsu

Re: [PATCH] doc: Fix documentation around 'asm' keyword in C++

2021-10-20 Thread Jonathan Wakely via Gcc-patches
On Wed, 20 Oct 2021 at 18:44, Jeff Law wrote: > On 10/20/2021 6:28 AM, Jonathan Wakely via Gcc-patches wrote: > > The documentation on asm statements suggests asm is always a GNU > > extension, but it's been part of ISO C++ since the first standard. > > > > The documentation of -fno-asm is wrong fo

Re: [PATCH] libstdc++: Implement LWG 3590-3592 changes to split_view/lazy_split_view

2021-10-20 Thread Jonathan Wakely via Gcc-patches
On Wed, 20 Oct 2021 at 19:17, Patrick Palka wrote: > > Tested on x86_64-pc-linux-gnu, does this look OK for trunk, and 11 after > a while? Yes for both, thanks.

Re: Old installation docs

2021-10-20 Thread Jonathan Wakely via Gcc-patches
On Wed, 20 Oct 2021 at 18:10, Martin Liška wrote: > On 10/20/21 18:59, Jonathan Wakely via Gcc wrote: > > On Wed, 20 Oct 2021 at 17:40, Joseph Myers wrote: > > > >> On Wed, 20 Oct 2021, Jonathan Wakely via Gcc wrote: > >> > >>> https://gcc.gnu.org/install/ says: > >>> > >>> "There are also some ol

Re: [PATCH] X86: Add an option -muse-unaligned-vector-move

2021-10-20 Thread H.J. Lu via Gcc-patches
On Wed, Oct 20, 2021 at 9:58 AM Richard Biener wrote: > > On October 20, 2021 3:19:28 PM GMT+02:00, "H.J. Lu" > wrote: > >On Wed, Oct 20, 2021 at 4:18 AM Richard Biener > > wrote: > >> > >> On Wed, Oct 20, 2021 at 12:40 PM Xu Dianhong wrote: > >> > > >> > Many thanks for your explanation. I got

[PATCH] libstdc++: Implement LWG 3590-3592 changes to split_view/lazy_split_view

2021-10-20 Thread Patrick Palka via Gcc-patches
Tested on x86_64-pc-linux-gnu, does this look OK for trunk, and 11 after a while? libstdc++-v3/ChangeLog: * include/std/ranges (lazy_split_view::base): Add forward_range constraint as per LWG 3591. (lazy_split_view::begin, lazy_split_view::end): Also check simplene

Re: [PATCH] Attempt to resolve all incoming paths to a PHI.

2021-10-20 Thread Aldy Hernandez via Gcc-patches
Thanks. I'm going to wait until/if you approve the previous patch in the series before I commit: [PATCH] Try to resolve paths in threader without looking further back. ..because otherwise I'll have to test again and twiddle tests in a different order. Aldy On Wed, Oct 20, 2021 at 8:04 PM Jeff

Re: [PATCH] Attempt to resolve all incoming paths to a PHI.

2021-10-20 Thread Jeff Law via Gcc-patches
On 10/20/2021 6:37 AM, Aldy Hernandez wrote: The code that threads incoming paths to a PHI is duplicating what we do generically in find_paths_to_names. This shortcoming is actually one of the reasons we aren't threading all possible paths into a PHI. For example, we give up after finding one

Re: (!HELP NEEDED) Where is the doc for the format strings in gcc (for example, %q+D, ...)

2021-10-20 Thread Marek Polacek via Gcc-patches
On Wed, Oct 20, 2021 at 03:49:09PM +, Qing Zhao via Gcc-patches wrote: > Hi, > > In GCC, there are many utility routines for reporting error, warning, or > information, for example: > > warning (0, "weak declaration of %q+D not supported", decl); > warning_at (stmtloc, OPT_Wmaybe_uninitializ

Re: [RFC] Remove VRP threader passes in exchange for better threading pre-VRP.

2021-10-20 Thread Jeff Law via Gcc-patches
On 10/20/2021 3:27 AM, Aldy Hernandez wrote: On Wed, Oct 20, 2021 at 1:00 AM Jeff Law wrote: On 10/18/2021 8:03 AM, Aldy Hernandez wrote: On 10/18/21 3:41 PM, Aldy Hernandez wrote: I've been experimenting with reducing the total number of threading passes, and I'd like to see if there'

Re: [PATCH] doc: Fix documentation around 'asm' keyword in C++

2021-10-20 Thread Jeff Law via Gcc-patches
On 10/20/2021 6:28 AM, Jonathan Wakely via Gcc-patches wrote: The documentation on asm statements suggests asm is always a GNU extension, but it's been part of ISO C++ since the first standard. The documentation of -fno-asm is wrong for C++ as it states that it only affects typeof, but actual

Re: [PATCH 6/8] tree-dynamic-object-size: Handle function parameters

2021-10-20 Thread Siddhesh Poyarekar
On 10/20/21 22:26, Martin Sebor wrote: On 10/7/21 4:14 PM, Siddhesh Poyarekar wrote: Handle either static sizes in function parameters or hints provided by __attribute__ ((access (...))) to compute sizes for objects. It's been my hope to eventually teach __builtin_object_size about attribute a

[PATCH] libstdc++: Implement LWG 3595 changes to common_iterator

2021-10-20 Thread Patrick Palka via Gcc-patches
Tested on x86_64-pc-linux-gnu, does this look OK for trunk and branches? libstdc++-v3/ChangeLog: * include/bits/stl_iterator.h (common_iterator::__arrow_proxy): Make fully constexpr. (common_iterator::__postfix_proxy): Likewise. --- libstdc++-v3/include/bits/stl_iterator.

[PATCH] libstdc++: Implement LWG 3535 changes to ranges::join_view

2021-10-20 Thread Patrick Palka via Gcc-patches
Tested on x86_64-pc-linux-gnu, does this look OK for trunk, and branches after a while? libstdc++-v3/ChangeLog: * include/std/ranges (join_view::__iter_cat::_S_iter_cat): Adjust criteria for returning bidirectional_iterator_tag as per LWG3535. (join_view::_Iterator::_S_ite

[PATCH] libstdc++: Implement LWG 3481 change to ranges::viewable_range

2021-10-20 Thread Patrick Palka via Gcc-patches
Tested on x86_64-pc-linux-gnu, does this look OK for trunk, and branches after a while? libstdc++-v3/ChangeLog: * include/bits/ranges_base.h (viewable_range): Adjust as per LWG 3481. * testsuite/std/ranges/adaptors/all.cc (test07): New test. --- libstdc++-v3/include/bits/

Re: [PATCH] X86: Add an option -muse-unaligned-vector-move

2021-10-20 Thread Richard Biener via Gcc-patches
On October 20, 2021 3:19:28 PM GMT+02:00, "H.J. Lu" wrote: >On Wed, Oct 20, 2021 at 4:18 AM Richard Biener > wrote: >> >> On Wed, Oct 20, 2021 at 12:40 PM Xu Dianhong wrote: >> > >> > Many thanks for your explanation. I got the meaning of operands. >> > The "addpd b(%rip), %xmm0" instruction need

Re: [PATCH 6/8] tree-dynamic-object-size: Handle function parameters

2021-10-20 Thread Martin Sebor via Gcc-patches
On 10/7/21 4:14 PM, Siddhesh Poyarekar wrote: Handle either static sizes in function parameters or hints provided by __attribute__ ((access (...))) to compute sizes for objects. It's been my hope to eventually teach __builtin_object_size about attribute access but implementing it in the new bui

Re: [Version 2][Patch][PR102281]do not add BUILTIN_CLEAR_PADDING for variables that are gimple registers

2021-10-20 Thread Qing Zhao via Gcc-patches
> On Oct 18, 2021, at 2:26 PM, Qing Zhao via Gcc-patches > wrote: > > Hi, Jakub, > > This is the 2nd version of the patch based on your comment. > > Bootstrapped on both x86 and aarch64. Regression testings are ongoing. The regression testing was done. Looks good. Okay for committing? Tha

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

2021-10-20 Thread Segher Boessenkool
Hi! On Wed, Oct 20, 2021 at 05:04:56PM +0800, HAO CHEN GUI wrote: > This patch disables gimple folding for float or double vec_min/max when  > fast-math is not set. It makes vec_min/max conform with the guide. > > Bootstrapped and tested on powerpc64le-linux with no regressions. Is this  > okay f

Re: [PATCH, v2, OpenMP 5.2, Fortran] Strictly-structured block support for OpenMP directives

2021-10-20 Thread Jakub Jelinek via Gcc-patches
On Wed, Oct 20, 2021 at 08:30:34PM +0800, Chung-Lin Tang wrote: > 2021-10-20 Chung-Lin Tang > > gcc/fortran/ChangeLog: > > * decl.c (gfc_match_end): Add COMP_OMP_STRICTLY_STRUCTURED_BLOCK case > together with COMP_BLOCK. > * parse.c (parse_omp_structured_block): Change return

Re: [PATCH] Restore --param=max-fsm-thread-length

2021-10-20 Thread Jan-Benedict Glaw
On Wed, 2021-10-20 09:43:42 +0200, Aldy Hernandez via Gcc-patches wrote: > The removal of --param=max-fsm-thread-length is causing code > explosion. I thought that --param=max-fsm-thread-path-insns was a > better gague for path profitability than raw BB length, but it turns > out that we don't t

(!HELP NEEDED) Where is the doc for the format strings in gcc (for example, %q+D, ...)

2021-10-20 Thread Qing Zhao via Gcc-patches
Hi, In GCC, there are many utility routines for reporting error, warning, or information, for example: warning (0, "weak declaration of %q+D not supported", decl); warning_at (stmtloc, OPT_Wmaybe_uninitialized, "%qE may be used uninitialized", ptr)); inform (loc, "in a call to %qT declared wit

Re: [PATCH] Try to resolve paths in threader without looking further back.

2021-10-20 Thread Aldy Hernandez via Gcc-patches
On Wed, Oct 20, 2021 at 4:35 PM Martin Sebor wrote: > I appreciate the heads up. I'm happy that the threader has > improved. I'm obviously not pleased that it has led to regressions > in warnings but I understand that in some cases they might be due > to limitations in the warning code. I thin

Re: [PATCH v3] AArch64: Improve GOT addressing

2021-10-20 Thread Wilco Dijkstra via Gcc-patches
ping From: Wilco Dijkstra Sent: 04 June 2021 14:44 To: Richard Sandiford Cc: Kyrylo Tkachov ; GCC Patches Subject: [PATCH v3] AArch64: Improve GOT addressing   Hi Richard, This merges the v1 and v2 patches and removes the spurious MEM from ldr_got_small_si/di. This has been rebased after [1]

Re: [PATCH] AArch64: Improve address rematerialization costs

2021-10-20 Thread Wilco Dijkstra via Gcc-patches
ping From: Wilco Dijkstra Sent: 02 June 2021 11:21 To: GCC Patches Cc: Kyrylo Tkachov ; Richard Sandiford Subject: [PATCH] AArch64: Improve address rematerialization costs   Hi, Given the large improvements from better register allocation of GOT accesses, I decided to generalize it to get la

Re: [PATCH] Try to resolve paths in threader without looking further back.

2021-10-20 Thread Martin Sebor via Gcc-patches
On 10/20/21 4:28 AM, Aldy Hernandez via Gcc-patches wrote: Sometimes we can solve a candidate path without having to recurse further back. This can mostly happen in fully resolving mode, because we can ask the ranger what the range on entry to the path is, but there's no reason this can't always

[PATCH] calls.c: Remove some dead code and target hooks

2021-10-20 Thread Alex Coplan via Gcc-patches
Hi all, Looking at calls.c:initialize_argument_information, I spotted some dead code that seems to have been left behind from when MPX support was removed. This patch removes that code as well as the associated target hooks (which appear to be unused). Bootstrapped and regtested on aarch64-linux

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

2021-10-20 Thread Andre Vieira (lists) via Gcc-patches
On 15/10/2021 09:48, Richard Biener wrote: On Tue, 12 Oct 2021, Andre Vieira (lists) wrote: Hi Richi, I think this is what you meant, I now hide all the unrolling cost calculations in the existing target hooks for costs. I did need to adjust 'finish_cost' to take the loop_vinfo so the target's

[PATCH][RFC] Map -ftrapv to -fsanitize=signed-integer-overflow -fsanitize-undefined-trap-on-error

2021-10-20 Thread Richard Biener via Gcc-patches
This maps -ftrapv to -fsanitize=signed-integer-overflow -fsanitize-undefined-trap-on-error, effectively removing flag_trapv (or rather making it always false). This has implications on language support - while -ftrapv was formerly universally available the mapping restricts it to the C family of f

Re: [PATCH] X86: Add an option -muse-unaligned-vector-move

2021-10-20 Thread H.J. Lu via Gcc-patches
On Wed, Oct 20, 2021 at 4:18 AM Richard Biener wrote: > > On Wed, Oct 20, 2021 at 12:40 PM Xu Dianhong wrote: > > > > Many thanks for your explanation. I got the meaning of operands. > > The "addpd b(%rip), %xmm0" instruction needs "b(%rip)" aligned otherwise it > > will rise a "Real-Address Mod

Re: [RFC] Remove VRP threader passes in exchange for better threading pre-VRP.

2021-10-20 Thread Aldy Hernandez via Gcc-patches
On Wed, Oct 20, 2021 at 2:32 PM Andrew MacLeod wrote: > > On 10/20/21 5:27 AM, Aldy Hernandez wrote: > Oh? the float stuff isn't range related, just relations? you can > certainly register those and query/fold them See? I knew you'd get a bright idea. No. There's no time in this release

[PATCH v2] libstdc++: Add support for POWER9 DARN instruction to std::random_device

2021-10-20 Thread Jonathan Wakely via Gcc-patches
On 20/10/21 10:12 +0100, Jonathan Wakely wrote: On 19/10/21 17:47 +0100, Jonathan Wakely wrote: The ISA-3.0 instruction set includes DARN ("deliver a random number") which can be used similar to the existing support for RDRAND and RDSEED. libstdc++-v3/ChangeLog: * src/c++11/random.cc (

Re: [PATCH] gcc-changelog: Add libffi/ to ignored_prefixes

2021-10-20 Thread H.J. Lu via Gcc-patches
On Wed, Oct 20, 2021 at 5:30 AM Martin Liška wrote: > > On 10/20/21 09:15, Martin Liška wrote: > > On 10/20/21 01:23, H.J. Lu wrote: > >> Add libffi/ to ignored_prefixes for syncing with libffi upstream: > > > > Sure, please push it. > > > > Martin > > Hello H.J. > > Note the server hook is update

Re: [match.pd] PR83750 - CSE erf/erfc pair

2021-10-20 Thread Richard Biener via Gcc-patches
On Wed, 20 Oct 2021, Prathamesh Kulkarni wrote: > On Tue, 19 Oct 2021 at 16:55, Richard Biener wrote: > > > > On Tue, 19 Oct 2021, Prathamesh Kulkarni wrote: > > > > > On Tue, 19 Oct 2021 at 13:02, Richard Biener > > > wrote: > > > > > > > > On Tue, Oct 19, 2021 at 9:03 AM Prathamesh Kulkarni v

[PATCH] libffi: Add --enable-cet to configure

2021-10-20 Thread H.J. Lu via Gcc-patches
When --enable-cet is used to configure GCC, enable Intel CET in libffi. * Makefile.am (AM_CFLAGS): Add $(CET_FLAGS). (AM_CCASFLAGS): Likewise. * configure.ac (CET_FLAGS): Add GCC_CET_FLAGS and AC_SUBST. * Makefile.in: Regenerate. * aclocal.m4: Likewise.

[committed][PATCH] libffi: Add LOCAL_PATCHES

2021-10-20 Thread H.J. Lu via Gcc-patches
* LOCAL_PATCHES: New file. --- libffi/LOCAL_PATCHES | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 libffi/LOCAL_PATCHES diff --git a/libffi/LOCAL_PATCHES b/libffi/LOCAL_PATCHES new file mode 100644 index 000..a377c28ce8d --- /dev/null +++ b/libffi/LOCAL_PATCHES @@ -0,

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

2021-10-20 Thread Jakub Jelinek via Gcc-patches
On Mon, Oct 18, 2021 at 06:17:20PM +0200, Marcel Vollweiler wrote: > @@ -14255,6 +14257,16 @@ c_parser_omp_clause_use_device_addr (c_parser > *parser, tree list) > list); > } > > +/* OpenMP 5.1: > + has_device_addr ( variable-list ) */ > + > +static tree >

[PATCH] Attempt to resolve all incoming paths to a PHI.

2021-10-20 Thread Aldy Hernandez via Gcc-patches
The code that threads incoming paths to a PHI is duplicating what we do generically in find_paths_to_names. This shortcoming is actually one of the reasons we aren't threading all possible paths into a PHI. For example, we give up after finding one threadable path, but some PHIs have multiple thre

Re: [RFC] Remove VRP threader passes in exchange for better threading pre-VRP.

2021-10-20 Thread Andrew MacLeod via Gcc-patches
On 10/20/21 5:27 AM, Aldy Hernandez wrote: On Wed, Oct 20, 2021 at 1:00 AM Jeff Law wrote: On 10/18/2021 8:03 AM, Aldy Hernandez wrote: On 10/18/21 3:41 PM, Aldy Hernandez wrote: I've been experimenting with reducing the total number of threading passes, and I'd like to see if there's con

[PATCH, v2, OpenMP 5.2, Fortran] Strictly-structured block support for OpenMP directives

2021-10-20 Thread Chung-Lin Tang
Hi Jakub, this version adjusts the patch to let sections/parallel sections also use strictly-structured blocks, making it more towards 5.2. Because of this change, some of the testcases using the sections-construct need a bit of adjustment too, since "block; end block" at the start of the constru

Re: [PATCH] gcc-changelog: Add libffi/ to ignored_prefixes

2021-10-20 Thread Martin Liška
On 10/20/21 09:15, Martin Liška wrote: On 10/20/21 01:23, H.J. Lu wrote: Add libffi/ to ignored_prefixes for syncing with libffi upstream: Sure, please push it. Martin Hello H.J. Note the server hook is updated after you installed the patch. Martin

[PATCH] doc: Fix documentation around 'asm' keyword in C++

2021-10-20 Thread Jonathan Wakely via Gcc-patches
The documentation on asm statements suggests asm is always a GNU extension, but it's been part of ISO C++ since the first standard. The documentation of -fno-asm is wrong for C++ as it states that it only affects typeof, but actually it affects typeof and asm (despite asm being part of ISO C++).

Re: [PATCH 1/N] Rename asm_out_file function arguments.

2021-10-20 Thread Richard Biener via Gcc-patches
On Wed, Oct 20, 2021 at 1:58 PM Martin Liška wrote: > > On 9/16/21 12:00, Martin Liška wrote: > > As preparation for a new global object that will encapsulate > > asm_out_file, we would need to live with a macro that will > > define asm_out_file as casm->out_file and thus the name > > can't be use

Re: [match.pd] PR83750 - CSE erf/erfc pair

2021-10-20 Thread Prathamesh Kulkarni via Gcc-patches
On Tue, 19 Oct 2021 at 16:55, Richard Biener wrote: > > On Tue, 19 Oct 2021, Prathamesh Kulkarni wrote: > > > On Tue, 19 Oct 2021 at 13:02, Richard Biener > > wrote: > > > > > > On Tue, Oct 19, 2021 at 9:03 AM Prathamesh Kulkarni via Gcc-patches > > > wrote: > > > > > > > > On Mon, 18 Oct 2021

Re: [PATCH 1/N] Rename asm_out_file function arguments.

2021-10-20 Thread Martin Liška
On 9/16/21 12:00, Martin Liška wrote: As preparation for a new global object that will encapsulate asm_out_file, we would need to live with a macro that will define asm_out_file as casm->out_file and thus the name can't be used in function arguments. I've built all cross compilers with the chang

[PATCH] tree-optimization/102853 - avoid trapping types in split_constant_offset

2021-10-20 Thread Richard Biener via Gcc-patches
This avoids running into the assert in compute_distributive_range when starting the analysis with operations in a trapping type. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2021-10-20 Richard Biener PR tree-optimization/102853 * tree-data-ref.c (split_constant

Re: [PATCH] Adjust testcase for O2 vectorization.

2021-10-20 Thread Christophe Lyon via Gcc-patches
Hi, On Tue, Oct 19, 2021 at 11:03 AM liuhongt via Gcc-patches < gcc-patches@gcc.gnu.org> wrote: > updated patch: > 1. Add documents in doc/sourcebuild.texi (Effective-Target Keywords). > 2. Reduce -novec.c testcases to contain only new failed parted which > is caused by O2 vectorization. >

Re: [PATCH] AArch64: Tune case-values-threshold

2021-10-20 Thread Richard Sandiford via Gcc-patches
Wilco Dijkstra writes: > Hi Richard, > >> The problem is that you're effectively asking for these values to be >> taken on faith without providing any analysis and without describing >> how you arrived at the new numbers. Did you try other values too? >> If so, how did they compare with the numbe

Re: [PATCH] X86: Add an option -muse-unaligned-vector-move

2021-10-20 Thread Richard Biener via Gcc-patches
On Wed, Oct 20, 2021 at 12:40 PM Xu Dianhong wrote: > > Many thanks for your explanation. I got the meaning of operands. > The "addpd b(%rip), %xmm0" instruction needs "b(%rip)" aligned otherwise it > will rise a "Real-Address Mode Exceptions". > I haven't considered this situation "b(%rip)" has

  1   2   >