Re: [PATCH] loop: Fix profile updates after unrolling [PR102385]

2021-10-08 Thread Richard Biener via Gcc-patches
On Tue, Oct 5, 2021 at 3:39 PM Richard Sandiford via Gcc-patches wrote: > > In g:62acc72a957b5614 I'd stopped the unroller from using > an epilogue loop in cases where the iteration count was > known to be a multiple of the unroll factor. The epilogue > and non-epilogue cases still shared this (p

Re: [PATCH] Improve integer bit test on atomic builtin return

2021-10-08 Thread Richard Biener via Gcc-patches
On Tue, 5 Oct 2021, H.J. Lu wrote: > On Tue, Oct 5, 2021 at 3:07 AM Richard Biener wrote: > > > > On Mon, 4 Oct 2021, H.J. Lu wrote: > > > > > commit adedd5c173388ae505470df152b9cb3947339566 > > > Author: Jakub Jelinek > > > Date: Tue May 3 13:37:25 2016 +0200 > > > > > > re PR target/4924

[PATCH] [GCC-12] Mention O2 vectorization enabling.

2021-10-08 Thread liuhongt via Gcc-patches
--- htdocs/gcc-12/changes.html | 9 + 1 file changed, 9 insertions(+) diff --git a/htdocs/gcc-12/changes.html b/htdocs/gcc-12/changes.html index 22839f2d..6e898db7 100644 --- a/htdocs/gcc-12/changes.html +++ b/htdocs/gcc-12/changes.html @@ -68,6 +68,15 @@ a work-in-progress. General Im

[Committed] Tweak new test cases for -march=cascadelake strangeness.

2021-10-08 Thread Roger Sayle
As reported by Sunil's tester, -march=cascadelake triggers some SUBREG non-determinacy in the generated assembler for my new tests. Fixed by updating the regular expressions to match either the zero or sign extended forms. I'm testing a backend patch that may help with the underlying cause of th

[committed] openmp: Fix up declare target handling for vars with DECL_LOCAL_DECL_ALIAS [PR102640]

2021-10-08 Thread Jakub Jelinek via Gcc-patches
Hi! The introduction of DECL_LOCAL_DECL_ALIAS and push_local_extern_decl_alias in r11-3699-g4e62aca0e0520e4ed2532f2d8153581190621c1a broke the following testcase. The following patch fixes it by treating similarly not just the variable to or link clause is put on, but also its DECL_LOCAL_DECL_ALI

Rewrite PTA constraint generation for function calls

