Re: [PATCH] Fix spelling of ones' complement.

2021-11-15 Thread Aldy Hernandez via Gcc-patches
On Tue, Nov 16, 2021, 03:20 Marek Polacek via Gcc-patches < gcc-patches@gcc.gnu.org> wrote: > On Tue, Nov 16, 2021 at 02:01:47AM +, Koning, Paul via Gcc-patches > wrote: > > > > > > > On Nov 15, 2021, at 8:48 PM, Marek Polacek via Gcc-patches < > gcc-patches@gcc.gnu.org> wrote: > > > > > >

[PATCH v2] configure: define TARGET_LIBC_GNUSTACK on musl

2021-11-15 Thread Ilya Lipnitskiy via Gcc-patches
musl only uses PT_GNU_STACK to set default thread stack size and has no executable stack support[0], so there is no reason not to emit the .note.GNU-stack section on musl builds. [0]: https://lore.kernel.org/all/20190423192534.gn23...@brightrain.aerifal.cx/T/#u gcc/ChangeLog: *

Re: [PATCH] configure: define TARGET_LIBC_GNUSTACK on musl

2021-11-15 Thread Ilya Lipnitskiy via Gcc-patches
On Mon, Nov 15, 2021 at 2:50 PM Jeff Law wrote: > > > > On 11/15/2021 1:25 AM, Ilya Lipnitskiy via Gcc-patches wrote: > > musl only uses PT_GNU_STACK to set default thread stack size and has no > > executable stack support[0], so there is no reason not to emit the > > .note.GNU-stack section on

[PATCH] Fix PR tree-optimization/103228 and 103228: folding of (type) X op CST where type is a nop convert

2021-11-15 Thread apinski--- via Gcc-patches
From: Andrew Pinski Currently we fold (type) X op CST into (type) (X op ((type-x) CST)) when the conversion widens but not when the conversion is a nop. For the same reason why we move the widening conversion (the possibility of removing an extra conversion), we should do the same if the

Re: [PATCH] Add a missing return transforming atomic bit test and operations

2021-11-15 Thread Jeff Law via Gcc-patches
On 11/15/2021 8:18 PM, H.J. Lu via Gcc-patches wrote: When failing to transform equivalent, but slighly different cases of atomic bit test and operations to their canonical forms, return immediately. gcc/ PR middle-end/103268 * tree-ssa-ccp.c (optimize_atomic_bit_test_and):

[PATCH] Add a missing return transforming atomic bit test and operations

2021-11-15 Thread H.J. Lu via Gcc-patches
When failing to transform equivalent, but slighly different cases of atomic bit test and operations to their canonical forms, return immediately. gcc/ PR middle-end/103268 * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Add a missing return. gcc/testsuite/ PR

Re: [PATCH] tree-optimization: [PR103245] Improve detection of abs pattern using multiplication

2021-11-15 Thread Jeff Law via Gcc-patches
On 11/15/2021 7:53 PM, apinski--- via Gcc-patches wrote: From: Andrew Pinski So while working on PR 103228 (and a few others), I noticed the testcase for PR 94785 was failing. The problem is that the nop_convert moved from being inside the IOR to be outside of it. I also noticed the patch

[PATCH] tree-optimization: [PR103245] Improve detection of abs pattern using multiplication

2021-11-15 Thread apinski--- via Gcc-patches
From: Andrew Pinski So while working on PR 103228 (and a few others), I noticed the testcase for PR 94785 was failing. The problem is that the nop_convert moved from being inside the IOR to be outside of it. I also noticed the patch for PR 103228 was not needed to reproduce the issue either.

Re: [PATCH] PCH: Make the save and restore diagnostics more robust.

2021-11-15 Thread Jeff Law via Gcc-patches
On 11/13/2021 6:10 AM, Iain Sandoe via Gcc-patches wrote: When saving, if we cannot obtain a suitable memory segment there is no point in continuing, so exit with an error. When reading in the PCH, we have a situation that the read-in data will replace the line tables used by the diagnostics

Re: [PATCH] Avoid pathological function redeclarations when checking access sizes [PR102759]

2021-11-15 Thread Jeff Law via Gcc-patches
On 11/15/2021 1:31 PM, Martin Sebor via Gcc-patches wrote: Declaring a function with a prototype at block scope and then redeclaring it without a prototype at file scope results in losing the prototype but not the attribute access that was implicitly added to the function decl based on the

Re: [PATCH] Remove MAY_HAVE_DEBUG_MARKER_STMTS and MAY_HAVE_DEBUG_BIND_STMTS.

2021-11-15 Thread Jeff Law via Gcc-patches
On 11/12/2021 7:37 AM, Martin Liška wrote: @Alexandre: PING On 10/18/21 12:05, Richard Biener wrote: On Mon, Oct 18, 2021 at 10:54 AM Martin Liška wrote: The macros correspond 1:1 to an option flags and make it harder to find all usages of the flags. Patch can bootstrap on

Re: [PATCH] Fix spelling of ones' complement.

2021-11-15 Thread Marek Polacek via Gcc-patches
On Tue, Nov 16, 2021 at 02:01:47AM +, Koning, Paul via Gcc-patches wrote: > > > > On Nov 15, 2021, at 8:48 PM, Marek Polacek via Gcc-patches > > wrote: > > > > Nitpicking time. It's spelled "ones' complement" rather than "one's > > complement". > > Is that so? I see Wikipedia claims

