[Committed 2/2] IBM Z: Fix PR97326: Enable fp compares in vec_cmp

2020-11-11 Thread Andreas Krebbel via Gcc-patches
Bootstrapped and regression tested on s390x. gcc/ChangeLog: PR target/97326 * config/s390/vector.md: Support vector floating point modes in vec_cmp. --- gcc/config/s390/vector.md | 22 -- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/g

[Committed 1/2] IBM Z: Rename mode attr tointvec to TOINTVEC

2020-11-11 Thread Andreas Krebbel via Gcc-patches
Just a preparation to add a lower-case tointvec. Bootstrapped and regression tested on s390x. gcc/ChangeLog: * config/s390/vector.md: Rename tointvec to TOINTVEC. * config/s390/vx-builtins.md: Likewise. --- gcc/config/s390/vector.md | 142 -

[pushed] dwarf2: Set DW_AT_declaration for undefined fns [PR97060]

2020-11-11 Thread Jason Merrill via Gcc-patches
If DECL_INITIAL isn't set, we can't emit anything about the body of the function, so add the declaration attribute. Tested x86_64-pc-linux-gnu, applying to trunk. gcc/ChangeLog: PR debug/97060 * dwarf2out.c (gen_subprogram_die): It's a declaration if DECL_INITIAL isn't se

[PATCH] system: Add WARN_UNUSED_RESULT

2020-11-11 Thread Marek Polacek via Gcc-patches
I'd like to have the option of marking functions with __attribute__ ((__warn_unused_result__)), so this patch adds a macro. And use it for maybe_wrap_with_location, it's always a bug if the return value is not used, which happened to me and got me confused. Bootstrapped/regtested on x86_64-pc-linu

Re: [PATCH 2/2] reset edge probibility and BB-count for peeled/unrolled loop

2020-11-11 Thread Jiufu Guo via Gcc-patches
guojiufu writes: Hi Honza, all, Just want to ping this for review. Original messages: [PATCH 2/2] https://gcc.gnu.org/pipermail/gcc-patches/2020-October/555872.html [PATCH 1/2] https://gcc.gnu.org/pipermail/gcc-patches/2020-October/555871.html Thanks, Jiufu Guo. > Hi, > PR68212 mentioned that

[committed] analyzer: precision-of-wording for -Wanalyzer-stale-setjmp-buffer

2020-11-11 Thread David Malcolm via Gcc-patches
This patch adds a custom event to paths emitted by -Wanalyzer-stale-setjmp-buffer highlighting the place where the pertinent stack frame is popped, and updates the final event in the path to reference this. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to master as 8069928d

[committed] analyzer: warn on invalid shift counts [PR97424]

2020-11-11 Thread David Malcolm via Gcc-patches
This patch implements -Wanalyzer-shift-count-negative and -Wanalyzer-shift-count-overflow, analogous to the C/C++ warnings -Wshift-count-negative and -Wshift-count-overflow, but implemented via interprocedural path analysis rather than via parsing in a front end, and thus capable of detecting inter

Re: [PATCH v3] Include checking of 0 cost dependency due to bypass in rank_for_schedule

2020-11-11 Thread Jojo R
Ping … ... Jojo 在 2020年11月6日 +0800 PM5:38,Jojo R ,写道: > Insn seqs before sched: > > .L1: > a5 = insn-1 (a0) > a6 = insn-2 (a1) > a7 = insn-3 (a7, a5) > a8 = insn-4 (a8, a6) > Jmp .L1 > > Insn-3 & insn-4 is REG_DEP_TRUE of insn-1 & insn-2, > so insn-3 & insn-4 will be as the last of ready list. > A

Re: [PATCH] [PR target/97194] [AVX2] Support variable index vec_set.

2020-11-11 Thread Hongtao Liu via Gcc-patches
On Wed, Nov 11, 2020 at 4:45 PM Uros Bizjak wrote: > > > gcc/ChangeLog: > > > > PR target/97194 > > * config/i386/i386-expand.c (ix86_expand_vector_set_var): New function. > > * config/i386/i386-protos.h (ix86_expand_vector_set_var): New Decl. > > * config/i386/predicates.md (vec_setm_operand): Ne

[PATCH][PR target/97770] x86: Add missing popcount2 expander

2020-11-11 Thread Hongyu Wang via Gcc-patches
Hi, According to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97770, x86 backend need popcount2 expander so __builtin_popcount could be auto vectorized with AVX512BITALG/AVX512VPOPCNTDQ targets. For DImode the middle-end vectorizer could not generate expected code, and for QI/HImode there is no c

[PATCH] [tree-optimization] Optimize two patterns with three xors.

2020-11-11 Thread Eugene Rozenfeld via Gcc-patches
Simplify (a ^ b) & ((b ^ c) ^ a) --> (a ^ b) & ~c. int f(int a, int b, int c) { return (a ^ b) & ((b ^ c) ^ a); } Code without the patch: moveax,edx xoreax,esi xoreax,edi xoredi,esi andeax,edi ret Code with the patch: xoredi,esi andn eax,edx,edi ret Simplify (a

Re: [PATCH] Add a new pattern in 4-insn combine

2020-11-11 Thread Segher Boessenkool
Hi Hao Chen, [ You first need to add yourself to MAINTAINERS? And get an account to do that, if you do not yet have one yet :-) ] On Mon, Nov 09, 2020 at 10:48:19AM +0800, HAO CHEN GUI wrote: > This patch adds a new pattern in 4-insn combine. It supports the > following sign_extend(op: zero_e

Improve handling of memory operands in ipa-icf 2/4

2020-11-11 Thread Jan Hubicka
Hi, this patch iplements new class ao_compare that is derived from operand_compare and adds a method to compare and hash ao_refs. This is used by ICF to enable more merging. Comparsion is done as follows 1) Verify that the memory access will happen at the same address and will have same size.