2021-10-08 Thread Jan Hubicka
Hi, this patch commonizes the three paths to produce constraints for function call and makes it more flexible, so we can implement new features more easily. Main idea is to not special case pure and const since we can now describe all of pure/const via their EAF flags (implicit_const_eaf_flags and

[PATCH] Refine movhfcc.

2021-10-08 Thread liuhongt via Gcc-patches
For AVX512-FP16, HFmode only supports vcmpsh whose dest is mask register, so for movhfcc, it's vcmpsh op2, op1, %k1 vmovsh op1, op2{%k1} mov op2, dest gcc/ChangeLog: PR target/102639 * config/i386/i386-expand.c (ix86_valid_mask_cmp_mode): Handle HFmode. (ix86_use_

Re: Rewrite PTA constraint generation for function calls

2021-10-08 Thread Richard Biener via Gcc-patches
On Fri, 8 Oct 2021, Jan Hubicka wrote: > Hi, > this patch commonizes the three paths to produce constraints for function call > and makes it more flexible, so we can implement new features more easily. > Main > idea is to not special case pure and const since we can now describe all of > pure/co

[PATCH] options: use cl_optimization_hash.

2021-10-08 Thread Martin Liška
Hello. Right now, we use legacy hashing function in cl_option_hasher and I also need the change for the future fix of PR102585. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin gcc/ChangeLog: * tree.c (cl_option_hasher::hash)

Re: [PATCH] Enable auto-vectorization at O2 with very-cheap cost model.

2021-10-08 Thread Aldy Hernandez via Gcc-patches
On Thu, Sep 23, 2021 at 8:32 AM Richard Biener via Gcc-patches wrote: > > On Thu, 23 Sep 2021, Hongtao Liu wrote: > > > On Thu, Sep 23, 2021 at 9:48 AM Hongtao Liu wrote: > > > > > > On Wed, Sep 22, 2021 at 10:21 PM Martin Sebor wrote: > > > > > > > > On 9/21/21 7:38 PM, Hongtao Liu wrote: > > >

[PATCH] contrib: git gcc-descr defaulting to print hash

2021-10-08 Thread Martin Liška
Hello. I'm sending a patch originally written by Martin Jambor. The patch changes the behavior in the following way: $ git gcc-descr HEAD~ r12-4245-gdb3d7270b42fe2 $ git gcc-descr --short HEAD~ r12-4245 $ git gcc-undescr r12-4245-gdb3d7270b42fe2 db3d7270b42fe27fb05664c4fdf524ab7ad13a75 whi

[PATCH] Come up with OPTION_SET_P macro.

2021-10-08 Thread Martin Liška
Hello. It's a refactoring patch introducing a new macro. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. I verified all cross compilers do build. Ready to be installed? Thanks, Martin gcc/ada/ChangeLog: * gcc-interface/misc.c (gnat_post_options): Use new macro

Re: [PATCH] contrib: git gcc-descr defaulting to print hash

2021-10-08 Thread Jakub Jelinek via Gcc-patches
On Fri, Oct 08, 2021 at 01:01:33PM +0200, Martin Liška wrote: > I'm sending a patch originally written by Martin Jambor. > The patch changes the behavior in the following way: > > $ git gcc-descr HEAD~ > > r12-4245-gdb3d7270b42fe2 > > $ git gcc-descr --short HEAD~ > > r12-4245 I think changing

Re: [PATCH] [GCC-12] Mention O2 vectorization enabling.

2021-10-08 Thread Richard Biener via Gcc-patches
On Fri, Oct 8, 2021 at 9:29 AM liuhongt via Gcc-patches wrote: > > --- > htdocs/gcc-12/changes.html | 9 + > 1 file changed, 9 insertions(+) > > diff --git a/htdocs/gcc-12/changes.html b/htdocs/gcc-12/changes.html > index 22839f2d..6e898db7 100644 > --- a/htdocs/gcc-12/changes.html > +++

Re: [PATCH] Come up with OPTION_SET_P macro.

2021-10-08 Thread Richard Biener via Gcc-patches
On Fri, Oct 8, 2021 at 1:03 PM Martin Liška wrote: > > Hello. > > It's a refactoring patch introducing a new macro. > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > I verified all cross compilers do build. > > Ready to be installed? OK. Thanks, Richard. > Thanks, > M

[committed] libstdc++: Implement ostream insertion for chrono::duration

2021-10-08 Thread Jonathan Wakely via Gcc-patches
This is a missing piece of the C++20 header. It would be good to move the code into the compiled library, so that we don't need in . It could also use spanstream in C++20, to avoid memory allocations. That can be changed at a later date. libstdc++-v3/ChangeLog: * include/std/chrono (__

[committed] libstdc++: Restore debug checks in uniform container erasure functions

2021-10-08 Thread Jonathan Wakely via Gcc-patches
This partially reverts commit 561078480ffb5adb68577276c6b23e4ee7b39272. If we avoid all debug mode checks when erasing elements then we fail to invalidate safe iterators to the removed elements. This reverts the recent changes in r12-4083 and r12-4233, restoring the debug checking. libstdc++-v3/C

[PATCH] libstdc++: Add wrapper for internal uses of std::terminate

2021-10-08 Thread Jonathan Wakely via Gcc-patches
This adds an inline wrapper for std::terminate that doesn't add the declaration of std::terminate to namespace std. This allows the library to terminate without including all of . libstdc++-v3/ChangeLog: * include/bits/atomic_timed_wait.h: Remove unused header. * include/bits/c++c

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

2021-10-08 Thread Stefan Schulze Frielinghaus via Gcc-patches
gcc/ChangeLog: * regcprop.c (maybe_mode_change): Determine offset relative to high or low part depending on endianness. Bootstrapped and regtested on IBM Z. Ok for mainline and gcc-{11,10,9}? --- gcc/regcprop.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) d

Re: [PATCH 3/4] ipa-cp: Fix updating of profile counts and self-gen value evaluation

2021-10-08 Thread Jan Hubicka
> For non-local nodes which can have unknown callers, the algorithm just > takes half of the counts - we may decide that taking just a third or > some other portion is more reasonable, but I do not think we can > attempt anything more clever. Can't you just sum the calling edges and subtract it fr

[PATCH][pushed] opts: include missing header files.

2021-10-08 Thread Martin Liška
gcc/objc/ChangeLog: * objc-next-runtime-abi-01.c: Add missing include. * objc-next-runtime-abi-02.c: Likewise. --- gcc/objc/objc-next-runtime-abi-01.c | 1 + gcc/objc/objc-next-runtime-abi-02.c | 1 + 2 files changed, 2 insertions(+) diff --git a/gcc/objc/objc-next-runtime-abi-0