[PATCH, rs6000] Optimization for vec_xl_sext

2021-11-15 Thread HAO CHEN GUI via Gcc-patches
Hi,    The patch optimizes the code generation for vec_xl_sext builtin. Now all the  sign extensions are done on VSX registers directly.    Bootstrapped and tested on powerpc64le-linux with no regressions. Is this  okay for trunk? Any recommendations? Thanks a lot. ChangeLog 2021-11-16 Haochen

Re: [PATCH] Fix spelling of ones' complement.

2021-11-15 Thread Koning, Paul via Gcc-patches
> On Nov 15, 2021, at 8:48 PM, Marek Polacek via Gcc-patches > wrote: > > Nitpicking time. It's spelled "ones' complement" rather than "one's > complement". Is that so? I see Wikipedia claims it is, but there are no sources for that claim. (There is an assertion that it is "discussed

[PATCH] Fix spelling of ones' complement.

2021-11-15 Thread Marek Polacek via Gcc-patches
Nitpicking time. It's spelled "ones' complement" rather than "one's complement". I didn't go into config/. Ok for trunk? gcc/ChangeLog: * doc/implement-c.texi: Fix spelling. * doc/md.texi: Likewise. * expmed.c (emit_store_flag_int): Likewise. * optabs.c

[PATCH] Update my email address.

2021-11-15 Thread Jim Wilson via Gcc-patches
I've left SiFive and have a new gmail account because it is convenient to use with git send-email. I'm planning to use this for my RISC-V work. My tuliptree address still works, it just isn't as convenient. * MAINTAINERS: Update my address. --- MAINTAINERS | 2 +- 1 file changed, 1

Re: [PATCH] c++: designated init of char array by string constant [PR55227]

2021-11-15 Thread Marek Polacek via Gcc-patches
Hi, thanks for the patch and sorry for the delay in reviewing. On Sat, Nov 06, 2021 at 08:17:23PM -0400, Will Wray via Gcc-patches wrote: > This patch aims to fix https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55227. > > There are two underlying bugs in the designated initialization of char array

[PATCH] libstdc++: Merge latest Ryu sources

2021-11-15 Thread Patrick Palka via Gcc-patches
The only source change is a speedup to pow5Factor. Tested on x86_64-pc-linux-gnu, does this look OK for trunk? libstdc++-v3/ChangeLog: * src/c++17/ryu/MERGE: Update the commit hash. * src/c++17/ryu/d2s_intrinsics.h: Merge from Ryu's master branch. ---

[PATCH 1/5] libstdc++: Import the fast_float library

2021-11-15 Thread Patrick Palka via Gcc-patches
This copies the fast_float library[1] into the compiled-in library sources. We're going to use this library in our floating-point std::from_chars implementation for faster and more portable parsing of binary32/64 decimal strings. [1]: https://github.com/fastfloat/fast_float Series tested on

[PATCH 4/5] libstdc++: Use fast_float in std::from_chars for binary32/64

2021-11-15 Thread Patrick Palka via Gcc-patches
This makes our std::from_chars implementation use fast_float for parsing chars_format::scientific/fixed/general parsing into binary32/64 values. For chars_format::hex (and long double) we still use the fallback implementation that goes through the strtod family of functions.

[PATCH 3/5] libstdc++: Adjust fast_float's over/underflow behavior for conformnace

2021-11-15 Thread Patrick Palka via Gcc-patches
This makes fast_float handle the situation where std::from_chars is specified to return result_out_of_range, i.e. when the parsed value is outside the representable range of the floating-point type. libstdc++-v3/ChangeLog: * src/c++17/fast_float/LOCAL_PATCHES: Update. *

[PATCH 2/5] libstdc++: Apply modifications to our local copy of fast_float

2021-11-15 Thread Patrick Palka via Gcc-patches
This performs the following modifications to our local copy of fast_float in order to make it more readily usable in our std::from_chars implementation: * Remove system #includes * Replace stray call to assert * Use the standard library chars_format and from_chars_result types

Re: [PATCH 1/4] Generate off-stack nested function trampolines

2021-11-15 Thread Joseph Myers
On Sat, 13 Nov 2021, Maxim Blinov wrote: > the target specifically requires it, or you manually provide > --enable-off-stack-trampolines when configuring gcc/libgcc. If you're adding a new configure option, it needs documenting in install.texi. -- Joseph S. Myers jos...@codesourcery.com

Re: [PATCH] Combine malloc + memset to calloc

2021-11-15 Thread Iain Buclaw via Gcc-patches
Excerpts from Seija K. via Gcc-patches's message of November 12, 2021 9:29 pm: > diff --git a/gcc/d/dmd/ctfeexpr.c b/gcc/d/dmd/ctfeexpr.c > index a8e97833ad0..401ed748f43 100644 > --- a/gcc/d/dmd/ctfeexpr.c > +++ b/gcc/d/dmd/ctfeexpr.c > @@ -1350,8 +1350,7 @@ int ctfeRawCmp(Loc loc, Expression

[pushed] c++: split_nonconstant_init and flexarrays

2021-11-15 Thread Jason Merrill via Gcc-patches
split_nonconstant_init was doing the wrong thing for both the initialization and cleanup here; we know the size from the initializer, and we can pass it along. This doesn't make the testcase work, since the y destructor is still broken, but it removes the wrong error for the aggregate

Re: [PATCH] c++: __builtin_bit_cast To C array target type [PR103140]