Re: [patch] Enhance debug info for fixed-point types

2020-11-11 Thread Jeff Law via Gcc-patches
On 11/11/20 4:25 PM, Eric Botcazou wrote: > Hi, > > the Ada language supports fixed-point types as first-class citizens so they > need to be described as-is in the debug info. Pierre-Marie devised the > langhook get_fixed_point_type_info for this purpose a few years ago, but it > comes with a

Re: [PATCH] std::experimental::simd

2020-11-11 Thread Jonathan Wakely via Gcc-patches
On 08/05/20 21:03 +0200, Matthias Kretz wrote: Here's my last update to the std::experimental::simd patch. It's currently based on the gcc-10 branch. + +// __next_power_of_2{{{ +/** + * \internal We use @foo for Doxygen commens rather than \foo + * Returns the next power of 2 larger than

[patch] Enhance debug info for fixed-point types

2020-11-11 Thread Eric Botcazou
Hi, the Ada language supports fixed-point types as first-class citizens so they need to be described as-is in the debug info. Pierre-Marie devised the langhook get_fixed_point_type_info for this purpose a few years ago, but it comes with a limitation for the representation of the scale factor

Re: [PATCH] c++, v2: Fix up constexpr CLEANUP_POINT_EXPR and TRY_FINALLY_EXPR handling [PR97790]

2020-11-11 Thread Jason Merrill via Gcc-patches
On 11/11/20 3:04 PM, Jakub Jelinek wrote: On Wed, Nov 11, 2020 at 02:11:14PM -0500, Jason Merrill via Gcc-patches wrote: Would it make sense to always use a NULL jump_target when evaluating cleanups? I was afraid of that, especially for TRY_FINALLY_EXPR, but it seems that during constexpr eval

Re: [PATCH] match.pd: undistribute (a << s) & C, when C = (M << s) and exact_log2(M - 1)

2020-11-11 Thread Jakub Jelinek via Gcc-patches
On Wed, Nov 11, 2020 at 01:43:00PM -0800, Jim Wilson wrote: > > On Wed, Nov 11, 2020 at 11:43:34AM +0100, Philipp Tomsich wrote: > > > The patch addresses this by disallowing that rule, if an exact > > power-of-2 is > > > seen as C1. The reason why I would prefer to have this canonicalised the > >

[PATCH] libstdc++: Add C++ runtime support for new 128-bit long double format