[r12-4240 Regression] FAIL: libgomp.c++/scan-9.C scan-tree-dump-times vect "vectorized [2-6] loops" 2 on Linux/x86_64

2021-10-08 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, 2b8453c401b699ed93c085d0413ab4b5030bcdb8 is the first bad commit commit 2b8453c401b699ed93c085d0413ab4b5030bcdb8 Author: liuhongt Date: Mon Sep 6 13:48:49 2021 +0800 Enable auto-vectorization at O2 with very-cheap cost model. caused FAIL: libgomp.c++/scan-10.C scan-tree-

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

2021-10-08 Thread Tejas Belagod via Gcc-patches
Hi, This patch adds the -march feature +pacbti to Armv8.1-M Mainline. This feature enables pointer signing and authentication instructions on M-class architectures. Tested on arm-none-eabi. OK for trunk? 2021-10-04 Tejas Belagod gcc/Changelog: * config/arm/arm-cpus.in: Define new fe

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

2021-10-08 Thread Tejas Belagod via Gcc-patches
Hi, Add -mbranch-protection option and its associated parsing routines. This option enables the code-generation of pointer signing and authentication instructions in function prologues and epilogues. Tested on arm-none-eabi. OK for trunk? 2021-10-04 Tejas Belagod gcc/ChangeLog: * co

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

2021-10-08 Thread Tejas Belagod via Gcc-patches
Hi, Add targeting-checking entities for PACBTI in testsuite framework. Tested on arm-none-eabi. OK for trunk? 2021-10-04 Tejas Belagod gcc/ChangeLog: * testsuite/lib/target-supports.exp (check_effective_target_arm_pacbti_hw): New. diff --git a/gcc/testsuite/lib/target-suppor

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

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

[Patch 5/7, Arm. GCC] Add pointer authentication for stack-unwinding runtime.

2021-10-08 Thread Tejas Belagod via Gcc-patches
Hi, This patch adds authentication for when the stack is unwound when an exception is taken. All the changes here are done to the runtime code in libgcc's unwinder code for Arm target. All the changes are guarded under defined (__ARM_FEATURE_PAC_DEFAULT) and activates only if the +pacbti feature

[Patch 6/7, Arm, GCC] Emit build attributes for PACBTI target feature.