2021-11-15 Thread will wray via Gcc-patches
Yes - direct use of any builtin is not to be encouraged, in user code. This __builtin_bit_cast patch is intended to encourage experimentation with array copy semantics now, on truck, in preparation for P1997. The builtin bit_cast is strictly more powerful than the std::bit_cast library function

Re: [PATCH] libcpp: Implement -Wbidi-chars for CVE-2021-42574 [PR103026]

2021-11-15 Thread David Malcolm via Gcc-patches
> On Mon, Nov 08, 2021 at 04:33:43PM -0500, Marek Polacek wrote: > > Ping, can we conclude on the name? IMHO, -Wbidirectional is just fine, > > but changing the name is a trivial operation. > > Here's a patch with a better name (suggested by Jonathan W.). Otherwise no > changes. Thanks for

Re: [PATCH v2 2/3] gimple-fold: Use ranges to simplify _chk calls

2021-11-15 Thread Siddhesh Poyarekar
On 11/16/21 01:55, Jeff Law wrote: On 11/15/2021 10:33 AM, 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

Re: [PATCH] configure: define TARGET_LIBC_GNUSTACK on musl

2021-11-15 Thread Jeff Law via Gcc-patches
On 11/15/2021 1:25 AM, Ilya Lipnitskiy via Gcc-patches wrote: musl only uses PT_GNU_STACK to set default thread stack size and has no executable stack support[0], so there is no reason not to emit the .note.GNU-stack section on musl builds. [0]:

[GCC-11 PATCH] aarch64: enable Ampere-1 CPU (backport to GCC11)