2020-11-11 Thread Jonathan Wakely via Gcc-patches
This adds support for the new __ieee128 long double format on powerpc64le targets. Most of the complexity comes from wanting a single libstdc++.so library that contains the symbols needed by code compiled with both -mabi=ibmlongdouble and -mabi=ieeelongdouble (and not forgetting -mlong-double-64 a

Re: [PATCH][RFC] diagnostics: Add support for Unicode drawing characters

2020-11-11 Thread Lewis Hyatt via Gcc-patches
On Thu, Jul 23, 2020 at 05:47:28PM -0400, David Malcolm wrote: > On Thu, 2020-07-23 at 12:28 -0400, Lewis Hyatt via Gcc-patches wrote: > > Hello- > > > > The attached patch is complete including docs, but I tagged as RFC > > because I am not sure if anyone will like it, or if the general > > react

Re: [PATCH] match.pd: undistribute (a << s) & C, when C = (M << s) and exact_log2(M - 1)

2020-11-11 Thread Jim Wilson
On Wed, Nov 11, 2020 at 2:55 AM Jakub Jelinek via Gcc-patches < gcc-patches@gcc.gnu.org> wrote: > On Wed, Nov 11, 2020 at 11:43:34AM +0100, Philipp Tomsich wrote: > > The patch addresses this by disallowing that rule, if an exact > power-of-2 is > > seen as C1. The reason why I would prefer to ha

[r11-4913 Regression] FAIL: 25_algorithms/merge/constrained.cc (test for excess errors) on Linux/x86_64

2020-11-11 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, bd87cc14ebdb6789e067fb1828d5808407c308b3 is the first bad commit commit bd87cc14ebdb6789e067fb1828d5808407c308b3 Author: Richard Biener Date: Wed Nov 11 11:51:59 2020 +0100 tree-optimization/97623 - Avoid PRE hoist insertion iteration caused FAIL: 23_containers/vector/mo

[r11-4903 Regression] FAIL: gfortran.dg/gomp/workshare-reduction-57.f90 -O scan-tree-dump-times optimized "__builtin_GOMP_loop(?:_ull)_dynamic_next " 1 on Linux/x86_64

2020-11-11 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, 1644ab9917ca6b96e9e683c422f1793258b9a3db is the first bad commit commit 1644ab9917ca6b96e9e683c422f1793258b9a3db Author: Tobias Burnus Date: Wed Nov 11 09:23:07 2020 +0100 gfortran.dg/gomp/workshare-reduction-*.f90: Fix dumps for -m32 caused FAIL: gfortran.dg/gomp/worksh

[PATCH] C++ : Add the -stdlib= option.

2020-11-11 Thread Iain Sandoe
resending - the first & second attempt didn’t seem to make it to gcc-patches. Hi This option allows the user to specify alternate C++ runtime libraries, for example when a platform uses libc++ as the installed C++ runtime. It is the same spelling as a clang option that allows that to use libstd

Re: [PATCH] match.pd: undistribute (a << s) & C, when C = (M << s) and exact_log2(M - 1)

2020-11-11 Thread Jakub Jelinek via Gcc-patches
On Wed, Nov 11, 2020 at 09:04:28PM +0100, Philipp Tomsich wrote: > On Wed, 11 Nov 2020 at 20:59, Jakub Jelinek wrote: > > > > > > The simplification that distributes the shift (i.e. the one that Jakub > > > referred > > > to as fighting the new rule) is also run after GIMPLE has been expanded to

Re: [PATCH] match.pd: undistribute (a << s) & C, when C = (M << s) and exact_log2(M - 1)

2020-11-11 Thread Philipp Tomsich
On Wed, 11 Nov 2020 at 20:59, Jakub Jelinek wrote: > > > > The simplification that distributes the shift (i.e. the one that Jakub > > referred > > to as fighting the new rule) is also run after GIMPLE has been expanded to > > RTX. In my understanding, this still implies that even if we have a >

[PATCH] c++, v2: Fix up constexpr CLEANUP_POINT_EXPR and TRY_FINALLY_EXPR handling [PR97790]

2020-11-11 Thread Jakub Jelinek via Gcc-patches
On Wed, Nov 11, 2020 at 02:11:14PM -0500, Jason Merrill via Gcc-patches wrote: > Would it make sense to always use a NULL jump_target when evaluating > cleanups? I was afraid of that, especially for TRY_FINALLY_EXPR, but it seems that during constexpr evaluation the cleanups will most often be jus

Re: [PATCH] match.pd: undistribute (a << s) & C, when C = (M << s) and exact_log2(M - 1)

2020-11-11 Thread Jakub Jelinek via Gcc-patches
On Wed, Nov 11, 2020 at 08:53:56PM +0100, Philipp Tomsich wrote: > > On 11/11/20 3:55 AM, Jakub Jelinek via Gcc-patches wrote: > > > On Wed, Nov 11, 2020 at 11:43:34AM +0100, Philipp Tomsich wrote: > > >> The patch addresses this by disallowing that rule, if an exact > > >> power-of-2 is > > >> se

Re: [PATCH] match.pd: undistribute (a << s) & C, when C = (M << s) and exact_log2(M - 1)

2020-11-11 Thread Philipp Tomsich
On Wed, 11 Nov 2020 at 19:17, Jeff Law wrote: > > > On 11/11/20 3:55 AM, Jakub Jelinek via Gcc-patches wrote: > > On Wed, Nov 11, 2020 at 11:43:34AM +0100, Philipp Tomsich wrote: > >> The patch addresses this by disallowing that rule, if an exact power-of-2 > >> is > >> seen as C1. The reason wh

Re: [PATCH] [PING^2] Asan changes for RISC-V.

2020-11-11 Thread Jim Wilson
Original message here https://gcc.gnu.org/pipermail/gcc-patches/2020-October/557406.html This has non-RISC-V changes, so I need a global reviewer to look at it. Jim On Wed, Nov 4, 2020 at 12:10 PM Jim Wilson wrote: > > > On Wed, Oct 28, 2020 at 4:59 PM Jim Wilson wrote: > >> We have only risc

Re: [PATCH] libstdc++: Ensure __gthread_self doesn't call undefined weak symbol [PR 95989]

2020-11-11 Thread Jonathan Wakely via Gcc-patches
On 11/11/20 19:08 +0100, Jakub Jelinek via Libstdc++ wrote: On Wed, Nov 11, 2020 at 05:24:42PM +, Jonathan Wakely wrote: --- a/libgcc/gthr-posix.h +++ b/libgcc/gthr-posix.h @@ -684,7 +684,14 @@ __gthread_equal (__gthread_t __t1, __gthread_t __t2) static inline __gthread_t __gthread_self (v

Re: [PATCH 2/2] c++: Change the mangling of __alignof__ [PR88115]

2020-11-11 Thread Jason Merrill via Gcc-patches
On 11/11/20 1:21 PM, Patrick Palka wrote: This patch changes the mangling of __alignof__ to v111__alignof__, making the mangling distinct from that of alignof(type) and alignof(expr). How we mangle ALIGNOF_EXPR now depends on its ALIGNOF_EXPR_STD_P flag, which after the previous patch gets consi

Re: [PATCH] c++: Fix up constexpr CLEANUP_POINT_EXPR and TRY_FINALLY_EXPR handling [PR97790]

2020-11-11 Thread Jason Merrill via Gcc-patches
On 11/11/20 10:26 AM, Jakub Jelinek wrote: Hi! As the testcase shows, CLEANUP_POINT_EXPR (and I think TRY_FINALLY_EXPR too) suffer from the same problem that I was trying to fix in r10-3597-g1006c9d4395a939820df76f37c7b085a4a1a003f for CLEANUP_STMT, namely that if in the middle of the body expre

[PATCH] [WIP] openmp: Add OpenMP 5.0 task detach clause support

2020-11-11 Thread Kwok Cheung Yeung
Hello This is a WIP implementation of the OpenMP 5.0 task detach clause. The task construct can now take a detach clause, passing in a variable of type omp_event_handle_t. When the construct is encountered, space for an event is allocated and the event variable is set to point to the new event

[PATCH 2/2] c++: Change the mangling of __alignof__ [PR88115]

2020-11-11 Thread Patrick Palka via Gcc-patches
This patch changes the mangling of __alignof__ to v111__alignof__, making the mangling distinct from that of alignof(type) and alignof(expr). How we mangle ALIGNOF_EXPR now depends on its ALIGNOF_EXPR_STD_P flag, which after the previous patch gets consistently set for alignof(type) as well as ali

[PATCH 1/2] c++: Correct the handling of alignof(expr) [PR88115]

2020-11-11 Thread Patrick Palka via Gcc-patches
We're currently neglecting to set the ALIGNOF_EXPR_STD_P flag on an ALIGNOF_EXPR when its operand is an expression. This leads to us handling alignof(expr) as if it were written __alignof__(expr), and returning the preferred alignment instead of the ABI alignment. In the testcase below, this caus

Re: [PATCH,wwwdocs] gcc-11/changes: Mention Intel AVX-VNNI

2020-11-11 Thread Jeff Law via Gcc-patches
On 11/11/20 4:19 AM, Hongtao Liu via Gcc-patches wrote: > [GCC-11] Mention Intel AVX-VNNI and add it to ALDERLAKE and SAPPIRERAPIDS, > also add HRESET to ALDERLAKE. OK.  Please install if you haven't done so already. jeff

Re: [PATCH 1/3] Refactor copying decl section names

2020-11-11 Thread Jeff Law via Gcc-patches
On 11/10/20 10:11 PM, Alan Modra wrote: > On Tue, Nov 10, 2020 at 09:19:37PM -0700, Jeff Law wrote: >> I think the const char * is fine. That should force resolution to the >> same routine we were using earlier. Do you want to commit that fix or >> shall I? > Commited 693a79a355e1. THanks.  I

Re: [PATCH] match.pd: undistribute (a << s) & C, when C = (M << s) and exact_log2(M - 1)

2020-11-11 Thread Jeff Law via Gcc-patches
On 11/11/20 3:55 AM, Jakub Jelinek via Gcc-patches wrote: > On Wed, Nov 11, 2020 at 11:43:34AM +0100, Philipp Tomsich wrote: >> The patch addresses this by disallowing that rule, if an exact power-of-2 is >> seen as C1. The reason why I would prefer to have this canonicalised the >> same way the

Re: [PATCH] aarch64: Fix SVE2 BCAX pattern [PR97730]

2020-11-11 Thread Richard Sandiford via Gcc-patches
Alex Coplan writes: > Hello, > > This patch adds a missing not to the SVE2 BCAX (Bitwise clear and > exclusive or) pattern, Oops. Even worse is that I'd made the test match the bug in the code. :-( > fixing the PR. Since SVE doesn't have an unpredicated not instruction, > we need to use a (vacu

Re: [PATCH] AArch64: Improve inline memcpy expansion

2020-11-11 Thread Richard Sandiford via Gcc-patches
Wilco Dijkstra writes: > Improve the inline memcpy expansion. Use integer load/store for copies <= 24 > bytes > instead of SIMD. Set the maximum copy to expand to 256 by default, except > that -Os or > no Neon expands up to 128 bytes. When using LDP/STP of Q-registers, also use > Q-register

Re: [PATCH] libstdc++: Ensure __gthread_self doesn't call undefined weak symbol [PR 95989]

2020-11-11 Thread Jakub Jelinek via Gcc-patches
On Wed, Nov 11, 2020 at 05:24:42PM +, Jonathan Wakely wrote: > --- a/libgcc/gthr-posix.h > +++ b/libgcc/gthr-posix.h > @@ -684,7 +684,14 @@ __gthread_equal (__gthread_t __t1, __gthread_t __t2) > static inline __gthread_t > __gthread_self (void) > { > +#if __GLIBC_PREREQ(2, 27) What if it is

Re: [PATCH] Better __ashlDI3, __ashrDI3 and __lshrDI3 functions, plus fixed __bswapsi2 function

2020-11-11 Thread Joseph Myers
On Wed, 11 Nov 2020, Jakub Jelinek via Gcc-patches wrote: > So indeed, 0x80 << 24 is UB in C99/C11 and C++98, unclear in C89 and > well defined in C++11 and later. I don't know if C2X is considering > mandating two's complement and making it well defined like C++20 did. C2x requires two's comple

Re: [PATCH] aarch64: Add backend support for expanding __builtin_memset

2020-11-11 Thread Richard Sandiford via Gcc-patches
Sudakshina Das writes: > Apologies for the delay. I have attached another version of the patch. > I have disabled the test cases for ILP32. This is only because function body > check > fails because there is an addition unsigned extension instruction for src > pointer in > every test (uxtwx0

RE: [Patch, microblaze]: Correct the const high double immediate value

2020-11-11 Thread Nagaraju Mekala
Hi Eager, > -Original Message- > From: Michael Eager > Sent: Wednesday, November 11, 2020 9:06 AM > To: Nagaraju Mekala ; Michael Eager > ; gcc-patches@gcc.gnu.org > Cc: Sadanand Mutyala > Subject: Re: [Patch, microblaze]: Correct the const high double immediate > value > > On 11/8/20 9

RE: [Patch, testsuite]: Update MicroBlaze strings test

2020-11-11 Thread Nagaraju Mekala
Hi Jeff, > -Original Message- > From: Jeff Law > Sent: Wednesday, November 11, 2020 5:55 AM > To: Nagaraju Mekala ; Michael Eager > ; gcc-patches@gcc.gnu.org > Cc: Sadanand Mutyala > Subject: Re: [Patch, testsuite]: Update MicroBlaze strings test > > > On 11/8/20 10:58 PM, Nagaraju Mek

Re: [PATCH] libstdc++: Enable without gthreads

2020-11-11 Thread Jonathan Wakely via Gcc-patches
On 11/11/20 16:13 +, Jonathan Wakely wrote: This makes it possible to use std::thread in single-threaded builds. All member functions are available, but attempting to create a new thread will throw an exception. The main benefit for most targets is that other headers such as do not need to

Re: [PATCH] c++: Improve static_assert diagnostic [PR97518]

2020-11-11 Thread Jason Merrill via Gcc-patches
On 11/10/20 8:13 PM, Marek Polacek wrote: On Tue, Nov 10, 2020 at 02:30:30PM -0500, Jason Merrill via Gcc-patches wrote: On 11/10/20 2:28 PM, Marek Polacek wrote: On Tue, Nov 10, 2020 at 02:15:56PM -0500, Jason Merrill wrote: On 11/10/20 1:59 PM, Marek Polacek wrote: On Tue, Nov 10, 2020 at 1

[PATCH] libstdc++: Ensure __gthread_self doesn't call undefined weak symbol [PR 95989]

2020-11-11 Thread Jonathan Wakely via Gcc-patches
Since glibc 2.27 the pthread_self symbol has been defined in libc rather than libpthread. Because we only call pthread_self through a weak alias it's possible for statically linked executables to end up without a definition of pthread_self. This crashes when trying to call an undefined weak symbol.

[PATCH] libstdc++: Enable without gthreads

2020-11-11 Thread Jonathan Wakely via Gcc-patches
This makes it possible to use std::thread in single-threaded builds. All member functions are available, but attempting to create a new thread will throw an exception. The main benefit for most targets is that other headers such as do not need to include the whole of just to be able to create a

Re: [PATCH] libstdc++: exclude cygwin/mingw from relro linker test

2020-11-11 Thread Jonathan Wakely via Gcc-patches
On 11/11/20 12:41 +, Jonathan Wakely wrote: On 11/11/20 12:34 +, Jonathan Yong via Libstdc++ wrote: cygwin/mingw hosted linker may support multiple targets with ELF relro support. This breaks configure testing. Attached patch excludes cygwin/mingw PE format from relro linker flag. Pat

[PATCH] c++: Fix up constexpr CLEANUP_POINT_EXPR and TRY_FINALLY_EXPR handling [PR97790]

2020-11-11 Thread Jakub Jelinek via Gcc-patches
Hi! As the testcase shows, CLEANUP_POINT_EXPR (and I think TRY_FINALLY_EXPR too) suffer from the same problem that I was trying to fix in r10-3597-g1006c9d4395a939820df76f37c7b085a4a1a003f for CLEANUP_STMT, namely that if in the middle of the body expression of those stmts is e.g. return stmt, got

Re: [gcc-7-arm] Backport -moutline-atomics flag

2020-11-11 Thread Pop, Sebastian via Gcc-patches
Hi Richard, On 11/11/20, 8:45 AM, "Richard Biener" wrote: > Any update here? Are those patches in production at Amazon? > I now see refs/vendors/AWS/heads/Arm64/gcc-7-branch The patches in the branch https://gcc.gnu.org/git/?p=gcc.git;a=shortlog;h=refs/vendors/AWS/heads/Arm64/gcc-7-branch up

[committed] testsuite: Fix up scan-tree-dump-times regexps for 64-bit targets

2020-11-11 Thread Jakub Jelinek via Gcc-patches
On Wed, Nov 11, 2020 at 02:40:20PM +0100, Thomas Schwinge wrote: > On 2020-11-11T09:25:25+0100, Tobias Burnus wrote: > > As Sunil's regression tester pointed out, the testcases fail on x86-64 with > > -m32. > > > > The reason is that then the _ull_ variants of the GOMP functions are called; > > i

[PATCH] Fix PRE topological expression set sorting

2020-11-11 Thread Richard Biener
This fixes sorted_array_from_bitmap_set to do a topological sort as required by re-using what PHI-translation does, namely a DFS walk with the help of bitmap_find_leader. The proper result is verified by extra checking in clean () (which would have tripped before) and for the testcase I'm working

Re: [gcc-7-arm] Backport -moutline-atomics flag

2020-11-11 Thread Richard Biener via Gcc-patches
On Thu, Sep 24, 2020 at 4:59 PM Pop, Sebastian wrote: > > Thanks Richard for your recommendations. > I am still discussing with Kyrill about a good name for the branch. > Once we agree on a name we will commit the patches to that branch. Any update here? Are those patches in production at Amazon

[PATCH] aarch64: Fix SVE2 BCAX pattern [PR97730]

2020-11-11 Thread Alex Coplan via Gcc-patches
Hello, This patch adds a missing not to the SVE2 BCAX (Bitwise clear and exclusive or) pattern, fixing the PR. Since SVE doesn't have an unpredicated not instruction, we need to use a (vacuously) predicated not here. To ensure that the predicate is instantiated correctly (to all 1s) for the intri

[Ada] Fix biased integer arithmetic

2020-11-11 Thread Eric Botcazou
The Ada compiler uses a biased representation when a size clause reserves fewer bits than normal either for the lower or for the upper bound. Tested on x86-64/Linux, applied on the mainline, 10 and 9 branches. 2020-11-11 Eric Botcazou * gcc-interface/trans.c (build_binary_op_trapv):

[Ada] Fix segfault on elaboration of empty 1-element array at -O

2020-11-11 Thread Eric Botcazou
This is another rather obscure case where the elaboration of an empty array whose base type is an array type of length at most 1 goes awry when the code is compiled with optimization. Tested on x86-64/Linux, applied on the mainline, 10 and 9 branches. 2020-11-11 Eric Botcazou * gcc

ping x2 [PATCH 0/2] "noinit" and "persistent" attributes

2020-11-11 Thread Jozef Lawrynowicz
ping x2 for below On Wed, Nov 04, 2020 at 01:03:33PM +, Jozef Lawrynowicz wrote: > Ping for below > https://gcc.gnu.org/pipermail/gcc-patches/2020-October/557184.html > > On Tue, Oct 27, 2020 at 11:40:33AM +, Jozef Lawrynowicz wrote: > > This patch series fixes behavior related to the "no

[Ada] Fix internal error on chain of constants with -gnatc

2020-11-11 Thread Eric Botcazou
This is a rather obscure case not really worth commenting. :-) Tested on x86-64/Linux, applied on the mainline. 2020-11-11 Eric Botcazou * gcc-interface/decl.c (gnat_to_gnu_entity) : In case the constant is not being defined, get the expression in type annotation mode

Re: [committed] gfortran.dg/gomp/workshare-reduction-*.f90: Fix dumps for -m32 (was: Re: [Patch] Fortran: OpenMP 5.0 (in_, task_)reduction clause extensions)

2020-11-11 Thread Thomas Schwinge
Hi Tobias! On 2020-11-11T09:25:25+0100, Tobias Burnus wrote: > As Sunil's regression tester pointed out, the testcases fail on x86-64 with > -m32. > > The reason is that then the _ull_ variants of the GOMP functions are called; > in the C equivalent, those are always called – I assume that's bec

RE: [PATCH] aarch64: Add backend support for expanding __builtin_memset

2020-11-11 Thread Sudakshina Das via Gcc-patches
Hi Richard > -Original Message- > From: Richard Sandiford > Sent: 03 November 2020 11:34 > To: Sudakshina Das > Cc: Wilco Dijkstra ; gcc-patches@gcc.gnu.org; > Kyrylo Tkachov ; Richard Earnshaw > > Subject: Re: [PATCH] aarch64: Add backend support for expanding > __builtin_memset > > S

[Ada] Fix internal error with Shift_Right operator on signed type

2020-11-11 Thread Eric Botcazou
This is a regression present on the mainline and 10 branch in the form of an ICE with a shift operator applied to a variable of a signed type, and which is caused by a type mismatch. Tested on x86-64/Linux, applied on the mainline and 10 branch. 2020-11-11 Eric Botcazou * gcc-inter

Re: [PATCH] libstdc++: exclude cygwin/mingw from relro linker test

2020-11-11 Thread Jonathan Wakely via Gcc-patches
On 11/11/20 12:34 +, Jonathan Yong via Libstdc++ wrote: cygwin/mingw hosted linker may support multiple targets with ELF relro support. This breaks configure testing. Attached patch excludes cygwin/mingw PE format from relro linker flag. Patch OK? OK, thanks. From a72f02aec065c312528e4

[PATCH] libstdc++: exclude cygwin/mingw from relro linker test

2020-11-11 Thread Jonathan Yong via Gcc-patches
cygwin/mingw hosted linker may support multiple targets with ELF relro support. This breaks configure testing. Attached patch excludes cygwin/mingw PE format from relro linker flag. Patch OK? From a72f02aec065c312528e41e4243c702d7371b5ce Mon Sep 17 00:00:00 2001 From: Jonathan Yong <10wa...@gma

Re: [Patch, fortran] PR83118 - [8/9/10/11 Regression] Bad intrinsic assignment of class(*) array component of derived type

2020-11-11 Thread Tobias Burnus
Hi Paul, thanks for the patch. On 10.11.20 14:25, Paul Richard Thomas via Fortran wrote: ... unlimited_polymorphic_32.f03: if (any (z .ne. [42_4, 43_4])) stop 1 + idx If you already use an offset for the stop codes, can you enumerate those? Currently all are 'stop 1'. In resol

Re: [PATCH 2/6 v3] Add Dead Field Elimination

2020-11-11 Thread Erick Ochoa
On 11.11.20 03:25, Jakub Jelinek wrote: On Wed, Nov 11, 2020 at 03:14:59AM -0800, Erick Ochoa wrote: Using the Dead Field Analysis, Dead Field Elimination automatically transforms gimple to eliminate fields that are never read. 2020-11-04 Erick Ochoa * gcc/Makefile.in: add file to

[PATCH] testsuite/97797 - adjust GIMPLE tests for sizetype

2020-11-11 Thread Richard Biener
Tested on x86_64-unknown-linux-gnu, pushed. 2020-11-11 Richard Biener PR testsuite/97797 * gcc.dg/torture/ssa-fre-5.c: Use __SIZETYPE__ where appropriate. * gcc.dg/torture/ssa-fre-6.c: Likewise. --- gcc/testsuite/gcc.dg/torture/ssa-fre-5.c | 8 gcc/tes

[PATCH] tree-optimization/97623 - Avoid PRE hoist insertion iteration

2020-11-11 Thread Richard Biener
The recent previous change in this area limited hoist insertion iteration via a param but the following is IMHO better since we are not really interested in PRE opportunities exposed by hoisting but only the other way around. So this moves hoist insertion after PRE iteration finished and removes h

[committed] aarch64: Support SVE comparisons for unpacked integers

2020-11-11 Thread Richard Sandiford via Gcc-patches
This patch adds support for comparing unpacked SVE integer vectors, such as byte elements stored in the bottom bytes of halfword containers. It also adds support for selects between unpacked SVE vectors (both integer and floating-point), since selects and compares are closely tied via the vcond op

Re: vect: Allow vconds between different vector sizes

2020-11-11 Thread Andrew Stubbs
On 11/11/2020 11:16, Richard Sandiford wrote: [Andrew: cc:ing you in case this affects/helps GCN.] The vcond code requires the compared vectors and the selected vectors to have both the same size and the same number of elements as each other. But the operation makes logical sense even for diffe

Re: [PATCH] match.pd: rewrite x << C with C > precision to (const_int 0)

2020-11-11 Thread Jakub Jelinek via Gcc-patches
On Wed, Nov 11, 2020 at 12:28:28PM +0100, Richard Biener via Gcc-patches wrote: > > +/* Fold (x << C), where C > precision(type) into 0. */ > > +(simplify > > + (lshift @0 INTEGER_CST@1) > > + (if (wi::ltu_p (TYPE_PRECISION (TREE_TYPE (@0)), wi::to_wide(@1))) > > You want element_precision (@0),

Re: vect: Allow vconds between different vector sizes

2020-11-11 Thread Richard Biener
On Wed, 11 Nov 2020, Richard Sandiford wrote: > [Andrew: cc:ing you in case this affects/helps GCN.] > > The vcond code requires the compared vectors and the selected > vectors to have both the same size and the same number of elements > as each other. But the operation makes logical sense even

Re: [PATCH] match.pd: rewrite x << C with C > precision to (const_int 0)

2020-11-11 Thread Richard Biener via Gcc-patches
On Wed, Nov 11, 2020 at 11:28 AM Philipp Tomsich wrote: > > From: Philipp Tomsich > > csmith managed to sneak a shift wider than the bit-width of a register > past the frontend (found when addressing a bug in our bitmanip machine > description): no warning is given and an unneeded shift is genera

Re: [PATCH 2/6 v3] Add Dead Field Elimination

2020-11-11 Thread Jakub Jelinek via Gcc-patches
On Wed, Nov 11, 2020 at 03:14:59AM -0800, Erick Ochoa wrote: > > Using the Dead Field Analysis, Dead Field Elimination > automatically transforms gimple to eliminate fields that > are never read. > > 2020-11-04 Erick Ochoa > > * gcc/Makefile.in: add file to list of sources > * gcc/ipa

[PATCH,wwwdocs] gcc-11/changes: Mention Intel AVX-VNNI

2020-11-11 Thread Hongtao Liu via Gcc-patches
[GCC-11] Mention Intel AVX-VNNI and add it to ALDERLAKE and SAPPIRERAPIDS, also add HRESET to ALDERLAKE. diff --git a/htdocs/gcc-11/changes.html b/htdocs/gcc-11/changes.html index d7a3a1f9..fc4c74f4 100644 --- a/htdocs/gcc-11/changes.html +++ b/htdocs/gcc-11/changes.html @@ -267,15 +267,20 @@ a wo

vect: Allow vconds between different vector sizes

2020-11-11 Thread Richard Sandiford via Gcc-patches
[Andrew: cc:ing you in case this affects/helps GCN.] The vcond code requires the compared vectors and the selected vectors to have both the same size and the same number of elements as each other. But the operation makes logical sense even for different vector sizes. E.g. you could compare two V

Re: std::jthread::operator=(std::jthread&&) calls std::terminate if *this has an associated running thread.

2020-11-11 Thread Jonathan Wakely via Gcc-patches
On 08/11/20 14:51 +0100, Paul Scharnofske via Libstdc++ wrote: I think this would work: jthread& operator=(jthread&& __x) noexcept { std::jthread(std::move(__x)).swap(*this); return *this; } That looks a lot better than what I did, it's also consistent with other places like std:

[PATCH 3/6 v3] Add Field Reordering

2020-11-11 Thread Erick Ochoa
Field reordering of structs at link-time 2020-11-04 Erick Ochoa * gcc/Makefile.in: add new file to list of sources * gcc/common.opt: add new flag for field reordering * gcc/passes.def: add new pass * gcc/tree-pass.h: same * gcc/ipa-field-reorder.c: New file * gcc/ipa

[PATCH 2/6 v3] Add Dead Field Elimination

2020-11-11 Thread Erick Ochoa
Using the Dead Field Analysis, Dead Field Elimination automatically transforms gimple to eliminate fields that are never read. 2020-11-04 Erick Ochoa * gcc/Makefile.in: add file to list of sources * gcc/ipa-dfe.c: New * gcc/ipa-dfe.h: Same * gcc/ipa-type-escape-analysis.h: E

[PATCH 4/6 v3] Add documentation for dead field elimination

2020-11-11 Thread Erick Ochoa
2020-11-04 Erick Ochoa * gcc/Makefile.in: Add file to documentation sources * gcc/doc/dfe.texi: New section * gcc/doc/gccint.texi: Include new section --- gcc/Makefile.in | 3 +- gcc/doc/dfe.texi| 187 gcc/doc/gccint.texi |

[PATCH 5/6 v3] Abort if Gimple from C++ or Fortran sources is found.

2020-11-11 Thread Erick Ochoa
2020-11-04 Erick Ochoa * gcc/ipa-field-reorder: Add flag to exit transformation * gcc/ipa-type-escape-analysis: Same --- gcc/ipa-field-reorder.c| 3 +- gcc/ipa-type-escape-analysis.c | 54 -- gcc/ipa-type-escape-analysis.h | 2 ++ 3 files ch

[PATCH 6/6 v3] Add heuristic to take into account void* pattern.

2020-11-11 Thread Erick Ochoa
We add a heuristic in order to be able to transform functions which receive void* arguments as a way to generalize over arguments. An example of this is qsort. The heuristic works by first inspecting leaves in the call graph. If the leaves only contain a reference to a single RECORD_TYPE then we

[committed] libstdc++: Use helper type for checking thread ID

2020-11-11 Thread Jonathan Wakely via Gcc-patches
This encapsulates the storing and checking of the thread ID into a class type, so that the macro _GLIBCXX_HAS_GTHREADS is only checked in one place. The code doing the checks just calls member functions of the new type, without caring whether that really does any work or not. libstdc++-v3/ChangeLo

Re: [PATCH PR94442] [AArch64] Redundant ldp/stp instructions emitted at -O3

2020-11-11 Thread Richard Sandiford via Gcc-patches
xiezhiheng writes: >> -Original Message- >> From: Richard Sandiford [mailto:richard.sandif...@arm.com] >> Sent: Tuesday, November 10, 2020 7:54 PM >> To: xiezhiheng >> Cc: gcc-patches@gcc.gnu.org >> Subject: Re: [PATCH PR94442] [AArch64] Redundant ldp/stp instructions >> emitted at -O3 >>

Re: [PATCH] match.pd: undistribute (a << s) & C, when C = (M << s) and exact_log2(M - 1)

2020-11-11 Thread Jakub Jelinek via Gcc-patches
On Wed, Nov 11, 2020 at 11:43:34AM +0100, Philipp Tomsich wrote: > The patch addresses this by disallowing that rule, if an exact power-of-2 is > seen as C1. The reason why I would prefer to have this canonicalised the > same way the (X & C1) * C2 is canonicalised, is that cleaning this up during

[PATCH] Drop topological sort for PRE phi-translation

2020-11-11 Thread Richard Biener
The topological sort sorted_array_from_bitmap_set is supposed to provide isn't one since quite some time since value_ids are assigned first to SSA names in the order of SSA_NAME_VERSION and then to hashtable entries in the order they appear in the table. One can even argue that expression-ids prov

Re: [PATCH] match.pd: undistribute (a << s) & C, when C = (M << s) and exact_log2(M - 1)

2020-11-11 Thread Philipp Tomsich via Gcc-patches
Jakub, On Wed, 11 Nov 2020 at 11:31, Jakub Jelinek wrote: > > On Wed, Nov 11, 2020 at 11:17:32AM +0100, Philipp Tomsich wrote: > > From: Philipp Tomsich > > > > The function > > long f(long a) > > { > > return(a & 0xull) << 3; > > } > > is folded into > > _1 = a_2(D

Re: [PATCH] match.pd: undistribute (a << s) & C, when C = (M << s) and exact_log2(M - 1)

2020-11-11 Thread Jakub Jelinek via Gcc-patches
On Wed, Nov 11, 2020 at 11:17:32AM +0100, Philipp Tomsich wrote: > From: Philipp Tomsich > > The function > long f(long a) > { > return(a & 0xull) << 3; > } > is folded into > _1 = a_2(D) << 3; > _3 = _1 & 34359738360; > wheras the construction > return (a &

[PATCH] match.pd: rewrite x << C with C > precision to (const_int 0)

2020-11-11 Thread Philipp Tomsich
From: Philipp Tomsich csmith managed to sneak a shift wider than the bit-width of a register past the frontend (found when addressing a bug in our bitmanip machine description): no warning is given and an unneeded shift is generated. This behaviour was validated for the resulting assembly both fo

[PATCH] match.pd: undistribute (a << s) & C, when C = (M << s) and exact_log2(M - 1)

2020-11-11 Thread Philipp Tomsich
From: Philipp Tomsich The function long f(long a) { return(a & 0xull) << 3; } is folded into _1 = a_2(D) << 3; _3 = _1 & 34359738360; wheras the construction return (a & 0xull) * 8; results in _1 = a_2(D) & 4294967295; _3 = _1 * 8; This lea

Re: Detect EAF flags in ipa-modref

2020-11-11 Thread Richard Biener
On Tue, 10 Nov 2020, Jan Hubicka wrote: > > > + tree callee = gimple_call_fndecl (stmt); > > > + if (callee) > > > +{ > > > + cgraph_node *node = cgraph_node::get (callee); > > > + modref_summary *summary = node ? get_modref_function_summary (node) > > > + :

Re: Add support for copy specifier to fnspec

2020-11-11 Thread Richard Biener
On Mon, 9 Nov 2020, Jan Hubicka wrote: > Hi, > this patch adds 'c' and 'C' fnspec for parameter that is copied to different > parameter. Main motivation is to get rid of wrong EAF_NOESCAPE flag on > the memcpy argument #2. I however also added arg_copies_to_arg_p > predicate that can be eventuall

Re: [PATCH] Better __ashlDI3, __ashrDI3 and __lshrDI3 functions, plus fixed __bswapsi2 function

2020-11-11 Thread Jakub Jelinek via Gcc-patches
On Wed, Nov 11, 2020 at 09:33:00AM +0100, Stefan Kanthak wrote: > Ouch: that's but not the point here; what matters is the undefined behaviour > of > ((u) & 0x00ff) << 24 > > 0x00ff is a signed int, so (u) & 0x00ff is signed too -- and producing > a negative value (or overflow)

Re: [PATCH] Cleanup irange::set.

2020-11-11 Thread Aldy Hernandez via Gcc-patches
On 11/11/20 10:45 AM, Richard Sandiford wrote: Aldy Hernandez writes: On 11/10/20 3:35 PM, Richard Sandiford wrote: Aldy Hernandez writes: p.s. If POLY_INT_CST_P are not supported in ranges, but are INTEGRAL_TYPE_P, perhaps we should also tweak irange::supports_type_p so it doesn't leak in

Re: [PATCH 2/2] loops: Invoke lim after successful loop interchange

2020-11-11 Thread Richard Biener
On Mon, 9 Nov 2020, Martin Jambor wrote: > Hi, > > this patch modifies the loop invariant pass so that is can operate > only on a single requested loop and its sub-loops and ignore the rest > of the function, much like it currently ignores basic blocks that are > not in any real loop. It then in

Re: testsuite: Adjust pr96789.c to exclude vect_load_lanes

2020-11-11 Thread Richard Sandiford via Gcc-patches
"Kewen.Lin" writes: > Hi Richard, > > Thanks for the review! > > on 2020/11/10 锟斤拷锟斤拷7:31, Richard Sandiford wrote: >> "Kewen.Lin" writes: >>> Hi, >>> >>> As Lyon pointed out, the newly introduced test case >>> gcc.dg/tree-ssa/pr96789.c fails on arm-none-linux-gnueabihf. >>> Loop vectorizer is ab

Re: [Patch, fortran] PR83118 - [8/9/10/11 Regression] Bad intrinsic assignment of class(*) array component of derived type

2020-11-11 Thread Paul Richard Thomas via Gcc-patches
Hi Thomas, Yes, it did grow into a bit of a monster patch. I kept noticing rather flakey bits of existing code, especially where matching of dtype element lengths to the actual payload was concerned. Waiting for the others to comment gives me a chance to write a more comprehensive testcase for th

Re: [PATCH] Cleanup irange::set.

2020-11-11 Thread Richard Sandiford via Gcc-patches
Aldy Hernandez writes: > On 11/10/20 3:35 PM, Richard Sandiford wrote: >> Aldy Hernandez writes: (actually I can see 3245 ICEs on aarch64) Can you fix it? >>> >>> Sure can. >>> >>> Richard, I seem to have incorrectly removed the early exit for varying, >>> and that affected the cha

  1   2   >