2021-10-08 Thread Tejas Belagod via Gcc-patches
Hi, This patch emits assembler directives for PACBTI build attributes as defined by the ABI. (https://github.com/ARM-software/abi-aa/releases/download/2021Q1/addenda32.pdf) Tested on arm-none-eabi. 2021-10-04 Tejas Belagod gcc/ChangeLog: * config/arm/arm.c (arm_file_start): Emit EA

[Patch 7/7, Arm, GCC] Introduce multilibs for PACBTI target feature.

2021-10-08 Thread Tejas Belagod via Gcc-patches
Hi, This patch adds a multilib for pacbti target feature. Tested on arm-none-eabi. OK for trunk? 2021-10-04 Tejas Belagod gcc/ChangeLog: * config/arm/t-rmprofile: Add multilib rules for +pacbti. diff --git a/gcc/config/arm/t-rmprofile b/gcc/config/arm/t-rmprofile index a6036bf0a519

Re: [PATCH] libsanitizer: Add AM_CCASFLAGS to Makefile.am

2021-10-08 Thread H.J. Lu via Gcc-patches
On Wed, Oct 6, 2021 at 11:25 AM H.J. Lu wrote: > > commit 9069eb28d45baaa8baf5e3790b03b0e2cc5b49b3 > Author: Igor Tsimbalist > Date: Fri Nov 17 22:34:50 2017 +0100 > > Enable building libsanitizer with Intel CET > > libsanitizer/ > * acinclude.m4: Add enable.m4 and cet.m4. >

[committed] libstdc++: Reduce header dependencies of in C++20 [PR 92546]

2021-10-08 Thread Jonathan Wakely via Gcc-patches
The header doesn't need the stream and streambuf iterators, so don't include the whole of . libstdc++-v3/ChangeLog: PR libstdc++/92546 * include/bits/ranges_algobase.h: Replace with a subset of the headers it includes. Tested powerpc64le-linux. Committed to trunk. comm

Re: [PATCH] IBM Z: Provide rawmemchr{qi,hi,si} expander

2021-10-08 Thread Stefan Schulze Frielinghaus via Gcc-patches
On Thu, Oct 07, 2021 at 11:16:24AM +0200, Andreas Krebbel wrote: > On 9/20/21 11:24, Stefan Schulze Frielinghaus wrote: > > This patch implements the rawmemchr expander as introduced in > > https://gcc.gnu.org/pipermail/gcc-patches/2021-September/579649.html > > > > Bootstrapped and regtested in c

[COMMITTED] Implement irange::debug()

2021-10-08 Thread Aldy Hernandez via Gcc-patches
Tested on x86-64 Linux. gcc/ChangeLog: * value-range.cc (irange::debug): New. * value-range.h (irange::debug): New. --- gcc/value-range.cc | 7 +++ gcc/value-range.h | 1 + 2 files changed, 8 insertions(+) diff --git a/gcc/value-range.cc b/gcc/value-range.cc index 147c4b04c

[COMMITTED] Grow non_null_ref bitmap when num_ssa_names increases.

2021-10-08 Thread Aldy Hernandez via Gcc-patches
The strlen pass changes the IL as it works with the ranger. This causes the non_null_ref code to sometimes get asked questions about new SSA names. Tested on x86-64 Linux. gcc/ChangeLog: * gimple-range-cache.cc (non_null_ref::non_null_deref_p): Grow bitmap if needed. --- gcc/gi

[committed] libstdc++: Detect miscompilation of src/c++11/limits.cc

2021-10-08 Thread Jonathan Wakely via Gcc-patches
Add a #error directive to ensure that the definitions are not compiled as C++17, which would prevent them being emitted. libstdc++-v3/ChangeLog: PR libstdc++/98725 * src/c++11/limits.cc: Fail if __cpp_inline_variables is defined. Tested powerpc64le-linux. Committed to tru

Re: [PATCH] Improve integer bit test on atomic builtin return

2021-10-08 Thread H.J. Lu via Gcc-patches
On Fri, Oct 8, 2021 at 12:16 AM Richard Biener wrote: > > On Tue, 5 Oct 2021, H.J. Lu wrote: > > > On Tue, Oct 5, 2021 at 3:07 AM Richard Biener wrote: > > > > > > On Mon, 4 Oct 2021, H.J. Lu wrote: > > > > > > > commit adedd5c173388ae505470df152b9cb3947339566 > > > > Author: Jakub Jelinek > > >

Re: [PATCH] IBM Z: Provide rawmemchr{qi,hi,si} expander

2021-10-08 Thread Andreas Krebbel via Gcc-patches
On 10/8/21 16:23, Stefan Schulze Frielinghaus wrote: > On Thu, Oct 07, 2021 at 11:16:24AM +0200, Andreas Krebbel wrote: >> On 9/20/21 11:24, Stefan Schulze Frielinghaus wrote: >>> This patch implements the rawmemchr expander as introduced in >>> https://gcc.gnu.org/pipermail/gcc-patches/2021-Septem

[PATCH] Convert strlen pass from evrp to ranger.

2021-10-08 Thread Aldy Hernandez via Gcc-patches
The following patch converts the strlen pass from evrp to ranger, leaving DOM as the last remaining user. No additional cleanups have been done. For example, the strlen pass still has uses of VR_ANTI_RANGE, and the sprintf still passes around pairs of integers instead of using a proper range. Fi

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

2021-10-08 Thread Richard Sandiford via Gcc-patches
Thanks for looking at this. Prathamesh Kulkarni writes: > Hi, > As mentioned in PR, for the following test-case: > > typedef unsigned char uint8_t; > > static inline uint8_t > x264_clip_uint8(uint8_t x) > { > uint8_t t = -x; > uint8_t t1 = x & ~63; > return (t1 != 0) ? t : x; > } > > void >

Re: [PATCH]AArch64[RFC] Force complicated constant to memory when beneficial

2021-10-08 Thread Richard Sandiford via Gcc-patches
Catching up on backlog, sorry for the very late response: Tamar Christina writes: > Hi All, > > Consider the following case > > #include > > uint64_t > test4 (uint8x16_t input) > { > uint8x16_t bool_input = vshrq_n_u8(input, 7); > poly64x2_t mask = vdupq_n_p64(0x0102040810204080UL); >

[PATCH] openmp: Add support for OpenMP 5.1 structured-block-sequences

2021-10-08 Thread Jakub Jelinek via Gcc-patches
Hi! Related to this is the addition of structured-block-sequence in OpenMP 5.1, which doesn't change anything for Fortran, but for C/C++ allows multiple statements instead of just one possibly compound around the separating directives (section and scan). The following patch implements that, will

Re: [PATCH]AArch64 Make use of FADDP in simple reductions.

2021-10-08 Thread Richard Sandiford via Gcc-patches
Tamar Christina writes: > Hi All, > > This is a respin of an older patch which never got upstream reviewed by a > maintainer. It's been updated to fit the current GCC codegen. > > This patch adds a pattern to support the (F)ADDP (scalar) instruction. > > Before the patch, the C code > > typedef f

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

2021-10-08 Thread Martin Sebor via Gcc-patches
On 10/8/21 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. Thanks for doing this. I know I said I'd work on it but I'm still bogged down in my stage 1 work that's not going so great :( I j

Re: [PATCH] libiberty: prevent buffer overflow when decoding user input

2021-10-08 Thread Iain Buclaw via Gcc-patches
Excerpts from Luís Ferreira's message of October 7, 2021 8:29 pm: > On Tue, 2021-10-05 at 21:49 -0400, Eric Gallager wrote: >> >> I can help with the autotools part if you can say how precisely you'd >> like to use them to add address sanitization. And as for the OSS >> fuzz part, I think someone

[committed] LRA: [PR102627] Use at least natural mode during splitting hard reg live range

2021-10-08 Thread Vladimir Makarov via Gcc-patches
The following patch fixes    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102627 The patch was successfully bootstrapped and tested on x86-64. commit fab2d977e69539aad9bef81caff17de48e53aedf (HEAD -> master) Author: Vladimir N. Makarov Date: Fri Oct 8 10:16:09 2021 -0400 [PR102627] Use

[PATCH v2, Fortran] Add diagnostic for F2018:C839 (TS29113:C535c)

2021-10-08 Thread Sandra Loosemore
On 10/7/21 9:25 AM, Tobias Burnus wrote: Hi Sandra, On 06.10.21 23:37, Sandra Loosemore wrote: This patch is for PR fortran/54753, to add a diagnostic for violations of this constraint in the 2018 standard:   C839 If an assumed-size or nonallocatable nonpointer assumed-rank   array is an actu

Re: [PATCH] libiberty: prevent buffer overflow when decoding user input

2021-10-08 Thread Luís Ferreira
On Fri, 2021-10-08 at 18:52 +0200, Iain Buclaw wrote: > Excerpts from Luís Ferreira's message of October 7, 2021 8:29 pm: > > On Tue, 2021-10-05 at 21:49 -0400, Eric Gallager wrote: > > > > > > I can help with the autotools part if you can say how precisely > > > you'd > > > like to use them to ad

[r12-4240 Regression] FAIL: libgomp.c++/scan-9.C scan-tree-dump-times vect "vectorized [2-6] loops" 2 on Linux/x86_64

2021-10-08 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, 2b8453c401b699ed93c085d0413ab4b5030bcdb8 is the first bad commit commit 2b8453c401b699ed93c085d0413ab4b5030bcdb8 Author: liuhongt Date: Mon Sep 6 13:48:49 2021 +0800 Enable auto-vectorization at O2 with very-cheap cost model. caused FAIL: gcc.dg/optimize-bswapsi-5.c scan

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

2021-10-08 Thread Segher Boessenkool
On Thu, Oct 07, 2021 at 08:04:23PM -0500, Paul A. Clarke wrote: > On Thu, Oct 07, 2021 at 06:39:06PM -0500, Segher Boessenkool wrote: > > > + __asm__ __volatile__ ("mffsce %0" : "=f" (__fpscr_save.__fr)); > > > > The __volatile__ does likely not do what you want. As far as I can see > > you

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

2021-10-08 Thread Andrew MacLeod via Gcc-patches
On 10/8/21 12:51 PM, Martin Sebor via Gcc-patches wrote: I.e., in the test: void g (char *s1, char *s2) {   char b[1025];   size_t n = __builtin_strlen (s1), d = __builtin_strlen (s2);   if (n + d + 1 >= 1025)     return;   sprintf (b, "%s.%s", s1, s2); // { dg-bogus "\\\[-Wformat-overflow" }

Re: [PATCH] x86-64: Remove HAVE_LD_PIE_COPYRELOC

2021-10-08 Thread Fāng-ruì Sòng via Gcc-patches
On Fri, Sep 24, 2021 at 11:29 AM H.J. Lu wrote: > > On Fri, Sep 24, 2021 at 11:14 AM Fāng-ruì Sòng wrote: > > > > On Fri, Sep 24, 2021 at 10:41 AM H.J. Lu wrote: > > > > > > On Fri, Sep 24, 2021 at 10:29 AM Fāng-ruì Sòng wrote: > > > > > > > > On Tue, Sep 21, 2021 at 7:08 PM Fāng-ruì Sòng >

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

2021-10-08 Thread Paul A. Clarke via Gcc-patches
On Fri, Oct 08, 2021 at 12:39:15PM -0500, Segher Boessenkool wrote: > On Thu, Oct 07, 2021 at 08:04:23PM -0500, Paul A. Clarke wrote: > > On Thu, Oct 07, 2021 at 06:39:06PM -0500, Segher Boessenkool wrote: > > > > + __asm__ __volatile__ ("mffsce %0" : "=f" (__fpscr_save.__fr)); > > > > > > Th

Re: [PATCH v2, Fortran] Add diagnostic for F2018:C839 (TS29113:C535c)

2021-10-08 Thread Tobias Burnus
Hi Sandra On 08.10.21 18:58, Sandra Loosemore wrote: I concur that that should be in a separate PR. It's PR102641 now. Thanks. OK to commit v2 of the patch (attached)? OK – thanks for the patch! Tobias - Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 20

Re: [PATCH] libiberty: prevent buffer overflow when decoding user input

2021-10-08 Thread Iain Buclaw via Gcc-patches
Excerpts from Luís Ferreira's message of October 8, 2021 7:08 pm: > On Fri, 2021-10-08 at 18:52 +0200, Iain Buclaw wrote: >> Excerpts from Luís Ferreira's message of October 7, 2021 8:29 pm: >> > On Tue, 2021-10-05 at 21:49 -0400, Eric Gallager wrote: >> > > >> > > I can help with the autotools pa

[PATCH] c++: fix cases of core1001/1322 by not dropping cv-qualifier of function parameter of type of typename or decltype[PR101402, PR102033, PR102034, PR102039, PR102

2021-10-08 Thread Nick Huang via Gcc-patches
First of all, I am sorry for my late response as I missed your email. I need to update my filter setup of gmail after switching from hotmail. >I think WILDCARD_TYPE_P is what you want, except... I will try this one. >Your patch rejects that testcase even without the specialization on >int[], whic

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

2021-10-08 Thread Martin Sebor via Gcc-patches
On 10/8/21 11:56 AM, Andrew MacLeod wrote: On 10/8/21 12:51 PM, Martin Sebor via Gcc-patches wrote: I.e., in the test: void g (char *s1, char *s2) {   char b[1025];   size_t n = __builtin_strlen (s1), d = __builtin_strlen (s2);   if (n + d + 1 >= 1025)     return;   sprintf (b, "%s.%s", s1,

[PATCH] PR fortran/65454 - accept both old and new-style relational operators

2021-10-08 Thread Harald Anlauf via Gcc-patches
Dear Fortranners, F2018:10.1.5.5.1(2) requires the same interpretation of old and new-style relational operators. We internally distinguish between old and new style, but try to map appropriately when used. This mapping was missing when reading a module via USE module, ONLY: OPERATOR(op) where

Re: [PATCH] PR fortran/65454 - accept both old and new-style relational operators

2021-10-08 Thread Jerry D via Gcc-patches
On 10/8/21 2:33 PM, Harald Anlauf via Fortran wrote: Dear Fortranners, F2018:10.1.5.5.1(2) requires the same interpretation of old and new-style relational operators. We internally distinguish between old and new style, but try to map appropriately when used. This mapping was missing when r

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

2021-10-08 Thread Segher Boessenkool
On Fri, Oct 08, 2021 at 02:27:28PM -0500, Paul A. Clarke wrote: > On Fri, Oct 08, 2021 at 12:39:15PM -0500, Segher Boessenkool wrote: > > This is not a basic asm (it contains a ":"; that is not just an easy way > > to see it, it is the *definition* of basic vs. extended asm). > > Ah, basic vs exte

Re: [PATCH] Enable auto-vectorization at O2 with very-cheap cost model.

2021-10-08 Thread Martin Sebor via Gcc-patches
On 10/8/21 4:49 AM, Aldy Hernandez via Gcc-patches wrote: On Thu, Sep 23, 2021 at 8:32 AM Richard Biener via Gcc-patches wrote: On Thu, 23 Sep 2021, Hongtao Liu wrote: On Thu, Sep 23, 2021 at 9:48 AM Hongtao Liu wrote: On Wed, Sep 22, 2021 at 10:21 PM Martin Sebor wrote: On 9/21/21 7:3

[committed 1/2] libstdc++: Avoid instantiation of _Hash_node before it's needed

2021-10-08 Thread Jonathan Wakely via Gcc-patches
This is a step towards restoring support for incomplete types in unordered containers (PR 53339). We do not need to instantiate the node type to get its value_type member, because we know that the value type is the first template parameter. We can deduce that template argument using a custom trait

[committed 2/2] libstdc++: Access std::pair members without tuple-like helpers

2021-10-08 Thread Jonathan Wakely via Gcc-patches
On 09/10/21 00:59 +0100, Jonathan Wakely wrote: This is a step towards restoring support for incomplete types in unordered containers (PR 53339). We do not need to instantiate the node type to get its value_type member, because we know that the value type is the first template parameter. We can

[committed] libstdc++: Replace uses of _GLIBCXX_USE_INT128 in testsuite

2021-10-08 Thread Jonathan Wakely via Gcc-patches
Since r12-435 the _GLIBCXX_USE_INT128 macro is never defined, so all uses of it in the testsuite are wrong. The tests should be checking __SIZEOF_INT128__ instead. Also add some tests for an INT_3 type, which were missing. Tested powerpc64le-linux. Committed to trunk. commit 29a9de9b40277af98515

[PATCH 4/8] libstdc++: Enable vstring for wchar_t unconditionally [PR98725]

2021-10-08 Thread Jonathan Wakely via Gcc-patches
None of these vstring specializations depend on libc support for wchar_t, so can be enabled unconditionally now that char_traits is always available. libstdc++-v3/ChangeLog: PR libstdc++/98725 * include/ext/rc_string_base.h [!_GLIBCXX_USE_WCHAR_T] (__rc_string_base): Defin

[PATCH 5/8] libstdc++: Enable type traits for wchar_t unconditionally [PR98725]

2021-10-08 Thread Jonathan Wakely via Gcc-patches
None of these traits depend on libc support for wchar_t, so they should be defined unconditionally. The wchar_t type is always defined in C++. libstdc++-v3/ChangeLog: PR libstdc++/98725 * include/c_global/cstddef [!_GLIBCXX_USE_WCHAR_T] (__byte_operand): Define specializat

[PATCH 3/8] libstdc++: Always define typedefs and hash functions for wide strings [PR 98725]

2021-10-08 Thread Jonathan Wakely via Gcc-patches
The wstring and wstring_view typedefs should be enabled even if isn't supported, because char_traits works unconditionally. Similarly, the std::hash specializations for wide strings do not depend on support. Although the primary template works OK for std::char_traits in the absence of support,

[PATCH 2/8] libstdc++: Move test that depends on wchar_t I/O to wchar_t sub-directory

2021-10-08 Thread Jonathan Wakely via Gcc-patches
This fixes a FAIL when --disable-wchar_t is used. libstdc++-v3/ChangeLog: * testsuite/27_io/basic_filebuf/close/81256.cc: Moved to... * testsuite/27_io/basic_filebuf/close/wchar_t/81256.cc: ...here. --- .../testsuite/27_io/basic_filebuf/close/{ => wchar_t}/81256.cc| 0 1 file

[committed 1/8] libstdc++: Add missing _GLIBCXX_USE_WCHAR_T checks in testsuite

2021-10-08 Thread Jonathan Wakely via Gcc-patches
These tests fail for a --disable-wchar_t build. Tested powerpc64le-linux and x86_64-linux, including a --disable-wchar_t build. Pushed to trunk. libstdc++-v3/ChangeLog: * testsuite/22_locale/conversions/buffer/1.cc: Check _GLIBCXX_USE_WCHAR_T. * testsuite/22_locale/conver

[PATCH 6/8] libstdc++: Define std::wstring_convert unconditionally [PR 98725]

2021-10-08 Thread Jonathan Wakely via Gcc-patches
The wchar_t type is defined unconditionally for C++, so there is no reason for std::wstring_convert and std::wbuffer_convert to be disabled when is not usable. It should be possible to use those class templates with char16_t and char32_t even if wchar_t conversions don't work. libstdc++-v3/Change

[PATCH 7/8] libstdc++: Define deleted wchar_t overloads unconditionally [PR 98725]

2021-10-08 Thread Jonathan Wakely via Gcc-patches
We don't need to have support in order to delete overloads for inserting wide characters into narrow streams. libstdc++-v3/ChangeLog: PR libstdc++/98725 * include/std/ostream (operator<<(basic_ostream&, wchar_t)) (operator<<(basic_ostream&, const wchar_t*)): Always

[PATCH 8/8] libstdc++: Remove unnecessary uses of _GLIBCXX_USE_WCHAR_T in testsuite [PR98725]

2021-10-08 Thread Jonathan Wakely via Gcc-patches
Now that std::wstring and other specializations for wchar_t are defined unconditionally, many checks for _GLIBCXX_USE_WCHAR_T in the testsuite are unnecessary and can be removed. Tests for iostreams, locales, regex and filesystem::path still need to be guarded by _GLIBCXX_USE_WCHAR_T because those

Re: [PATCH] Refine movhfcc.

2021-10-08 Thread Hongtao Liu via Gcc-patches
On Fri, Oct 8, 2021 at 5:31 PM liuhongt wrote: > > For AVX512-FP16, HFmode only supports vcmpsh whose dest is mask > register, so for movhfcc, it's > > vcmpsh op2, op1, %k1 > vmovsh op1, op2{%k1} > mov op2, dest > > gcc/ChangeLog: > > PR target/102639 > * config/i386/i386-expand.c

Re: [r12-4240 Regression] FAIL: libgomp.c++/scan-9.C scan-tree-dump-times vect "vectorized [2-6] loops" 2 on Linux/x86_64

2021-10-08 Thread Hongtao Liu via Gcc-patches
On Fri, Oct 8, 2021 at 8:02 PM sunil.k.pandey via Gcc-patches wrote: > > On Linux/x86_64, > > 2b8453c401b699ed93c085d0413ab4b5030bcdb8 is the first bad commit > commit 2b8453c401b699ed93c085d0413ab4b5030bcdb8 > Author: liuhongt > Date: Mon Sep 6 13:48:49 2021 +0800 > > Enable auto-vectoriza

Re: [r12-4240 Regression] FAIL: libgomp.c++/scan-9.C scan-tree-dump-times vect "vectorized [2-6] loops" 2 on Linux/x86_64

2021-10-08 Thread Hongtao Liu via Gcc-patches
On Sat, Oct 9, 2021 at 1:27 AM sunil.k.pandey via Gcc-patches wrote: > > On Linux/x86_64, > > 2b8453c401b699ed93c085d0413ab4b5030bcdb8 is the first bad commit > commit 2b8453c401b699ed93c085d0413ab4b5030bcdb8 > Author: liuhongt > Date: Mon Sep 6 13:48:49 2021 +0800 > > Enable auto-vectoriza

Re: [r12-4240 Regression] FAIL: libgomp.c++/scan-9.C scan-tree-dump-times vect "vectorized [2-6] loops" 2 on Linux/x86_64

2021-10-08 Thread Hongtao Liu via Gcc-patches
On Sat, Oct 9, 2021 at 10:53 AM Hongtao Liu wrote: > > On Sat, Oct 9, 2021 at 1:27 AM sunil.k.pandey via Gcc-patches > wrote: > > > > On Linux/x86_64, > > > > 2b8453c401b699ed93c085d0413ab4b5030bcdb8 is the first bad commit > > commit 2b8453c401b699ed93c085d0413ab4b5030bcdb8 > > Author: liuhongt

Re: [PATCH] var-tracking: Fix a wrong-debug issue caused by my r10-7665 var-tracking change [PR102441]

2021-10-08 Thread Alexandre Oliva via Gcc-patches
Hello, Jakub, On Oct 4, 2021, Jakub Jelinek wrote: > Finally, patch2, the shortest patch, uses MO_VAL_SET whenever destination > is not sp and otherwise drops the micro-operation on the floor. That sounds quite reasonable to me, and it is indeed my favorite of the 3 proposed patches, because t

[PATCH] hardened conditionals

2021-10-08 Thread Alexandre Oliva via Gcc-patches
This patch introduces optional passes to harden conditionals used in branches, and in computing boolean expressions, by adding redundant tests of the reversed conditions, and trapping in case of unexpected results. Though in abstract machines the redundant tests should never fail, CPUs may be le

Re: [RFC] Don't move cold code out of loop by checking bb count

2021-10-08 Thread Xionghu Luo via Gcc-patches
Hi, On 2021/9/28 20:09, Richard Biener wrote: > On Fri, Sep 24, 2021 at 8:29 AM Xionghu Luo wrote: >> >> Update the patch to v3, not sure whether you prefer the paste style >> and continue to link the previous thread as Segher dislikes this... >> >> >> [PATCH v3] Don't move cold code out of loop

[PATCH] Adjust more testcases for O2 vectorization enabling.

2021-10-08 Thread liuhongt via Gcc-patches
Pushed to trunk. libgomp/ChangeLog: * testsuite/libgomp.c++/scan-10.C: Add option -fvect-cost-model=cheap. * testsuite/libgomp.c++/scan-11.C: Ditto. * testsuite/libgomp.c++/scan-12.C: Ditto. * testsuite/libgomp.c++/scan-13.C: Ditto. * testsuite/libgomp.c++/

Re: [PATCH] hardened conditionals

2021-10-08 Thread Richard Biener via Gcc-patches
On October 9, 2021 5:30:04 AM GMT+02:00, Alexandre Oliva via Gcc-patches wrote: > >This patch introduces optional passes to harden conditionals used in >branches, and in computing boolean expressions, by adding redundant >tests of the reversed conditions, and trapping in case of unexpected >resul