Re: [PATCH] rs6000/test: Adjust some cases due to O2 vect [PR102658]

2021-10-12 Thread Hongtao Liu via Gcc-patches
On Tue, Oct 12, 2021 at 11:49 PM Martin Sebor wrote: > > On 10/11/21 8:31 PM, Hongtao Liu wrote: > > On Tue, Oct 12, 2021 at 4:08 AM Martin Sebor via Gcc-patches > > wrote: > >> > >> On 10/11/21 11:43 AM, Segher Boessenkool wrote: > >>> On Mon, Oct 11, 2021 at 10:23:03AM -0600, Martin Sebor

Re: [PATCH] rs6000: Remove builtin mask check from builtin_decl [PR102347]

2021-10-12 Thread Kewen.Lin via Gcc-patches
Hi Bill! on 2021/10/13 上午12:36, Bill Schmidt wrote: > Hi Kewen, > > On 10/11/21 1:30 AM, Kewen.Lin wrote: >> Hi Segher, >> >> Thanks for the comments. >> >> on 2021/10/1 上午6:13, Segher Boessenkool wrote: >>> Hi! >>> >>> On Thu, Sep 30, 2021 at 11:06:50AM +0800, Kewen.Lin wrote: >>> >>> [ huge

PING^3 [PATCH] rs6000: Fix some issues in rs6000_can_inline_p [PR102059]

2021-10-12 Thread Kewen.Lin via Gcc-patches
Hi, Gentle ping this patch: https://gcc.gnu.org/pipermail/gcc-patches/2021-September/578552.html One related patch [1] is ready to commit, whose test cases rely on this patch if no changes are applied to them. [1] https://gcc.gnu.org/pipermail/gcc-patches/2021-September/579658.html BR, Kewen

PING^1 [PATCH v2] rs6000: Modify the way for extra penalized cost

2021-10-12 Thread Kewen.Lin via Gcc-patches
Hi, Gentle ping this: https://gcc.gnu.org/pipermail/gcc-patches/2021-September/580358.html BR, Kewen on 2021/9/28 下午4:16, Kewen.Lin via Gcc-patches wrote: > Hi, > > This patch follows the discussions here[1][2], where Segher > pointed out the existing way to guard the extra penalized > cost

PING^4 [PATCH v2] combine: Tweak the condition of last_set invalidation

2021-10-12 Thread Kewen.Lin via Gcc-patches
Hi, Gentle ping this: https://gcc.gnu.org/pipermail/gcc-patches/2021-June/572555.html BR, Kewen >>> on 2021/6/11 下午9:16, Kewen.Lin via Gcc-patches wrote: Hi Segher, Thanks for the review! on 2021/6/10 上午4:17, Segher Boessenkool wrote: > Hi! > > On Wed, Dec

[PATCH] Adjust testcase for O2 vectorization[Wuninitialized]

2021-10-12 Thread liuhongt via Gcc-patches
As discussed in PR. It looks like it's just the the location of the warning that's off, the warning itself is still issued but it's swallowed by the dg-prune-output directive. Since the test was added to verify the fix for an ICE without vectorization I think disabling vectorization should be

Re: [PATCH] libgccjit: add some reflection functions in the jit C api

2021-10-12 Thread Antoni Boucher via Gcc-patches
David: PING Le lundi 27 septembre 2021 à 20:53 -0400, Antoni Boucher a écrit : > I fixed an issue (it would show an error message when > gcc_jit_type_dyncast_function_ptr_type was called on a type different > than a function pointer type). > > Here's the updated patch. > > Le vendredi 18 juin

Re: Ping ^ 2: [PATCH] rs6000: Remove unspecs for vec_mrghl[bhw]

2021-10-12 Thread Xionghu Luo via Gcc-patches
Thanks David, On 2021/10/13 06:51, David Edelsohn wrote: > Hi, Xionghu > > What's the status of the \M and \m testcase beautification requested > by Segher? Did you send an updated patch? Your messages ping the > version prior to Segher's additional comments. The pinged link already answered

[PATCH v2] rs6000: Remove unspecs for vec_mrghl[bhw]

2021-10-12 Thread Xionghu Luo via Gcc-patches
Resend this patch. Previous discussion is: https://gcc.gnu.org/pipermail/gcc-patches/2021-June/572330.html vmrghb only accepts permute index {0, 16, 1, 17, 2, 18, 3, 19, 4, 20, 5, 21, 6, 22, 7, 23} no matter for BE or LE in ISA, similarly for vmrglb. Remove

Re: [PATCH] check to see if null pointer is dereferenceable [PR102630]

2021-10-12 Thread Martin Sebor via Gcc-patches
On 10/11/21 6:26 PM, Joseph Myers wrote: The testcase uses the __seg_fs address space, which is x86-specific, but it isn't in an x86-specific directory or otherwise restricted to x86 targets; thus, I'd expect it to fail for other architectures. This is not a review of the rest of the patch.

Re: [PATCH] Warray-bounds: Warn only for generic address spaces

2021-10-12 Thread Siddhesh Poyarekar
On 10/13/21 00:36, Martin Sebor wrote: On 10/12/21 12:33 PM, Siddhesh Poyarekar wrote: The warning is falsely triggered for THREAD_SELF in glibc when accessing TCB through the segment register. Thanks for looking into it!  The Glibc warning is being tracked in PR 102630.  The root cause

[committed] c-family: Support format checking C2X %b, %B formats

2021-10-12 Thread Joseph Myers
C2X adds a %b printf format to print integers in binary (analogous to %x, including %#b printing a leading 0b on nonzero integers), with recommended practice for a corresponding %B (where %#B uses 0B instead of 0b) where that doesn't conflict with existing implementation extensions. See N2630 for

[RFC][patch][PR102281]Clear padding for variables that are in registers

2021-10-12 Thread Qing Zhao via Gcc-patches
Hi, PR10228 1https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102281 Exposed an issue in the current implementation of the padding initialization of -ftrivial-auto-var-init. Currently, we add __builtin_clear_padding call _AFTER_ every explicit initialization of an auto variable: var_decl =

Re: Ping ^ 2: [PATCH] rs6000: Remove unspecs for vec_mrghl[bhw]

2021-10-12 Thread David Edelsohn via Gcc-patches
Hi, Xionghu What's the status of the \M and \m testcase beautification requested by Segher? Did you send an updated patch? Your messages ping the version prior to Segher's additional comments. It seems that the changes to the patterns are complete, but there are remaining questions about the

Re: [PATCH] rs6000: Fix vec_cpsgn parameter order (PR101985)

2021-10-12 Thread Bill Schmidt via Gcc-patches
Hi! On 10/12/21 4:37 PM, Segher Boessenkool wrote: > On Fri, Sep 24, 2021 at 10:20:46AM -0500, Bill Schmidt wrote: >> --- /dev/null >> +++ b/gcc/testsuite/gcc.target/powerpc/pr101985-1.c >> @@ -0,0 +1,18 @@ >> +/* PR target/101985 */ >> +/* { dg-do run } */ >> +/* { dg-require-effective-target

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

2021-10-12 Thread Segher Boessenkool
On Tue, Oct 12, 2021 at 02:35:57PM -0500, Paul A. Clarke wrote: > You asked for it. ;-) Boiled down to remove macroisms and code that > should be removed by optimization: Thanks :-) > static __inline __attribute__ ((__always_inline__)) void > libc_feholdsetround_ppc_ctx (struct rm_ctx *ctx, int

Re: [PATCH] rs6000: Fix vec_cpsgn parameter order (PR101985)

2021-10-12 Thread Segher Boessenkool
On Fri, Sep 24, 2021 at 10:20:46AM -0500, Bill Schmidt wrote: > --- /dev/null > +++ b/gcc/testsuite/gcc.target/powerpc/pr101985-1.c > @@ -0,0 +1,18 @@ > +/* PR target/101985 */ > +/* { dg-do run } */ > +/* { dg-require-effective-target vsx_hw } */ > +/* { dg-options "-O2" } */ If you need vsx_hw

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

2021-10-12 Thread Eric Gallager via Gcc-patches
On Thu, Oct 6, 2016 at 10:41 AM Eric Gallager wrote: > > Currently the build machinery handles install-pdf and install-html > targets, but no install-dvi target. This patch is a step towards > fixing that. Note that I have only tested with > --enable-languages=c,c++,lto,objc,obj-c++. Thus, target

Re: [PATCH] Allow `make tags` to work from top-level directory

2021-10-12 Thread Eric Gallager via Gcc-patches
On Tue, Oct 12, 2021 at 3:56 PM Eric Gallager wrote: > > On Tue, Oct 12, 2021 at 9:18 AM Jeff Law wrote: > > > > > > > > On 10/11/2021 4:05 PM, Eric Gallager via Gcc-patches wrote: > > > On Thu, Oct 13, 2016 at 4:43 PM Eric Gallager > > > wrote: > > >> On 10/13/16, Jeff Law wrote: > > >>> On

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

2021-10-12 Thread Luís Ferreira via Gcc-patches
On Tue, 2021-10-12 at 15:40 -0400, Eric Gallager wrote: > On Tue, Oct 12, 2021 at 8:55 AM Luís Ferreira > wrote: > > > > On Fri, 2021-10-08 at 22:11 +0200, Iain Buclaw wrote: > > > Excerpts from Luís Ferreira's message of October 8, 2021 7:08 pm: > > > > On Fri, 2021-10-08 at 18:52 +0200, Iain

Re: [PATCH] Allow `make tags` to work from top-level directory

2021-10-12 Thread Eric Gallager via Gcc-patches
On Tue, Oct 12, 2021 at 9:18 AM Jeff Law wrote: > > > > On 10/11/2021 4:05 PM, Eric Gallager via Gcc-patches wrote: > > On Thu, Oct 13, 2016 at 4:43 PM Eric Gallager wrote: > >> On 10/13/16, Jeff Law wrote: > >>> On 10/06/2016 07:21 AM, Eric Gallager wrote: > The libdecnumber, libgcc, and

[PATCH v2] detect out-of-bounds stores by atomic functions [PR102453]

2021-10-12 Thread Martin Sebor via Gcc-patches
On 10/12/21 12:52 AM, Richard Biener wrote: On Mon, Oct 11, 2021 at 11:25 PM Martin Sebor wrote: The attached change extends GCC's warnings for out-of-bounds stores to cover atomic (and __sync) built-ins. Rather than hardcoding the properties of these built-ins just for the sake of the

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

2021-10-12 Thread Eric Gallager via Gcc-patches
On Tue, Oct 12, 2021 at 8:55 AM Luís Ferreira wrote: > > On Fri, 2021-10-08 at 22:11 +0200, Iain Buclaw wrote: > > 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

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

2021-10-12 Thread Paul A. Clarke via Gcc-patches
On Mon, Oct 11, 2021 at 05:04:12PM -0500, Segher Boessenkool wrote: > On Mon, Oct 11, 2021 at 12:31:07PM -0500, Paul A. Clarke wrote: > > On Mon, Oct 11, 2021 at 11:28:39AM -0500, Segher Boessenkool wrote: > > > > Very similar methods are used in glibc today. Are those broken? > > > > > > Maybe.

Re: [PATCH] Warray-bounds: Warn only for generic address spaces

2021-10-12 Thread Martin Sebor via Gcc-patches
On 10/12/21 12:33 PM, Siddhesh Poyarekar wrote: The warning is falsely triggered for THREAD_SELF in glibc when accessing TCB through the segment register. Thanks for looking into it! The Glibc warning is being tracked in PR 102630. The root cause behind it is in compute_objsize_r in

Re: [PATCH] rs6000: Fix vec_cpsgn parameter order (PR101985)

2021-10-12 Thread David Edelsohn via Gcc-patches
On Fri, Sep 24, 2021 at 11:20 AM Bill Schmidt wrote: > > Hi! > > This fixes a bug reported in > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101985. > > The vec_cpsgn built-in function API differs in argument order from the > copysign3 convention. Currently that pattern is incorrectly used to >

[PATCH] Warray-bounds: Warn only for generic address spaces

2021-10-12 Thread Siddhesh Poyarekar
The warning is falsely triggered for THREAD_SELF in glibc when accessing TCB through the segment register. gcc/ChangeLog: * gimple-array-bounds.cc (array_bounds_checker::check_mem_ref): Bail out for non-generic address spaces. gcc/testsuite/ChangeLog: *

Re: [PATCH] rs6000/test: Adjust some cases due to O2 vect [PR102658]

2021-10-12 Thread Segher Boessenkool
On Mon, Oct 11, 2021 at 02:07:49PM -0600, Martin Sebor wrote: > On 10/11/21 11:43 AM, Segher Boessenkool wrote: > >I also am okay with this. If it was decided x86 does not have to deal > >with these (generic!) problems, then why should we do other people's > >work? > > I don't know that anything

Re: [PATCH] rs6000/test: Adjust some cases due to O2 vect [PR102658]

2021-10-12 Thread Segher Boessenkool
On Tue, Oct 12, 2021 at 11:15:51AM -0600, Martin Sebor wrote: > On 10/12/21 10:18 AM, Segher Boessenkool wrote: > >On Tue, Oct 12, 2021 at 09:49:19AM -0600, Martin Sebor wrote: > >>Coming back to the xfail conditionals, do you think you'll > >>be able to put together some target-supports magic so

Re: [PATCH] rs6000/test: Adjust some cases due to O2 vect [PR102658]

2021-10-12 Thread Jeff Law via Gcc-patches
On 10/12/2021 11:15 AM, Martin Sebor via Gcc-patches wrote: On 10/12/21 10:18 AM, Segher Boessenkool wrote: Hi! On Tue, Oct 12, 2021 at 09:49:19AM -0600, Martin Sebor wrote: Coming back to the xfail conditionals, do you think you'll be able to put together some target-supports magic so

Re: [PATCH] rs6000/test: Adjust some cases due to O2 vect [PR102658]

2021-10-12 Thread Martin Sebor via Gcc-patches
On 10/12/21 10:18 AM, Segher Boessenkool wrote: Hi! On Tue, Oct 12, 2021 at 09:49:19AM -0600, Martin Sebor wrote: Coming back to the xfail conditionals, do you think you'll be able to put together some target-supports magic so they don't have to enumerate all the affected targets? There

Re: [PATCH] libiberty: d-demangle: rename function symbols to be more consistent

2021-10-12 Thread Luís Ferreira
On Mon, 2021-10-04 at 09:30 +0200, Iain Buclaw wrote: > > On 30/09/2021 02:48 Luís Ferreira wrote: > > > >   > > There is some function names with `dlang_parse_` prefix and some > > with only > > `dlang_` prefix that does parsing. The same happens with > > `dlang_decode_`. > > > > To make

[PATCH v2] libiberty: d-demangle: rename function symbols to be more consistent

2021-10-12 Thread Luís Ferreira
There is some function names with `dlang_parse_` prefix and some with only `dlang_` prefix that does parsing. The same happens with `dlang_decode_`. To make things a bit more consistent and easier to understand, this patch adds the missing prefix, according to the functions signatures.

[arm] Fix MVE addressing modes for VLDR[BHW] and VSTR[BHW]

2021-10-12 Thread Andre Vieira (lists) via Gcc-patches
Hi, The way we were previously dealing with addressing modes for MVE was preventing the use of pre, post and offset addressing modes for the normal loads and stores, including widening and narrowing.  This patch fixes that and adds tests to ensure we are capable of using all the available

RE: [PATCH 4/7]AArch64 Add pattern xtn+xtn2 to uzp2

2021-10-12 Thread Kyrylo Tkachov via Gcc-patches
> -Original Message- > From: Tamar Christina > Sent: Tuesday, October 12, 2021 5:25 PM > To: Kyrylo Tkachov ; gcc-patches@gcc.gnu.org > Cc: nd ; Richard Earnshaw ; > Marcus Shawcroft ; Richard Sandiford > > Subject: RE: [PATCH 4/7]AArch64 Add pattern xtn+xtn2 to uzp2 > > Hi All, > >

Re: [PATCH] include/longlong.h: Remove incorrect lvalue to rvalue conversion from asm output constraints

2021-10-12 Thread Jakub Jelinek via Gcc-patches
On Tue, Oct 12, 2021 at 09:21:21AM -0700, Fāng-ruì Sòng wrote: > > > An output constraint takes a lvalue. While GCC happily strips the > > > incorrect lvalue to rvalue conversion, Clang rejects the code by default: > > > > > > error: invalid use of a cast in a inline asm context requiring an

RE: [PATCH 2/7]AArch64 Add combine patterns for narrowing shift of half top bits (shuffle)

2021-10-12 Thread Kyrylo Tkachov via Gcc-patches
> -Original Message- > From: Tamar Christina > Sent: Tuesday, October 12, 2021 5:23 PM > To: Kyrylo Tkachov ; gcc-patches@gcc.gnu.org > Cc: nd ; Richard Earnshaw ; > Marcus Shawcroft ; Richard Sandiford > > Subject: RE: [PATCH 2/7]AArch64 Add combine patterns for narrowing shift > of

Re: [PATCH] rs6000: Remove builtin mask check from builtin_decl [PR102347]

2021-10-12 Thread Bill Schmidt via Gcc-patches
Hi Kewen, On 10/11/21 1:30 AM, Kewen.Lin wrote: > Hi Segher, > > Thanks for the comments. > > on 2021/10/1 上午6:13, Segher Boessenkool wrote: >> Hi! >> >> On Thu, Sep 30, 2021 at 11:06:50AM +0800, Kewen.Lin wrote: >> >> [ huge snip ] >> >>> Based on the understanding and testing, I think it's safe

RE: [PATCH 1/7]AArch64 Add combine patterns for right shift and narrow

2021-10-12 Thread Kyrylo Tkachov via Gcc-patches
> -Original Message- > From: Tamar Christina > Sent: Tuesday, October 12, 2021 5:18 PM > To: Richard Sandiford ; Kyrylo Tkachov > > Cc: gcc-patches@gcc.gnu.org; nd ; Richard Earnshaw > ; Marcus Shawcroft > > Subject: RE: [PATCH 1/7]AArch64 Add combine patterns for right shift and >

RE: [PATCH 4/7]AArch64 Add pattern xtn+xtn2 to uzp2

2021-10-12 Thread Tamar Christina via Gcc-patches
Hi All, This is a new version with BE support and more tests. Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. Ok for master? Thanks, Tamar gcc/ChangeLog: * config/aarch64/aarch64-simd.md (*aarch64_narrow_trunc_le): (*aarch64_narrow_trunc_be): New. *

[PATCH] i386: Improve workaround for PR82524 LRA limitation [PR85730]

2021-10-12 Thread Uros Bizjak via Gcc-patches
As explained in PR82524, LRA is not able to reload strict_low_part inout operand with matched input operand. The patch introduces a workaround, where we allow LRA to generate an instruction with non-matched input operand which is split post reload to an instruction that inserts non-matched input

RE: [PATCH 2/7]AArch64 Add combine patterns for narrowing shift of half top bits (shuffle)

2021-10-12 Thread Tamar Christina via Gcc-patches
Hi All, This is a new version with more tests and BE support. Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. Ok for master? Thanks, Tamar gcc/ChangeLog: * config/aarch64/aarch64-simd.md (*aarch64_topbits_shuffle_le): New.

Re: [PATCH] include/longlong.h: Remove incorrect lvalue to rvalue conversion from asm output constraints

2021-10-12 Thread Fāng-ruì Sòng via Gcc-patches
On Sun, Oct 10, 2021 at 10:03 PM Florian Weimer wrote: > > * Fangrui Song: > > > An output constraint takes a lvalue. While GCC happily strips the > > incorrect lvalue to rvalue conversion, Clang rejects the code by default: > > > > error: invalid use of a cast in a inline asm context

Re: [PATCH] rs6000/test: Adjust some cases due to O2 vect [PR102658]

2021-10-12 Thread Segher Boessenkool
Hi! On Tue, Oct 12, 2021 at 09:49:19AM -0600, Martin Sebor wrote: > Coming back to the xfail conditionals, do you think you'll > be able to put together some target-supports magic so they > don't have to enumerate all the affected targets? There should only be an xfail if we do not expect to be

RE: [PATCH 3/7]AArch64 Add pattern for sshr to cmlt

2021-10-12 Thread Tamar Christina via Gcc-patches
Thanks, Just archiving a version with more tests as requested. I will assume the OK still stands. Regards, Tamar > -Original Message- > From: Kyrylo Tkachov > Sent: Tuesday, October 12, 2021 1:19 PM > To: Andrew Pinski > Cc: Tamar Christina ; gcc-patches@gcc.gnu.org; >

RE: [PATCH 1/7]AArch64 Add combine patterns for right shift and narrow

2021-10-12 Thread Tamar Christina via Gcc-patches
Hi All, Here's a new version with big-endian support and more tests > > > > I think this needs to be guarded on !BYTES_BIG_ENDIAN and a similar > pattern added for BYTES_BIG_ENDIAN with the vec_concat operands > swapped around. > > This is similar to the aarch64_xtn2_insn_be pattern, for

[committed] libstdc++: Fix test that fails for C++20

2021-10-12 Thread Jonathan Wakely via Gcc-patches
Also restore the test for 'a < a' that was removed by r12-2537 because it is ill-formed. We still want to test operator< for tuple, we just need to not use std::nullptr_t in that tuple type. libstdc++-v3/ChangeLog: * testsuite/20_util/tuple/comparison_operators/overloaded.cc:

[committed] libstdc++: Fix move construction of std::tuple with array elements [PR101960]

2021-10-12 Thread Jonathan Wakely via Gcc-patches
The r12-3022 commit only fixed the case where an array is the last element of the tuple. This fixes the other cases too. We can just define the move constructor as defaulted, which does the right thing. Changing the move constructor to be trivial would be an ABI break, but since the last base

[committed] libstdc++: Improve diagnostics for misuses of output iterators

2021-10-12 Thread Jonathan Wakely via Gcc-patches
This adds deleted overloads so that the errors for invalid uses of std::advance and std::distance are easier to understand (see for example PR 102181). libstdc++-v3/ChangeLog: * include/bits/stl_iterator_base_funcs.h (__advance): Add deleted overload to improve diagnostics.

Re: [PATCH] rs6000/test: Adjust some cases due to O2 vect [PR102658]

2021-10-12 Thread Martin Sebor via Gcc-patches
On 10/11/21 8:31 PM, Hongtao Liu wrote: On Tue, Oct 12, 2021 at 4:08 AM Martin Sebor via Gcc-patches wrote: On 10/11/21 11:43 AM, Segher Boessenkool wrote: On Mon, Oct 11, 2021 at 10:23:03AM -0600, Martin Sebor wrote: On 10/11/21 9:30 AM, Segher Boessenkool wrote: On Mon, Oct 11, 2021 at

Re: [PATCH 2/8] tree-dynamic-object-size: New pass

2021-10-12 Thread Siddhesh Poyarekar
On 10/12/21 19:28, Jakub Jelinek wrote: On Fri, Oct 08, 2021 at 03:44:26AM +0530, Siddhesh Poyarekar wrote: A new pass is added to execute just before the tree-object-size pass to recognize and simplify __builtin_dynamic_object_size. Some key ideas (such as multipass object size collection to

Re: [PATCH v2] libiberty: d-demangle: remove parenthesis where it is not needed

2021-10-12 Thread Luís Ferreira
On Tue, 2021-10-12 at 08:42 -0600, Jeff Law wrote: >   >   > On 10/12/2021 8:06 AM, Luís Ferreira wrote: >   > > Those parenthesis doesn't increase readability at all and this > > patch makes the > > source code a bit more consistent with the rest of the > > dereferencing > > assignments. > > > >

[PATCH] [og11] nvptx: Revert "[nvptx] Expand OpenACC child function arguments to use CUDA params space"

2021-10-12 Thread Julian Brown
This reverts commit 31e53aef12f574a8534f8aea219b5466edb75b32. Re-measuring the effect of this patch across a set of benchmarks shows that it appears to have an overall slightly negative effect on performance. Thus, we are reverting it. --- gcc/ChangeLog.omp | 11 ++

[PATCH v2] libiberty: d-demangle: use appendc for single chars append

2021-10-12 Thread Luís Ferreira
This may be optimized by some modern smart compilers inliner, but since strlen can be an external source, this can produce slightly more unoptimized code. ChangeLog: libiberty/ * d-demangle.c (string_appendc): Add function to append single chars. * d-demangle.c: Rewrite usage of

Re: [PATCH] options: Fix variable tracking option processing.

2021-10-12 Thread Martin Liška
On 10/11/21 15:45, Richard Biener wrote: Btw, I'd be more comfortable when the move of the code would be independent of the adjustment to not rely on AUTODETECT_VALUE. Can we do the latter change first (IIRC the former one failed already)? All right, so I'm doing the first step by eliminating

Re: [PATCH] Fix handling of flag_rename_registers.

2021-10-12 Thread Martin Liška
On 10/12/21 15:37, Richard Biener wrote: by adding EnabledBy(funroll-loops) to the respective options instead (and funroll-loops EnabledBy(funroll-all-loops)) All right, so the suggested approach works correctly. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to

Re: [PATCH] doc: Fix typos in alloc_size documentation

2021-10-12 Thread Jeff Law via Gcc-patches
On 10/9/2021 3:59 AM, Daniel Le Duc Khoi Nguyen via Gcc-patches wrote: 2021-10-09 Daniel Le * doc/extend.texi (Common Variable Attributes): Fix typos in alloc_size documentation. Thanks.  I've installed this on the trunk. jeff

Re: [PATCH v2] libiberty: d-demangle: remove parenthesis where it is not needed

2021-10-12 Thread Jeff Law via Gcc-patches
On 10/12/2021 8:06 AM, Luís Ferreira wrote: Those parenthesis doesn't increase readability at all and this patch makes the source code a bit more consistent with the rest of the dereferencing assignments. ChangeLog: libiberty/ * d-demangle.c (dlang_parse_qualified): Remove redudant

Re: [PATCH 1/8] __builtin_dynamic_object_size: Recognize builtin name

2021-10-12 Thread Siddhesh Poyarekar
On 10/12/21 19:12, Jakub Jelinek wrote: On Fri, Oct 08, 2021 at 03:44:25AM +0530, Siddhesh Poyarekar wrote: --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -180,6 +180,7 @@ static rtx expand_builtin_memory_chk (tree, rtx, machine_mode, static void maybe_emit_chk_warning (tree, enum

Re: [PATCH] libiberty: d-demangle: remove parenthesis where it is not needed

2021-10-12 Thread Luís Ferreira
On Mon, 2021-10-04 at 09:33 +0200, ibuc...@gdcproject.org wrote: > > On 29/09/2021 18:26 Luís Ferreira wrote: > > > >   > > Those parenthesis doesn't increase readability at all and this > > patch makes the > > source code a bit more consistent with the rest of the > > dereferencing > >

Re: [PATCH] libiberty: d-demangle: remove parenthesis where it is not needed

2021-10-12 Thread Luís Ferreira
On Mon, 2021-10-04 at 10:40 +0200, Andreas Schwab wrote: > On Sep 29 2021, Luís Ferreira wrote: > > > diff --git a/libiberty/d-demangle.c b/libiberty/d-demangle.c > > index 3adf7b562d1..a05e72d8efe 100644 > > --- a/libiberty/d-demangle.c > > +++ b/libiberty/d-demangle.c > > @@ -253,15 +253,15 @@

Re: [PATCH] Fix handling of flag_rename_registers.

2021-10-12 Thread Martin Liška
On 10/12/21 15:37, Richard Biener wrote: On Tue, Oct 12, 2021 at 2:18 PM Martin Liška wrote: Hello. The option is disabled in rs6000 target with: { OPT_LEVELS_ALL, OPT_frename_registers, NULL, 0 }, Thus, we have to do an auto-detection only if it's really unset and also equal to the

Re: [PATCH 2/8] tree-dynamic-object-size: New pass

2021-10-12 Thread Jakub Jelinek via Gcc-patches
On Fri, Oct 08, 2021 at 03:44:26AM +0530, Siddhesh Poyarekar wrote: > A new pass is added to execute just before the tree-object-size pass > to recognize and simplify __builtin_dynamic_object_size. Some key > ideas (such as multipass object size collection to detect reference > loops) have been

Re: Ping^1 [PATCH, rs6000] optimization for vec_reve builtin [PR100868]

2021-10-12 Thread Bill Schmidt via Gcc-patches
Hi Hao Chen, On 10/11/21 12:32 AM, HAO CHEN GUI wrote: > Hi, > > Gentle ping this: > > https://gcc.gnu.org/pipermail/gcc-patches/2021-September/579038.html > > Thanks > > On 8/9/2021 下午 2:42, HAO CHEN GUI wrote: >> Hi, >> >>   The patch optimized for vec_reve builtin on rs6000. For V2DI and

Re: [PATCH, rs6000] Optimization for vec_xl_sext

2021-10-12 Thread Bill Schmidt via Gcc-patches
Hi Hao Chen, On 9/15/21 2:35 AM, HAO CHEN GUI wrote: > Bill, > >     Yes, I built the gcc with p10 binutils. Then power10_ok tests can pass. > Thanks again for your kindly explanation. > >     I finally realized that the line wrap settings on my thunderbird didn't > take any effect. I have to

Re: [PATCH 1/8] __builtin_dynamic_object_size: Recognize builtin name

2021-10-12 Thread Jakub Jelinek via Gcc-patches
On Fri, Oct 08, 2021 at 03:44:25AM +0530, Siddhesh Poyarekar wrote: > --- a/gcc/builtins.c > +++ b/gcc/builtins.c > @@ -180,6 +180,7 @@ static rtx expand_builtin_memory_chk (tree, rtx, > machine_mode, > static void maybe_emit_chk_warning (tree, enum built_in_function); > static void

Re: [PATCH] Fix handling of flag_rename_registers.

2021-10-12 Thread Richard Biener via Gcc-patches
On Tue, Oct 12, 2021 at 2:18 PM Martin Liška wrote: > > Hello. > > The option is disabled in rs6000 target with: > > { OPT_LEVELS_ALL, OPT_frename_registers, NULL, 0 }, > > Thus, we have to do an auto-detection only if it's really unset and also > equal to the Init value. > > Patch can

Re: [PATCH] Allow `make tags` to work from top-level directory

2021-10-12 Thread Jeff Law via Gcc-patches
On 10/11/2021 4:05 PM, Eric Gallager via Gcc-patches wrote: On Thu, Oct 13, 2016 at 4:43 PM Eric Gallager wrote: On 10/13/16, Jeff Law wrote: On 10/06/2016 07:21 AM, Eric Gallager wrote: The libdecnumber, libgcc, and libobjc subdirectories are missing TAGS targets in their Makefiles. The

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

2021-10-12 Thread Luís Ferreira
On Fri, 2021-10-08 at 22:11 +0200, Iain Buclaw wrote: > 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,

Re: [PATCH] hardened conditionals

2021-10-12 Thread Richard Biener via Gcc-patches
On Tue, Oct 12, 2021 at 8:35 AM Alexandre Oliva wrote: > > On Oct 9, 2021, Richard Biener wrote: > > > Why two passes (and two IL traverses?) > > Different traversals, no reason to force them into a single pass. One > only looks at the last stmt of each block, where cond stmts may be, > while

RE: [PATCH 3/7]AArch64 Add pattern for sshr to cmlt

2021-10-12 Thread Kyrylo Tkachov via Gcc-patches
> -Original Message- > From: Andrew Pinski > Sent: Monday, October 11, 2021 8:56 PM > To: Kyrylo Tkachov > Cc: Tamar Christina ; gcc-patches@gcc.gnu.org; > apin...@marvell.com; Richard Earnshaw ; nd > ; Marcus Shawcroft ; Richard > Sandiford > Subject: Re: [PATCH 3/7]AArch64 Add

[PATCH] Fix handling of flag_rename_registers.

2021-10-12 Thread Martin Liška
Hello. The option is disabled in rs6000 target with: { OPT_LEVELS_ALL, OPT_frename_registers, NULL, 0 }, Thus, we have to do an auto-detection only if it's really unset and also equal to the Init value. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. And the

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

2021-10-12 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 11 Oct 2021 at 20:42, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > > On Fri, 8 Oct 2021 at 21:19, Richard Sandiford > > wrote: > >> > >> Thanks for looking at this. > >> > >> Prathamesh Kulkarni writes: > >> > Hi, > >> > As mentioned in PR, for the following test-case: >

[PATCH] tree-optimization/102572 - fix gathers with invariant mask

2021-10-12 Thread Richard Biener via Gcc-patches
This fixes the vector def gathering for invariant masks which failed to pass in the desired vector type resulting in a non-mask type to be generate. Bootstrap and regtest running on x86_64-unknmown-linux-gnu. 2021-10-12 Richard Biener PR tree-optimization/102572 *

[PATCH] tree-optimization/102696 - fix SLP discovery for failed BIT_FIELD_REF

2021-10-12 Thread Richard Biener via Gcc-patches
This fixes a forgotten adjustment of matches[] when we fail SLP discovery. Bootstrap & regtest running on x86_64-unknown-linux-gnu. 2021-10-12 Richard Biener PR tree-optimization/102696 * tree-vect-slp.c (vect_build_slp_tree_2): Properly mark the tree fatally failed

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

2021-10-12 Thread Andre Vieira (lists) via Gcc-patches
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 implementations are able to set the newly renamed 'suggested_unroll_factor'. Also added

[PATCH][RFC] Introduce TREE_AOREFWRAP to cache ao_ref in the IL

2021-10-12 Thread Richard Biener via Gcc-patches
This prototype hack introduces a new tcc_reference TREE_AOREFWRAP which we can use to wrap a reference tree, recording the ao_ref associated with it. That comes in handy when trying to optimize the constant factor involved with alias stmt walking (or alias queries in general) where there's

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

2021-10-12 Thread Richard Biener via Gcc-patches
On Tue, Oct 12, 2021 at 10:59 AM HAO CHEN GUI via Gcc-patches wrote: > > Hi, > > 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.

Re: [PATCH 02/11] Remove base_ind/base_ref handling from extract_base_bit_offset

2021-10-12 Thread Jakub Jelinek via Gcc-patches
On Fri, Oct 01, 2021 at 10:07:49AM -0700, Julian Brown wrote: > In preparation for follow-up patches extending struct dereference > handling for OpenMP, this patch removes base_ind/base_ref handling from > gimplify.c:extract_base_bit_offset. This arguably simplifies some of the > code around the

[SPARC] Fix PR target/102588

2021-10-12 Thread Eric Botcazou via Gcc-patches
We need a 32-byte wide integer mode (OImode) in order to handle structure returns in the 64-bit ABI. Bootstrapped/regtested on SPARC/Solaris and SPARC64/Linux, applied on the mainline, 11 and 10 branches. 2021-10-12 Eric Botcazou PR target/102588 *

Re: [PATCH 01/11] libgomp: Release device lock on cbuf error path

2021-10-12 Thread Jakub Jelinek via Gcc-patches
On Fri, Oct 01, 2021 at 10:07:48AM -0700, Julian Brown wrote: > This patch releases the device lock on a sanity-checking error path in > transfer combining (cbuf) handling in libgomp:target.c. This shouldn't > happen when handling well-formed mapping clauses, but erroneous clauses > can currently

Re: [RFC] Port git gcc-descr to Python

2021-10-12 Thread Martin Liška
Hello. There's a complete patch that implements both git gcc-descr and gcc-undesrc and sets corresponding git aliases to use them. Ready to be installed? Thanks, MartinFrom bf46024d03d00edf09d804449acbc5ff17690127 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Mon, 11 Oct 2021 14:36:19

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

2021-10-12 Thread HAO CHEN GUI via Gcc-patches
Hi,    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  for trunk? Any recommendations? Thanks a lot.    I re-send the

Re: [Patch] Fortran version of libgomp.c-c++-common/icv-{3,4}.c (was: [committed] openmp: Add testsuite coverage for omp_{get_max,set_num}_threads and omp_{s,g}et_teams_thread_limit)

2021-10-12 Thread Jakub Jelinek via Gcc-patches
On Tue, Oct 12, 2021 at 10:41:28AM +0200, Tobias Burnus wrote: > Hi, > > On 12.10.21 09:42, Jakub Jelinek wrote: > > This adds (C/C++ only) testsuite coverage for these new OpenMP 5.1 APIs. > > And attached is the Fortranified version of those testcases. > > OK? > > Tobias > -

[Patch] Fortran version of libgomp.c-c++-common/icv-{3,4}.c (was: [committed] openmp: Add testsuite coverage for omp_{get_max,set_num}_threads and omp_{s,g}et_teams_thread_limit)

2021-10-12 Thread Tobias Burnus
Hi, On 12.10.21 09:42, Jakub Jelinek wrote: This adds (C/C++ only) testsuite coverage for these new OpenMP 5.1 APIs. And attached is the Fortranified version of those testcases. OK? Tobias - Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634

[PATCH] tree-optimization/102659 - avoid undefined overflow after if-conversion

2021-10-12 Thread Richard Biener via Gcc-patches
The following makes sure to rewrite arithmetic with undefined behavior on overflow to a well-defined variant when moving them to be always executed as part of doing if-conversion for loop vectorization. Bootstrapped and tested on x86_64-unknown-linux-gnu. Any comments? Thanks, Richard.

Re: [PATCH] aix: handle 64bit inodes for include directories

2021-10-12 Thread CHIGOT, CLEMENT via Gcc-patches
Hi Jeff, Any update on this patch ? As it's dealing with configure files, I would like to have it merged asap before any conflicts appear. Thanks, Clément

[committed] openmp: Avoid calling clear_type_padding_in_mask in the common case where there can't be any padding

2021-10-12 Thread Jakub Jelinek via Gcc-patches
Hi! We can use the clear_padding_type_may_have_padding_p function, which is conservative for e.g. RECORD_TYPE/UNION_TYPE, but for the floating and complex floating types is accurate. clear_type_padding_in_mask is more expensive because we need to allocate memory, fill it, call the function which

[committed] openmp: Add documentation for omp_{get_max, set_num}_threads and omp_{s, g}et_teams_thread_limit

2021-10-12 Thread Jakub Jelinek via Gcc-patches
Hi! This patch adds documentation for these new OpenMP 5.1 APIs as well as two new environment variables - OMP_NUM_TEAMS and OMP_TEAMS_THREAD_LIMIT. Bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk. We still have a lot of APIs undocumented though: for i in `sed -n

[committed] openmp: Fix up warnings on libgomp.info build

2021-10-12 Thread Jakub Jelinek via Gcc-patches
Hi! When building libgomp documentation, I see makeinfo --split-size=500 -I ../../../libgomp/../gcc/doc/include -I ../../../libgomp -o libgomp.info ../../../libgomp/libgomp.texi ../../../libgomp/libgomp.texi:503: warning: node next `omp_get_default_device' in menu `omp_get_device_num' and

[committed] openmp: Add testsuite coverage for omp_{get_max,set_num}_threads and omp_{s,g}et_teams_thread_limit

2021-10-12 Thread Jakub Jelinek via Gcc-patches
Hi! This adds (C/C++ only) testsuite coverage for these new OpenMP 5.1 APIs. Regtested on x86_64-linux and i686-linux, committed to trunk. 2021-10-12 Jakub Jelinek * testsuite/libgomp.c-c++-common/icv-3.c: New test. * testsuite/libgomp.c-c++-common/icv-4.c: New test. ---

Re: [PATCH] detect out-of-bounds stores by atomic functions [PR102453]

2021-10-12 Thread Richard Biener via Gcc-patches
On Mon, Oct 11, 2021 at 11:25 PM Martin Sebor wrote: > > The attached change extends GCC's warnings for out-of-bounds > stores to cover atomic (and __sync) built-ins. > > Rather than hardcoding the properties of these built-ins just > for the sake of the out-of-bounds detection, on the assumption

Re: [PATCH] hardened conditionals

2021-10-12 Thread Alexandre Oliva via Gcc-patches
On Oct 9, 2021, Richard Biener wrote: > Why two passes (and two IL traverses?) Different traversals, no reason to force them into a single pass. One only looks at the last stmt of each block, where cond stmts may be, while the other has to look at every stmt. > How do you prevent RTL