2021-11-15 Thread Philipp Tomsich
This adds support and a basic turning model for the Ampere Computing "Ampere-1" CPU. The Ampere-1 implements the ARMv8.6 architecture in A64 mode and is modelled as a 4-wide issue (as with all modern micro-architectures, the chosen issue rate is a compromise between the maximum dispatch rate and

Re: [PATCH] simplify get_range_strlen interface

2021-11-15 Thread Jeff Law via Gcc-patches
On 11/15/2021 3:05 PM, Martin Sebor via Gcc-patches wrote: The deeply nested PHI handling in get_range_strlen_dynamic makes the code bigger and harder to follow than it would be if done in its own function.  The attached patch does that. In addition, the get_range_strlen family of functions

Re: [PATCH 2/6] Add returns_zero_on_success/failure attributes

2021-11-15 Thread David Malcolm via Gcc-patches
On Mon, 2021-11-15 at 15:45 +0100, Peter Zijlstra wrote: > On Mon, Nov 15, 2021 at 12:33:16PM +0530, Prathamesh Kulkarni wrote: > > On Sun, 14 Nov 2021 at 02:07, David Malcolm via Gcc-patches > > > > +/* Handle "returns_zero_on_failure" and "returns_zero_on_success" > > > attributes; > > > +  

Re: [PATCH 2/6] Add returns_zero_on_success/failure attributes

2021-11-15 Thread David Malcolm via Gcc-patches
On Mon, 2021-11-15 at 12:33 +0530, Prathamesh Kulkarni wrote: > On Sun, 14 Nov 2021 at 02:07, David Malcolm via Gcc-patches > wrote: > > > > This patch adds two new attributes.  The followup patch makes use of > > the attributes in -fanalyzer. [...snip...] > > +/* Handle

[PATCH] simplify get_range_strlen interface

2021-11-15 Thread Martin Sebor via Gcc-patches
The deeply nested PHI handling in get_range_strlen_dynamic makes the code bigger and harder to follow than it would be if done in its own function. The attached patch does that. In addition, the get_range_strlen family of functions use a bitmap to avoid infinite recursion. Rather than

[PATCH] PR fortran/99061 - [10/11/12 Regression] ICE in gfc_conv_intrinsic_atan2d, at fortran/trans-intrinsic.c:4728

2021-11-15 Thread Harald Anlauf via Gcc-patches
Dear Fortranners, the attached patch fixes the handling of the DEC trigonometric intrinsics for different argument kinds. It is based on the original patch by Steve, which fixes the lookup for the needed intrinsics. Regtested on x86_64-pc-linux-gnu. OK for affected branches? Thanks, Harald

[PATCH v2] Check optab before transforming atomic bit test and operations

2021-11-15 Thread H.J. Lu via Gcc-patches
On Mon, Nov 15, 2021 at 11:14 AM Jeff Law wrote: > > > > On 11/15/2021 12:05 PM, H.J. Lu wrote: > > On Mon, Nov 15, 2021 at 10:59 AM Jeff Law wrote: > >> > >> > >> On 11/15/2021 6:39 AM, H.J. Lu via Gcc-patches wrote: > >>> Check optab before transforming equivalent, but slighly different cases

Re: Basic kill analysis for modref

2021-11-15 Thread Jan Hubicka via Gcc-patches
> > > + if (always_executed > > > + && callee_summary->kills.length () > > > + && (!cfun->can_throw_non_call_exceptions > > > + || !stmt_could_throw_p (cfun, stmt))) > > > +{ > > > + /* Watch for self recursive updates. */ > > > + auto_vec saved_kills; > > > + > >

[PATCH] Avoid pathological function redeclarations when checking access sizes [PR102759]

2021-11-15 Thread Martin Sebor via Gcc-patches
Declaring a function with a prototype at block scope and then redeclaring it without a prototype at file scope results in losing the prototype but not the attribute access that was implicitly added to the function decl based on the prototype. The middle end code that checks function calls for

Re: [PATCH v2 2/3] gimple-fold: Use ranges to simplify _chk calls

2021-11-15 Thread Jeff Law via Gcc-patches
On 11/15/2021 10:33 AM, 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

[pushed] configure, Darwin: Check ld64 support for -platform-version.

2021-11-15 Thread Iain Sandoe via Gcc-patches
Newer versions of ld64 allow specifiying the OS target (e.g. macos or ios) the version and the SDK version all in a single command. This checks the availability of the command for the current toolchain. tested on *-darwin*, x86_64-linux-gnu, pushed to master, thanks Iain Signed-off-by: Iain

Re: [PATCH v2 3/3] gimple-fold: Use ranges to simplify strncat and snprintf

2021-11-15 Thread Jeff Law via Gcc-patches
On 11/15/2021 10:33 AM, Siddhesh Poyarekar wrote: Use ranges for lengths and object sizes in strncat and snprintf to determine if they can be transformed into simpler operations. gcc/ChangeLog: * gimple-fold.c (gimple_fold_builtin_strncat): Use ranges to determine if it is

Re: [PATCH] Add TSVC tests.

2021-11-15 Thread Iain Sandoe
Hi folks, > On 6 Nov 2021, at 08:05, Martin Liška wrote: > Sorry for issue related to portability. > > On 11/6/21 03:45, David Edelsohn wrote: >> I just noticed that Iain adjusted the tsvc.h for Darwin in the same >> way that I need to adjust it for AIX. Are we trying to keep the >> testcase

Re: [PATCH 2/3] elf: Introduce GLRO (dl_libc_freeres), called from __libc_freeres

2021-11-15 Thread Adhemerval Zanella via Gcc-patches
Maybe add a comment why this is will be used. Reviewed-by: Adhemerval Zanella On 03/11/2021 13:27, Florian Weimer via Gcc-patches wrote: > --- > elf/Makefile | 2 +- > elf/dl-libc_freeres.c | 24 > elf/rtld.c | 1 + >

Re: [PATCH 1/3] nptl: Extract from pthread_cond_common.c

2021-11-15 Thread Adhemerval Zanella via Gcc-patches
On 03/11/2021 13:27, Florian Weimer via Libc-alpha wrote: > And make it an installed header. This addresses a few aliasing > violations (which do not seem to result in miscompilation due to > the use of atomics), and also enables use of wide counters in other > parts of the library. > > The

Re: [PATCH v2 1/3] gimple-fold: Transform stp*cpy_chk to str*cpy directly

2021-11-15 Thread Jeff Law via Gcc-patches
On 11/15/2021 10:33 AM, Siddhesh Poyarekar wrote: Avoid going through another folding cycle and use the ignore flag to directly transform BUILT_IN_STPCPY_CHK to BUILT_IN_STRCPY when set, likewise for BUILT_IN_STPNCPY_CHK to BUILT_IN_STPNCPY. Dump the transformation in dump_file so that we

Re: [PATCH] Check optab before transforming atomic bit test and operations

2021-11-15 Thread Jeff Law via Gcc-patches
On 11/15/2021 12:05 PM, H.J. Lu wrote: On Mon, Nov 15, 2021 at 10:59 AM Jeff Law wrote: On 11/15/2021 6:39 AM, H.J. Lu via Gcc-patches wrote: Check optab before transforming equivalent, but slighly different cases of atomic bit test and operations to their canonical forms. gcc/

Re: [PATCH] Check optab before transforming atomic bit test and operations

2021-11-15 Thread H.J. Lu via Gcc-patches
On Mon, Nov 15, 2021 at 10:59 AM Jeff Law wrote: > > > > On 11/15/2021 6:39 AM, H.J. Lu via Gcc-patches wrote: > > Check optab before transforming equivalent, but slighly different cases > > of atomic bit test and operations to their canonical forms. > > > > gcc/ > > > > PR

Re: Basic kill analysis for modref

2021-11-15 Thread Jeff Law via Gcc-patches
On 11/15/2021 11:51 AM, H.J. Lu via Gcc-patches wrote: On Sun, Nov 14, 2021 at 10:53 AM Jan Hubicka via Gcc-patches wrote: I think you want get_addr_base_and_unit_offset here. All variable indexed addresses are in separate stmts. That also means you can eventually work with just byte

Re: [PATCH] Check optab before transforming atomic bit test and operations

2021-11-15 Thread Jeff Law via Gcc-patches
On 11/15/2021 6:39 AM, H.J. Lu via Gcc-patches wrote: Check optab before transforming equivalent, but slighly different cases of atomic bit test and operations to their canonical forms. gcc/ PR middle-end/103184 * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Check optab

Re: Basic kill analysis for modref

2021-11-15 Thread H.J. Lu via Gcc-patches
On Sun, Nov 14, 2021 at 10:53 AM Jan Hubicka via Gcc-patches wrote: > > > > > > > I think you want get_addr_base_and_unit_offset here. All > > > variable indexed addresses are in separate stmts. That also means > > > you can eventually work with just byte sizes/offsets? > > > > Will do. The

PING: [PATCH] c++: designated init of char array by string constant [PR55227]

2021-11-15 Thread will wray via Gcc-patches
The fixes test out, as does the FIXME that's fixed based on the fixes... Note that the bug causes bogus rejection of any designated initialization of char array from a string literal, except for the singular case where the string literal initializer size exactly matches the target char array size

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

2021-11-15 Thread Ard Biesheuvel via Gcc-patches
Add support for accessing the stack canary value via the TLS register, so that multiple threads running in the same address space can use distinct canary values. This is intended for the Linux kernel running in SMP mode, where processes entering the kernel are essentially threads running the same

[PATCH v5 0/1] implement TLS register based stack canary for ARM

2021-11-15 Thread Ard Biesheuvel via Gcc-patches
Bugzilla: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102352 In the Linux kernel, user processes calling into the kernel are essentially threads running in the same address space, of a program that never terminates. This means that using a global variable for the stack protector canary value is

[PATCH v2 3/3] gimple-fold: Use ranges to simplify strncat and snprintf

2021-11-15 Thread Siddhesh Poyarekar
Use ranges for lengths and object sizes in strncat and snprintf to determine if they can be transformed into simpler operations. gcc/ChangeLog: * gimple-fold.c (gimple_fold_builtin_strncat): Use ranges to determine if it is safe to transform to strcat.

[PATCH v2 2/3] gimple-fold: Use ranges to simplify _chk calls

2021-11-15 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

[PATCH v2 1/3] gimple-fold: Transform stp*cpy_chk to str*cpy directly

2021-11-15 Thread Siddhesh Poyarekar
Avoid going through another folding cycle and use the ignore flag to directly transform BUILT_IN_STPCPY_CHK to BUILT_IN_STRCPY when set, likewise for BUILT_IN_STPNCPY_CHK to BUILT_IN_STPNCPY. Dump the transformation in dump_file so that we can verify in tests that the direct transformation

[PATCH v2 0/3] gimple-fold improvements

2021-11-15 Thread Siddhesh Poyarekar
This patchset improves folding in cases where input lengths and/or destination sizes may not be constant but are range bound. Tested on x86_64 with a full bootstrap build and verified that there are no regressions resulting from this patchset. I double-checked that the run was current and I

[PATCH] libcpp: Implement -Wbidi-chars for CVE-2021-42574 [PR103026]

2021-11-15 Thread Marek Polacek via Gcc-patches
On Mon, Nov 08, 2021 at 04:33:43PM -0500, Marek Polacek wrote: > Ping, can we conclude on the name? IMHO, -Wbidirectional is just fine, > but changing the name is a trivial operation. Here's a patch with a better name (suggested by Jonathan W.). Otherwise no changes. Bootstrapped/regtested

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

2021-11-15 Thread Di Zhao OS via Gcc-patches
Attached is the updated patch. Fixed some errors in testcases. > -Original Message- > From: Richard Biener > Sent: Wednesday, November 10, 2021 5:44 PM > To: Di Zhao OS > Cc: gcc-patches@gcc.gnu.org; Andrew MacLeod > Subject: Re: [PATCH v2] tree-optimization/101186 - extend FRE with >

Re: [PATCH] c++: __builtin_bit_cast To C array target type [PR103140]

2021-11-15 Thread Jakub Jelinek via Gcc-patches
On Mon, Nov 15, 2021 at 12:12:22PM -0500, will wray via Gcc-patches wrote: > One motivation for allowing builtin bit_cast to builtin array is that > it enables direct bitwise constexpr comparisons via memcmp: > > template > constexpr int bit_equal(A const& a, B const& b) > { >

Re: [PATCH] c++: __builtin_bit_cast To C array target type [PR103140]

2021-11-15 Thread will wray via Gcc-patches
Ping. One motivation for allowing builtin bit_cast to builtin array is that it enables direct bitwise constexpr comparisons via memcmp: template constexpr int bit_equal(A const& a, B const& b) { static_assert( sizeof a == sizeof b, "bit_equal(a,b) requires same

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-15 Thread Tejas Belagod via Gcc-patches
Ping for this series. Thanks, Tejas. > -Original Message- > From: Gcc-patches bounces+belagod=gcc.gnu@gcc.gnu.org> On Behalf Of Tejas Belagod via > Gcc-patches > Sent: Thursday, October 28, 2021 12:41 PM > To: Richard Earnshaw ; gcc- > patc...@gcc.gnu.org > Subject: [Patch 1/8, Arm,

[PATCH 2/2] libstdc++: Use diagnose_as attribute to improve simd diagnostics

2021-11-15 Thread Matthias Kretz
Signed-off-by: Matthias Kretz libstdc++-v3/ChangeLog: * include/experimental/bits/simd.h: Diagnose 'std::experimental::parallelism_v2::simd_abi' as 'simd_abi'. On x86, diagnose _VecBuiltin<16>, _VecBuiltin<32>, and _VecBltnBtmsk<64> as 'simd_abi::[SSE]',

[PATCH 1/2] libstdc++: Use diagnose_as attribute to improve string diagnostics

2021-11-15 Thread Matthias Kretz
This hides the basic_string template in all diagnostics, reducing the signal-to-noise ratio significantly. It also hides the std::__cxx11 namespace from users by presenting it as std. Signed-off-by: Matthias Kretz libstdc++-v3/ChangeLog: PR c++/89370 * include/bits/c++config:

[PATCH 0/2] Make use of the diagnose_as attribute to improve libstdc++ diagnostics

2021-11-15 Thread Matthias Kretz
After my two C++ patches for template diagnostics and the diagnose_as attribute are in, I'd like to make use of the attribute for std::*string and std::pmr::*string as well as for std::experimental::simd diagnostics. Matthias Kretz (2): libstdc++: Use diagnose_as attribute to improve string

PING 2 [PATCH] restore ancient -Waddress for weak symbols [PR33925]

2021-11-15 Thread Martin Sebor via Gcc-patches
Ping: https://gcc.gnu.org/pipermail/gcc-patches/2021-October/582415.html On 11/7/21 4:31 PM, Martin Sebor wrote: Ping: https://gcc.gnu.org/pipermail/gcc-patches/2021-October/582415.html On 10/23/21 5:06 PM, Martin Sebor wrote: On 10/4/21 3:37 PM, Jason Merrill wrote: On 10/4/21 14:42, Martin

PING [PATCH] fix up compute_objsize (including PR 103143)

2021-11-15 Thread Martin Sebor via Gcc-patches
Ping for the following cleanup patch: https://gcc.gnu.org/pipermail/gcc-patches/2021-November/583735.html On 11/8/21 7:34 PM, Martin Sebor wrote: The pointer-query code that implements compute_objsize() that's in turn used by most middle end access warnings now has a few warts in it and (at

PING 2 [PATCH 0/2] provide simple detection of indeterminate pointers

2021-11-15 Thread Martin Sebor via Gcc-patches
Pinging the two patches below: -Wuse-after-free: https://gcc.gnu.org/pipermail/gcc-patches/2021-November/583044.html and -Wdangling-pointer: https://gcc.gnu.org/pipermail/gcc-patches/2021-November/583045.html On 11/8/21 3:41 PM, Martin Sebor wrote: Ping for the two patches below:

Re: [ping] Use 'location_hash' for 'gcc/diagnostic-spec.h:nowarn_map'

2021-11-15 Thread Martin Sebor via Gcc-patches
On 11/15/21 8:01 AM, Thomas Schwinge wrote: Hi! Ping. This change looks good to me. Martin Grüße Thomas On 2021-11-09T15:18:44+0100, I wrote: Hi! On 2021-09-03T21:16:46+0200, I wrote: On 2021-09-01T18:14:46-0600, Martin Sebor wrote: On 9/1/21 1:35 PM, Thomas Schwinge wrote: On

Ping: [PATCH 5/5] Add Power10 XXSPLTIDP for SFmode/DFmode constants.

2021-11-15 Thread Michael Meissner via Gcc-patches
Ping patch. | Date: Fri, 5 Nov 2021 00:11:20 -0400 | Subject: [PATCH 5/5] Add Power10 XXSPLTIDP for SFmode/DFmode constants. | Message-ID: -- Michael Meissner, IBM PO Box 98, Ayer, Massachusetts, USA, 01432 email: meiss...@linux.ibm.com

Ping: [PATCH 4/5] Add Power10 XXSPLTIDP for vector constants

2021-11-15 Thread Michael Meissner via Gcc-patches
Ping patch. | Date: Fri, 5 Nov 2021 00:10:18 -0400 | Subject: [PATCH 4/5] Add Power10 XXSPLTIDP for vector constants | Message-ID: -- Michael Meissner, IBM PO Box 98, Ayer, Massachusetts, USA, 01432 email: meiss...@linux.ibm.com

Ping: [PATCH 3/5] Add Power10 XXSPLTIW

2021-11-15 Thread Michael Meissner via Gcc-patches
Ping patch. | Date: Fri, 5 Nov 2021 00:09:07 -0400 | Subject: [PATCH 3/5] Add Power10 XXSPLTIW | Message-ID: -- Michael Meissner, IBM PO Box 98, Ayer, Massachusetts, USA, 01432 email: meiss...@linux.ibm.com

Ping: [PATCH 2/5] Add Power10 XXSPLTI* and LXVKQ instructions (LXVKQ)

2021-11-15 Thread Michael Meissner via Gcc-patches
Ping patch: | Date: Fri, 5 Nov 2021 00:07:05 -0400 | Subject: [PATCH 2/5] Add Power10 XXSPLTI* and LXVKQ instructions (LXVKQ) | Message-ID: -- Michael Meissner, IBM PO Box 98, Ayer, Massachusetts, USA, 01432 email: meiss...@linux.ibm.com

Ping: [PATCH 1/5] Add XXSPLTI* and LXVKQ instructions (new data structure and function)

2021-11-15 Thread Michael Meissner via Gcc-patches
Ping patch. | Date: Fri, 5 Nov 2021 00:04:40 -0400 | Subject: [PATCH 1/5] Add XXSPLTI* and LXVKQ instructions (new data structure and function) | Message-ID: -- Michael Meissner, IBM PO Box 98, Ayer, Massachusetts, USA, 01432 email: meiss...@linux.ibm.com

[COMMITTED] Drop tree overflow in irange setter.

2021-11-15 Thread Aldy Hernandez via Gcc-patches
Drop meaningless overflow that may creep into the IL. Tested on x86-64 Linux. gcc/ChangeLog: PR tree-optimization/103207 * value-range.cc (irange::set): Drop overflow. gcc/testsuite/ChangeLog: * gcc.dg/pr103207.c: New test. --- gcc/testsuite/gcc.dg/pr103207.c | 15

Re: Enable ipa-sra for functions with fnspec attribute

2021-11-15 Thread Martin Jambor
Hi, On Sat, Nov 13 2021, Jan Hubicka via Gcc-patches wrote: > Hi, > this patch enables some ipa-sra on fortran by allowing signature changes on > functions > with "fn spec" attribute when ipa-modref is enabled. This is possible since > ipa-modref > knows how to preserve things we trace in

Re: Enable more type attributes for signature changes

2021-11-15 Thread Martin Sebor via Gcc-patches
On 11/13/21 7:44 AM, Jan Hubicka wrote: Hi, this patch whitelists attributes that are safe for attribute changes and also makes access attribute dropped if function sigunature is changed. We could do better by updating the attribute, but doing so seems to be bit snowballing since with LTO the

[ping] Use 'location_hash' for 'gcc/diagnostic-spec.h:nowarn_map'

2021-11-15 Thread Thomas Schwinge
Hi! Ping. Grüße Thomas On 2021-11-09T15:18:44+0100, I wrote: > Hi! > > On 2021-09-03T21:16:46+0200, I wrote: >> On 2021-09-01T18:14:46-0600, Martin Sebor wrote: >>> On 9/1/21 1:35 PM, Thomas Schwinge wrote: On 2021-06-23T13:47:08-0600, Martin Sebor via Gcc-patches wrote: >

[PATCH] tree-optimization/102880 - make PHI-OPT recognize more CFGs

2021-11-15 Thread Richard Biener via Gcc-patches
This allows extra edges into the middle BB for the PHI-OPT transforms using replace_phi_edge_with_variable that do not end up moving stmts from that middle BB. This avoids regressing gcc.dg/tree-ssa/ssa-hoist-4.c with the actual fix for PR102880 where CFG cleanup has the choice to remove two

Re: [ping^4] Make sure that we get unique test names if several DejaGnu directives refer to the same line [PR102735]

2021-11-15 Thread Thomas Schwinge
Hi! ..., and here is another ping. Grüße Thomas On 2021-11-08T11:45:12+0100, I wrote: > Hi! > > Ping, once more. > > > Grüße > Thomas > > > On 2021-10-14T12:12:41+0200, I wrote: >> Hi! >> >> Ping, again. >> >> Commit log updated for >>

Re: [PATCH 2/6] Add returns_zero_on_success/failure attributes

2021-11-15 Thread Peter Zijlstra
On Mon, Nov 15, 2021 at 12:33:16PM +0530, Prathamesh Kulkarni wrote: > On Sun, 14 Nov 2021 at 02:07, David Malcolm via Gcc-patches > > +/* Handle "returns_zero_on_failure" and "returns_zero_on_success" > > attributes; > > + arguments as in struct attribute_spec.handler. */ > > + > > +static

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

2021-11-15 Thread Bill Schmidt via Gcc-patches
Hi Segher, On 11/14/21 9:29 AM, Segher Boessenkool wrote: > Hi! > > On Sun, Nov 14, 2021 at 08:17:41AM -0600, Bill Schmidt wrote: >> On 11/11/21 10:50 AM, Bill Schmidt wrote: >>> On 11/11/21 7:11 AM, Segher Boessenkool wrote: void f(long x) { __builtin_set_texasr(x); } built with

Re: [PATCH 4/5] if-conv: Apply VN to hoisted conversions

2021-11-15 Thread Richard Biener via Gcc-patches
On Mon, Nov 15, 2021 at 3:00 PM Richard Sandiford wrote: > > Richard Biener via Gcc-patches writes: > > On Fri, Nov 12, 2021 at 7:05 PM Richard Sandiford via Gcc-patches > > wrote: > >> > >> This patch is a prerequisite for a later one. At the moment, > >> if-conversion converts predicated

Re: [PATCH 4/5] if-conv: Apply VN to hoisted conversions

2021-11-15 Thread Richard Sandiford via Gcc-patches
Richard Biener via Gcc-patches writes: > On Fri, Nov 12, 2021 at 7:05 PM Richard Sandiford via Gcc-patches > wrote: >> >> This patch is a prerequisite for a later one. At the moment, >> if-conversion converts predicated POINTER_PLUS_EXPRs into >> non-wrapping forms, which for: >> >> … =

[PATCH] x86_64: Avoid rorx rotation instructions with -Os

2021-11-15 Thread Roger Sayle
This patch teaches the i386 backend to avoid using BMI2's rorx instructions when optimizing for size. The benefits are shown with the following example: unsigned int ror1(unsigned int x) { return (x >> 1) | (x << 31); } unsigned int ror2(unsigned int x) { return (x >> 2) | (x << 30); } unsigned

Re: [PATCH] x86: Add gcc.target/i386/pr103205-2.c

2021-11-15 Thread Jakub Jelinek via Gcc-patches
On Mon, Nov 15, 2021 at 05:40:01AM -0800, H.J. Lu via Gcc-patches wrote: > PR target/103205 > * gcc.target/i386/pr103205-2.c: New test. Ok, thanks. Jakub

[committed] testsuite: Add testcase for already fixed PR [PR100469]

2021-11-15 Thread Jakub Jelinek via Gcc-patches
Hi! This bug introduced in r11-7448-gff92ede8d269375f800e1b347a48f4698874b4a3 has been fixed already by r12-1354-g2d2ed777b23ab6503027039e0adbfe1162f52b2f aka PR100852 fix. Regtested on x86_64-linux -m32/-m64, committed to trunk (so far) as obvious. 2021-11-15 Jakub Jelinek PR

Re: [PATCH][GCC] aarch64: Add LS64 extension and intrinsics

2021-11-15 Thread Richard Sandiford via Gcc-patches
Przemyslaw Wirkus writes: > Hi, > > This patch is adding support for LS64 (Armv8.7-A Load/Store 64 Byte extension) > which is part of Armv8.7-A architecture. Changes include missing plumbing for > TARGET_LS64, LS64 data structure and intrinsics defined in ACLE [0]. Machine > description of

[PATCH] x86: Add gcc.target/i386/pr103205-2.c

2021-11-15 Thread H.J. Lu via Gcc-patches
PR target/103205 * gcc.target/i386/pr103205-2.c: New test. --- gcc/testsuite/gcc.target/i386/pr103205-2.c | 46 ++ 1 file changed, 46 insertions(+) create mode 100644 gcc/testsuite/gcc.target/i386/pr103205-2.c diff --git

[PATCH] Check optab before transforming atomic bit test and operations

2021-11-15 Thread H.J. Lu via Gcc-patches
Check optab before transforming equivalent, but slighly different cases of atomic bit test and operations to their canonical forms. gcc/ PR middle-end/103184 * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Check optab before transforming equivalent, but slighly different

Re: GCC 12.0.0 Status Report (2021-11-15), Stage 3 in effect NOW

2021-11-15 Thread H.J. Lu via Gcc-patches
On Mon, Nov 15, 2021 at 4:05 AM Richard Biener via Gcc-patches wrote: > > > Status > == > > The GCC development branch now is open for general bugfixing (Stage 3). > > Take the quality data below with a big grain of salt - most of the > new P3 classified bugs will become P1 or P2 (generally

[PATCH] ivopts: Improve code generated for very simple loops.

2021-11-15 Thread Roger Sayle
This patch tidies up the code that GCC generates for simple loops, by selecting/generating a simpler loop bound expression in ivopts. The original motivation came from looking at the following loop (from gcc.target/i386/pr90178.c) int *find_ptr (int* mem, int sz, int val) { for (int i = 0; i <

Re: [PATCH] openmp: Add support for thread_limit clause on target

2021-11-15 Thread Jakub Jelinek via Gcc-patches
On Mon, Nov 15, 2021 at 02:00:42PM +0100, Tobias Burnus wrote: > Hi, > > On 15.11.21 13:05, Jakub Jelinek wrote: > > OpenMP 5.1 says that thread_limit clause can also appear on target, > > and similarly to teams should affect the thread-limit-var ICV. > > On combined target teams, the clause goes

Re: [PATCH] openmp: Add support for thread_limit clause on target

2021-11-15 Thread Tobias Burnus
Hi, On 15.11.21 13:05, Jakub Jelinek wrote: OpenMP 5.1 says that thread_limit clause can also appear on target, and similarly to teams should affect the thread-limit-var ICV. On combined target teams, the clause goes to both. This patch does this also for Fortran. OK, once the post-bootstap

[PATCH] libffi: Update LOCAL_PATCHES

2021-11-15 Thread H.J. Lu via Gcc-patches
Add commit a91f844ef449d0dd1cf2e0e47b0ade0d8a6304e1 Author: Rainer Orth Date: Mon Nov 15 10:24:27 2021 +0100 libffi: Use #define instead of .macro in src/x86/win64.S [PR102874] to LOCAL_PATCHES. * LOCAL_PATCHES: Add commit a91f844ef44. --- libffi/LOCAL_PATCHES | 1 + 1 file

Re: [PATCH 4/5] if-conv: Apply VN to hoisted conversions

2021-11-15 Thread Richard Biener via Gcc-patches
On Fri, Nov 12, 2021 at 7:05 PM Richard Sandiford via Gcc-patches wrote: > > This patch is a prerequisite for a later one. At the moment, > if-conversion converts predicated POINTER_PLUS_EXPRs into > non-wrapping forms, which for: > > … = base + offset > > becomes: > > tmp = (unsigned

Re: [PATCH 3/5] vect: Support gather loads with SLP

2021-11-15 Thread Richard Biener via Gcc-patches
On Fri, Nov 12, 2021 at 7:01 PM Richard Sandiford via Gcc-patches wrote: > > This patch adds SLP support for IFN_GATHER_LOAD. Like the SLP > support for IFN_MASK_LOAD, it works by treating only some of the > arguments as child nodes. Unlike IFN_MASK_LOAD, it requires the > other arguments

[COMMITTED] path solver: Default to global range if nothing found.

2021-11-15 Thread Aldy Hernandez via Gcc-patches
This has been a long time coming, but we weren't able to make the change because of some unrelated regressions. Tested on x86-64 & ppc64le Linux. gcc/ChangeLog: * gimple-range-path.cc (path_range_query::internal_range_of_expr): Default to global range if nothing found.

[COMMITTED] Fix PHI ordering problems in the path solver.

2021-11-15 Thread Aldy Hernandez via Gcc-patches
After auditing the PHI range calculations, I'm not convinced we've caught all the corner cases. They haven't shown up in the wild (yet), but better safe than sorry. We shouldn't write anything to the cache or trigger additional lookups while calculating a PHI, as this may cause ordering

[PATCH] tree-optimization/103237 - avoid vectorizing unhandled double reductions

2021-11-15 Thread Richard Biener via Gcc-patches
Double reductions which have multiple LC PHIs in the inner loop are not handled correctly during transformation since those PHIs are not properly classified as reduction. The following disables vectorizing them. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2021-11-15 Richard

  1   2   >