Re: [RFC/PATCH] IFN: Fix mask_{load,store} optab support macros

2020-06-24 Thread Richard Sandiford
"Kewen.Lin" writes: > Hi, > > When I am working on IFNs for vector with length, I noticed that the > current optab support query for mask_load/mask_store looks unexpected. > The mask_load/mask_store requires two modes for convert_optab query, > but the macros direct_mask_{load,store}_optab_support

[PATCH] VEC_COND_EXPR: clean up first argument

2020-06-24 Thread Martin Liška
Hi. When expanding a VEC_COND_EXPR it happens that first argument (a SSA_NAME) that can be no longer used. When that happens we need to remove the SSA_NAME, otherwise we end up expanding it and for targets like s390x, there's no optab expansion. We need to remove them at both places as -O0 does n

[PATCH][obvious] options: Properly compare string options.

2020-06-24 Thread Martin Liška
For string types we must emit more complex code than simple pointer comparison. It's pretty much the same what we emit for cl_optimization_print_diff. I'm going to install it as obvious. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Martin gcc/ChangeLog: * optc

Re: [stage1][PATCH] Add gcc_assert that &global_options are not dirty modified.

2020-06-24 Thread Martin Liška
On 6/18/20 5:40 PM, Martin Liška wrote: This is bogus as these are 2 strings that are equal. Let me fix it. Hey. Just for the report, this is fixed on master right now. Martin

Re: [PATCH] Add TARGET_UPDATE_DECL_ALIGNMENT [PR95237]

2020-06-24 Thread Richard Biener via Gcc-patches
On Tue, Jun 23, 2020 at 5:31 PM Sunil K Pandey via Gcc-patches wrote: > > From: Sunil K Pandey > > Default for this hook is NOP. For x86, in 32 bit mode, this hook > sets alignment of long long on stack to 32 bits if preferred stack > boundary is 32 bits. > > - This patch fixes > gcc.tar

Re: [PATCH] x86: Fold arch_names_table into processor_alias_table

2020-06-24 Thread Uros Bizjak via Gcc-patches
[CC list removed, it is not shown in archives] > In i386-builtins.c, arch_names_table is used to to map architecture name > string to internal model. A switch statement is used to map internal > processor name to architecture name string and internal priority. > > model and priority are added to

Re: [PATCH] Make contrib/download_prerequisites work on AIX and OpenBSD

2020-06-24 Thread Richard Biener via Gcc-patches
On Tue, Jun 23, 2020 at 10:37 PM Ilya Leoshkevich via Gcc-patches wrote: > > Hello, > > I needed to test [1] on AIX and OpenBSD and noticed > download_prerequisites doesn't work there. The attached patch fixes > it. > > OK for master? OK if David acks the AIX part. Thanks, Richard. > Best regar

Re: [PATCH 1/7 v5] ifn/optabs: Support vector load/store with length

2020-06-24 Thread Richard Sandiford
Jim Wilson writes: > On Tue, Jun 23, 2020 at 5:21 AM Richard Sandiford > wrote: >> MVE and Power both set inactive lanes to zero. But I'm not sure about RVV. >> AIUI, for RVV the approach instead would be to reduce the effective vector >> length for the final iteration of the vector loop, and I'

Re: [RFC/PATCH] IFN: Fix mask_{load,store} optab support macros

2020-06-24 Thread Richard Biener via Gcc-patches
On Wed, Jun 24, 2020 at 9:13 AM Richard Sandiford wrote: > > "Kewen.Lin" writes: > > Hi, > > > > When I am working on IFNs for vector with length, I noticed that the > > current optab support query for mask_load/mask_store looks unexpected. > > The mask_load/mask_store requires two modes for conv

[PATCH] arc: add exceptions for PR92860.

2020-06-24 Thread Martin Liška
Hey. The patch is about addition of some exceptions for arc target that address: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92860#c26 It's again another example where optimization options influence target options. Ready for master? Martin gcc/ChangeLog: PR tree-optimization/92860

Re: [PATCH] VEC_COND_EXPR: clean up first argument

2020-06-24 Thread Richard Biener via Gcc-patches
On Wed, Jun 24, 2020 at 9:21 AM Martin Liška wrote: > > Hi. > > When expanding a VEC_COND_EXPR it happens that first argument (a SSA_NAME) > that can be no longer used. When that happens we need to remove the SSA_NAME, > otherwise we end up expanding it and for targets like s390x, there's no optab

Re: [stage1][PATCH] Add gcc_assert that &global_options are not dirty modified.

2020-06-24 Thread Martin Liška
On 6/18/20 5:36 PM, Martin Liška wrote: I'm going to add this to exception list. Done here: https://gcc.gnu.org/pipermail/gcc-patches/2020-June/548800.html Martin

[PATCH] Fortran : False positive for optional arguments PR95446

2020-06-24 Thread Mark Eggleston
Please find attached a fix for PR95446.  Patch originally posted to the PR by Steve Kargl. OK to commit to master and backport? Commit message: Fortran  : False positive for optional arguments PR95446 Check that there is non-optional argument of the same rank in the list of actual arguments. 

[PATCH] Fortran : Bogus error with additional blanks in type(*) PR95829

2020-06-24 Thread Mark Eggleston
Please find a fix for PR95829.  Original patch by Steve Kargl posted to PR. Commit to master and backport? Commit message: Fortran  : Bogus error with additional blanks in type(*) PR95829 Checking for "* ) " instead of "*)" clears the bogus error. 2020-06-24  Steven G. Kargl  gcc/fortran/

[PATCH] fold-const: Fix A <= 0 ? A : -A folding [PR95810]

2020-06-24 Thread Jakub Jelinek via Gcc-patches
Hi! We folded A <= 0 ? A : -A into -ABS (A), which is for signed integral types incorrect - can invoke on INT_MIN UB twice, once on ABS and once on its negation. The following patch fixes it by instead folding it to (type)-ABSU (A). Bootstrapped/regtested on x86_64-linux and i686-linux, ok for t

[committed] openmp: Fix two pastos in non-rect loop OpenMP lowering

2020-06-24 Thread Jakub Jelinek via Gcc-patches
Hi! Bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk. 2020-06-24 Jakub Jelinek * omp-low.c (lower_omp_for): Fix two pastos. --- gcc/omp-low.c.jj2020-06-16 16:30:43.751400100 +0200 +++ gcc/omp-low.c 2020-06-23 14:14:54.972834539 +0200 @@ -10579,7 +10

Re: [PATCH] fold-const: Fix A <= 0 ? A : -A folding [PR95810]

2020-06-24 Thread Richard Biener
On Wed, 24 Jun 2020, Jakub Jelinek wrote: > Hi! > > We folded A <= 0 ? A : -A into -ABS (A), which is for signed integral types > incorrect - can invoke on INT_MIN UB twice, once on ABS and once on its > negation. > > The following patch fixes it by instead folding it to (type)-ABSU (A). > > Bo

Re: [RFC/PATCH] IFN: Fix mask_{load,store} optab support macros

2020-06-24 Thread Richard Sandiford
Richard Biener writes: > On Wed, Jun 24, 2020 at 9:13 AM Richard Sandiford > wrote: >> >> "Kewen.Lin" writes: >> > Hi, >> > >> > When I am working on IFNs for vector with length, I noticed that the >> > current optab support query for mask_load/mask_store looks unexpected. >> > The mask_load/mas

Re: [RFC/PATCH] IFN: Fix mask_{load,store} optab support macros

2020-06-24 Thread Jakub Jelinek via Gcc-patches
On Wed, Jun 24, 2020 at 09:35:42AM +0100, Richard Sandiford wrote: > >> I keep meaning to experiment with dropping the second mode from these > >> optabs, > >> since it should be uniquely determined by the first. That would make > >> things > >> slightly simpler and more consistent with the othe

Re: [PATCH] VEC_COND_EXPR: clean up first argument

2020-06-24 Thread Martin Liška
On 6/24/20 9:43 AM, Richard Biener wrote: Hmm, can you instead use simple_dce_from_worklist and simply record all SSA_NAMEs you end up "forwarding" as possibly dead in a bitmap? At least that hashmap traversal looks dangerous with respect to address-space randomization and gsi_remove inserting d

Re: [PATCH wwwdocs] gcc-11/changes: Document TSAN changes

2020-06-24 Thread Marco Elver via Gcc-patches
On Tue, Jun 23, 2020 at 09:32PM +0200, Martin Liška wrote: > On 6/23/20 1:27 PM, Marco Elver wrote: > > Is this one good to go, or any objections? > Thanks for it, it's fine. Please install it. Done, thanks! -- Marco

Re: [PATCH] Implement no_stack_protect attribute.

2020-06-24 Thread Martin Liška
PING^2 On 6/10/20 10:12 AM, Martin Liška wrote: PING^1 On 5/25/20 3:10 PM, Martin Liška wrote: On 5/21/20 4:53 PM, Martin Sebor wrote: On 5/21/20 5:28 AM, Martin Liška wrote: On 5/18/20 10:37 PM, Martin Sebor wrote: I know there are some somewhat complex cases the attribute exclusion mechan

Re: [PATCH] VEC_COND_EXPR: clean up first argument

2020-06-24 Thread Richard Biener via Gcc-patches
On Wed, Jun 24, 2020 at 10:49 AM Martin Liška wrote: > > On 6/24/20 9:43 AM, Richard Biener wrote: > > Hmm, can you instead use simple_dce_from_worklist and simply > > record all SSA_NAMEs you end up "forwarding" as possibly dead > > in a bitmap? At least that hashmap traversal looks dangerous >

Re: [PATCH] Fortran : Bogus error with additional blanks in type(*) PR95829

2020-06-24 Thread Manfred Schwarb
Am 24.06.20 um 10:12 schrieb Mark Eggleston: > Please find a fix for PR95829.  Original patch by Steve Kargl posted to PR. > > Commit to master and backport? > > Commit message: > > Fortran  : Bogus error with additional blanks in type(*) PR95829 > > Checking for "* ) " instead of "*)" clears the b

[PATCH PR95854] ICE in find_bswap_or_nop_1 of pass store-merging

2020-06-24 Thread zhoukaipeng (A)
Hi, This is a fix for pr95854. Only add a judgement to make sure operand1 and operand2 are both INTEGER_CST. Bootstrap and tested on aarch64 Linux platform. No new regression witnessed. Is it ok to be merged? Thanks, Kaipeng Zhou 0001-store-merging-ICE-in-find_bswap_or_nop_1-PR95854.patch De

Re: [RFC/PATCH] IFN: Fix mask_{load,store} optab support macros

2020-06-24 Thread Richard Sandiford
Jakub Jelinek writes: > On Wed, Jun 24, 2020 at 09:35:42AM +0100, Richard Sandiford wrote: >> >> I keep meaning to experiment with dropping the second mode from these >> >> optabs, >> >> since it should be uniquely determined by the first. That would make >> >> things >> >> slightly simpler and

Re: [PATCH] libgomp: added simple functions and tests for OMPD

2020-06-24 Thread Jakub Jelinek via Gcc-patches
On Tue, Jun 23, 2020 at 07:25:22PM -0400, y2s1982 via Gcc-patches wrote: > This patch adds some unit tests for omp-tools.h header. It also adds some > simple > functions related to OMPD API versions. It also partially defines the OMPD > initialization function. > > 2020-06-23 Tony Sim > > lib

Re: [PATCH] VEC_COND_EXPR: clean up first argument

2020-06-24 Thread Martin Liška
On 6/24/20 11:09 AM, Richard Biener wrote: On Wed, Jun 24, 2020 at 10:49 AM Martin Liška wrote: On 6/24/20 9:43 AM, Richard Biener wrote: Hmm, can you instead use simple_dce_from_worklist and simply record all SSA_NAMEs you end up "forwarding" as possibly dead in a bitmap? At least that hash

Re: [PATCH PR95854] ICE in find_bswap_or_nop_1 of pass store-merging

2020-06-24 Thread Jakub Jelinek via Gcc-patches
On Wed, Jun 24, 2020 at 09:15:57AM +, zhoukaipeng (A) wrote: > Hi, > > This is a fix for pr95854. > > Only add a judgement to make sure operand1 and operand2 are both INTEGER_CST. So what are those two operands then when not INTEGER_CSTs? POLY_INT_CSTs? The documentation says: operand 1

Re: [PATCH PR95854] ICE in find_bswap_or_nop_1 of pass store-merging

2020-06-24 Thread Jakub Jelinek via Gcc-patches
Oh, and the testcase is wrong too, you can't use AArch64 specific compilation options in generic tests, so either the test needs to be moved into gcc.target/aarch64/ and match in style how such -march option is specified in other tests there, or should not have that -m* in dg-options, but have /* {

Re: PING Re: testsuite: clarify scan-dump file globbing behavior

2020-06-24 Thread Thomas Schwinge
Hi! Given that nobody is available to review/approve this patch, and it cannot really cause any harm, will my (old) review/"non-formal approval" be sufficient for Frederik to push this? Or, in other words: Frederik, please push if nobody objects within the next week. Grüße Thomas On 2020-06-

Re: [PATCH v4] arm: Implement Armv8.1-M low overhead loops

2020-06-24 Thread Andrea Corallo
Andrea Corallo writes: > Hi all, > > here the latest version of the patch to enable Armv8.1-M Mainline > LOB (low overhead branch) extension low overhead loops (LOL) feature > using the 'loop-doloop' pass. > > I posted a previous version of it during stage 4. > > Given the following function: > >

[PATCH PR95700] Use nullptr instead of NULL as a sentinel value

2020-06-24 Thread Ilya Leoshkevich via Gcc-patches
Bootstrapped and regtested on x86_64-redhat-linux, ppc64le-redhat-linux and s390x-redhat-linux. Ok for master? --- Bootstrap with musl libc fails with numerous "missing sentinel in function call" errors. This is because musl defines NULL as 0L for C++, but gcc requires sentinel value to be a po

[PATCH] tree-optimization/95856 fix vect_stmt_dominates_stmt_p at BB region boundary

2020-06-24 Thread Richard Biener
The following adjusts vect_stmt_dominates_stmt_p to honor out-of-region stmts we run into which have UID -1u. Bootstrapped / tested on x86_64-unknown-linux-gnu, applied. Richard. 2020-06-24 Richard Biener PR tree-optimization/95856 * tree-vectorizer.c (vect_stmt_dominates_stm

[PATCH] emit SLP vectorized loads earlier

2020-06-24 Thread Richard Biener
This makes sure to emit SLP vectorized loads where the first scalar load is. This makes SLP dependence checking more powerful because hoisting loads can use TBAA and it increases the freedom for vector placement when there are constraints from live lanes. Vectorized shifts block inserting vectori

[PATCH v2] coroutines: Copy attributes to the outlined functions [PR95518, PR95813]

2020-06-24 Thread Iain Sandoe
Hi Nathan, Nathan Sidwell wrote: > On 6/11/20 3:53 PM, Iain Sandoe wrote: >> Hi >> We had omitted the copying of function attributes (including the >> 'used' status). Mark the outlined functions as artificial, since >> they are; some diagnostic processing tests this. > > Do we do the right thi

Re: [PATCH] libgomp: added simple functions and tests for OMPD

2020-06-24 Thread Jakub Jelinek via Gcc-patches
On Tue, Jun 23, 2020 at 07:25:22PM -0400, y2s1982 via Gcc-patches wrote: > --- /dev/null > +++ b/libgomp/libgompd.c > @@ -0,0 +1,46 @@ Oh, and one more thing, this file should start with the standard comment with license etc., like you've added it to omp-tools.h. > --- /dev/null > +++ b/libgomp/l

Re: [PATCH] nvptx: Add support for subword compare-and-swap

2020-06-24 Thread Kwok Cheung Yeung
On 23/06/2020 5:44 pm, Thomas Schwinge wrote: Hi! On 2020-06-15T21:28:12+0100, Kwok Cheung Yeung wrote: This patch adds support on nvptx for __sync_val_compare_and_swap operations on 1- and 2-byte values. Is this a thorough review that these are the only functions missing, or did you just im

Re: [PATCH] x86: Fold arch_names_table into processor_alias_table

2020-06-24 Thread H.J. Lu via Gcc-patches
On Wed, Jun 24, 2020 at 12:31 AM Uros Bizjak wrote: > > [CC list removed, it is not shown in archives] > > > In i386-builtins.c, arch_names_table is used to to map architecture name > > string to internal model. A switch statement is used to map internal > > processor name to architecture name st

Re: [PATCH PR95854] ICE in find_bswap_or_nop_1 of pass store-merging

2020-06-24 Thread Richard Biener
On Wed, 24 Jun 2020, zhoukaipeng (A) wrote: > Hi, > > This is a fix for pr95854. > > Only add a judgement to make sure operand1 and operand2 are both INTEGER_CST. > > Bootstrap and tested on aarch64 Linux platform. No new regression witnessed. > > Is it ok to be merged? Please use tree_fits_u

Re: [PR95416] outputs.exp: skip lto tests when not using linker plugin

2020-06-24 Thread Rainer Orth
Hi Alexandre, > On Jun 8, 2020, Alexandre Oliva wrote: > >> * outputs.exp (skip_lto): Set when missing the linker plugin. > > I withdraw the above work-around patch in favor of the fix proper below. > > It's also supposed to fix the FAILs caused by .dSYM directories on > platforms that crea

V7 [PATCH] x86: Move cpuinfo.h from libgcc to common/config/i386

2020-06-24 Thread H.J. Lu via Gcc-patches
On Mon, Jun 22, 2020 at 04:25:46PM -0700, H.J. Lu wrote: > On Sun, Jun 21, 2020 at 10:22 AM H.J. Lu wrote: > > > > On Sun, Jun 21, 2020 at 10:18 AM Uros Bizjak wrote: > > > > > > On Sat, Jun 20, 2020 at 3:40 PM H.J. Lu wrote: > > > > > > > > > > >> 2) can we automatically deduce option name: > >

[committed] libstdc++: Fix std::to_chars buffer overflow (PR 95851)

2020-06-24 Thread Jonathan Wakely via Gcc-patches
The __detail::__to_chars_2 function assumes it won't be called with zero values. However, when the output buffer is empty the caller doesn't handle zero values correctly, and calls __to_chars_2 with a zero value, resulting in an overflow of the empty buffer. The __detail::__to_chars_i function sho

[committed] libstdc++: Fix warnings with -Wsystem-headers

2020-06-24 Thread Jonathan Wakely via Gcc-patches
libstdc++-v3/ChangeLog: * include/bits/stl_algobase.h (__find_if): Add FALLTHRU markers. * include/std/charconv (__detail::__to_chars): Avoid -Wsign-compare warning. Tested powerpc64le-linux, committed to master. commit 25920dd18ad12ea501309b1487366e22f35db631 Author: Jo

[committed] libstdc++: Fix std::from_chars to ignore leading zeros in base 2

2020-06-24 Thread Jonathan Wakely via Gcc-patches
The parser for binary numbers returned an error if the entire string contains more digits than the result type. Leading zeros should be ignored. libstdc++-v3/ChangeLog: * include/std/charconv (__from_chars_binary): Ignore leading zeros. * testsuite/20_util/from_chars/1.cc: Check "

Re: V7 [PATCH] x86: Move cpuinfo.h from libgcc to common/config/i386

2020-06-24 Thread Uros Bizjak via Gcc-patches
On Wed, Jun 24, 2020 at 2:27 PM H.J. Lu wrote: > > On Mon, Jun 22, 2020 at 04:25:46PM -0700, H.J. Lu wrote: > > On Sun, Jun 21, 2020 at 10:22 AM H.J. Lu wrote: > > > > > > On Sun, Jun 21, 2020 at 10:18 AM Uros Bizjak wrote: > > > > > > > > On Sat, Jun 20, 2020 at 3:40 PM H.J. Lu wrote: > > > >

[PATCH] x86: Share _isa_names_table and use cpuinfo.h

2020-06-24 Thread H.J. Lu via Gcc-patches
On Wed, Jun 24, 2020 at 02:43:43PM +0200, Uros Bizjak wrote: > > > > Here is the updated patch for x86 backend and libgcc. driver-i386.c > > is unchanged. > > Thanks. We should change driver-i386.c very carefully and in an > independent way from this patch. It is a complex and interwoven web of >

[PATCH] x86: Add Cooper Lake detection with AVX512BF16

2020-06-24 Thread H.J. Lu via Gcc-patches
All Sky Lake family processors have the same CPUID model number, 0x55. The differences are Cascade Lake has AVX512VNNI and Cooper Lake has AVX512VNNI + AVX512BF16. Check AVX512BF16 for Cooper Lake. PR target/95774 * common/config/i386/cpuinfo.h (get_intel_cpu): Add Cooper Lake

Re: [PATCH v2] coroutines: Copy attributes to the outlined functions [PR95518, PR95813]

2020-06-24 Thread Nathan Sidwell
On 6/24/20 7:00 AM, Iain Sandoe wrote: Hi Nathan, Nathan Sidwell wrote: On 6/11/20 3:53 PM, Iain Sandoe wrote: Hi We had omitted the copying of function attributes (including the 'used' status). Mark the outlined functions as artificial, since they are; some diagnostic processing tests this

Re: [Patch][gcn, nvptx, offloading] mkoffload – handle -fpic/-fPIC

2020-06-24 Thread Tobias Burnus
On 6/23/20 9:36 PM, Thomas Schwinge wrote: (*) Thomas mentioned that this is supposed to work also in more complex cases than the one I outlined, although, that is probably currently the most common one. Static linking is another such case that we've seen in the wild What I meant was: single

Re: [PATCH] x86: Share _isa_names_table and use cpuinfo.h

2020-06-24 Thread Uros Bizjak via Gcc-patches
On Wed, Jun 24, 2020 at 3:06 PM H.J. Lu wrote: > > On Wed, Jun 24, 2020 at 02:43:43PM +0200, Uros Bizjak wrote: > > > > > > Here is the updated patch for x86 backend and libgcc. driver-i386.c > > > is unchanged. > > > > Thanks. We should change driver-i386.c very carefully and in an > > independe

Re: [PATCH] x86: Share _isa_names_table and use cpuinfo.h

2020-06-24 Thread Uros Bizjak via Gcc-patches
On Wed, Jun 24, 2020 at 3:37 PM Uros Bizjak wrote: > > On Wed, Jun 24, 2020 at 3:06 PM H.J. Lu wrote: > > > > On Wed, Jun 24, 2020 at 02:43:43PM +0200, Uros Bizjak wrote: > > > > > > > > Here is the updated patch for x86 backend and libgcc. driver-i386.c > > > > is unchanged. > > > > > > Thanks.

Re: [Patch][gcn, nvptx, offloading] mkoffload – handle -fpic/-fPIC

2020-06-24 Thread Jakub Jelinek via Gcc-patches
On Wed, Jun 24, 2020 at 03:36:25PM +0200, Tobias Burnus wrote: > > What about 'gcc/config/i386/intelmic-mkoffload.c'? I see that one > > unconditionally passes '-fPIC' to some things -- is that doing the right > > thing for your case, too? > > I have not setup intelmic to test, but it uses -fPIC

[PATCH] tree-optimization/95866 - avoid vectorizing uniform SLP subgraphs

2020-06-24 Thread Richard Biener
This avoids vectorizing SLP subgraphs that just compute uniform operations on all-same operands. That fixes the less interesting (but most embarrasing) part of the testcase in the PR. On the way it also fixed a missing matches[0] reset in the last refactoring touching that place. Bootstrap / reg

Re: [PATCH PR95700] Use nullptr instead of NULL as a sentinel value

2020-06-24 Thread Jonathan Wakely via Gcc-patches
On 24/06/20 12:31 +0200, Ilya Leoshkevich wrote: Bootstrapped and regtested on x86_64-redhat-linux, ppc64le-redhat-linux and s390x-redhat-linux. Ok for master? --- Bootstrap with musl libc fails with numerous "missing sentinel in function call" errors. This is because musl defines NULL as 0L

Re: [PATCH] VEC_COND_EXPR: clean up first argument

2020-06-24 Thread Richard Biener via Gcc-patches
On Wed, Jun 24, 2020 at 11:27 AM Martin Liška wrote: > > On 6/24/20 11:09 AM, Richard Biener wrote: > > On Wed, Jun 24, 2020 at 10:49 AM Martin Liška wrote: > >> > >> On 6/24/20 9:43 AM, Richard Biener wrote: > >>> Hmm, can you instead use simple_dce_from_worklist and simply > >>> record all SSA_

Re: [PATCH PR95700] Use nullptr instead of NULL as a sentinel value

2020-06-24 Thread Richard Biener via Gcc-patches
On Wed, Jun 24, 2020 at 4:14 PM Jonathan Wakely via Gcc-patches wrote: > > On 24/06/20 12:31 +0200, Ilya Leoshkevich wrote: > >Bootstrapped and regtested on x86_64-redhat-linux, ppc64le-redhat-linux > >and s390x-redhat-linux. > > > >Ok for master? > > > >--- > > > >Bootstrap with musl libc fails w

Re: [PATCH] Make contrib/download_prerequisites work on AIX and OpenBSD

2020-06-24 Thread David Edelsohn via Gcc-patches
On Wed, Jun 24, 2020 at 3:33 AM Richard Biener wrote: > > On Tue, Jun 23, 2020 at 10:37 PM Ilya Leoshkevich via Gcc-patches > wrote: > > > > Hello, > > > > I needed to test [1] on AIX and OpenBSD and noticed > > download_prerequisites doesn't work there. The attached patch fixes > > it. > > > > O

V2 [PATCH] x86: Share _isa_names_table and use cpuinfo.h

2020-06-24 Thread H.J. Lu via Gcc-patches
On Wed, Jun 24, 2020 at 03:46:25PM +0200, Uros Bizjak wrote: > On Wed, Jun 24, 2020 at 3:37 PM Uros Bizjak wrote: > > > > On Wed, Jun 24, 2020 at 3:06 PM H.J. Lu wrote: > > > > > > On Wed, Jun 24, 2020 at 02:43:43PM +0200, Uros Bizjak wrote: > > > > > > > > > > Here is the updated patch for x86 b

Re: V2 [PATCH] x86: Share _isa_names_table and use cpuinfo.h

2020-06-24 Thread Uros Bizjak via Gcc-patches
On Wed, Jun 24, 2020 at 4:38 PM H.J. Lu wrote: > > On Wed, Jun 24, 2020 at 03:46:25PM +0200, Uros Bizjak wrote: > > On Wed, Jun 24, 2020 at 3:37 PM Uros Bizjak wrote: > > > > > > On Wed, Jun 24, 2020 at 3:06 PM H.J. Lu wrote: > > > > > > > > On Wed, Jun 24, 2020 at 02:43:43PM +0200, Uros Bizjak

Re: [PATCH] x86: Add Cooper Lake detection with AVX512BF16

2020-06-24 Thread Uros Bizjak via Gcc-patches
On Wed, Jun 24, 2020 at 3:12 PM H.J. Lu wrote: > > All Sky Lake family processors have the same CPUID model number, 0x55. > The differences are Cascade Lake has AVX512VNNI and Cooper Lake has > AVX512VNNI + AVX512BF16. Check AVX512BF16 for Cooper Lake. > > PR target/95774 > * comm

[PATCH] x86: Remove brand ID check for Intel processors

2020-06-24 Thread H.J. Lu via Gcc-patches
Brand ID was a feature that briefly existed in some Pentium III and Pentium 4 CPUs. The CPUs that had non-zero brand ID still have had valid family/model. Brand ID just gives a marketing name for the CPU. Remove the extra code for brand ID check. gcc/ PR target/95660 * common/co

Re: [PATCH] x86: Remove brand ID check for Intel processors

2020-06-24 Thread Uros Bizjak via Gcc-patches
On Wed, Jun 24, 2020 at 5:01 PM H.J. Lu wrote: > > Brand ID was a feature that briefly existed in some Pentium III and > Pentium 4 CPUs. The CPUs that had non-zero brand ID still have had > valid family/model. Brand ID just gives a marketing name for the CPU. > Remove the extra code for brand ID

Re: [PATCH] libgomp: added simple functions and tests for OMPD

2020-06-24 Thread y2s1982 . via Gcc-patches
Hello, Thank you for the tips. I have some follow up questions. :) On Wed, Jun 24, 2020 at 5:25 AM Jakub Jelinek wrote: > > libgomp/ChangeLog: > > > > * Makefile.am (toolexeclib_LTLIBRARIES and related): Add > libgompd.la. > > Please spell out all the changes. I.e. > * Makefile.a

[PATCH] powerpc: Restore bootstrap for PPC Darwin.

2020-06-24 Thread Iain Sandoe
Hi, Darwin has signed chars and the fields in the insn_data struct are const char, which leads to a bootstrap fail with "error: comparison of integer expressions of different signedness: 'unsigned int' and 'const char' [-Werror=sign-compare]” OK for master? Iain gcc/ChangeLog: * confi

Re: [PATCH] libgomp: added simple functions and tests for OMPD

2020-06-24 Thread Jakub Jelinek via Gcc-patches
On Wed, Jun 24, 2020 at 11:11:47AM -0400, y2s1982 . wrote: > > And introduce libgompd.map version script which will have the exported > > symbols in for now OMPD_5.0 symbol version. > > So > > OMPD_5.0 { > > global: > > ...; > > > > local: > > *; > > }; > > > > Oh I wasn't sure

Re: [PATCH] libgomp: added simple functions and tests for OMPD

2020-06-24 Thread Tobias Burnus
On 6/24/20 5:26 PM, Jakub Jelinek via Gcc-patches wrote: Just build the whole gcc tree. If you are at the toplevel of gcc tree (i.e. directory that contains libgomp subdirectory), do mkdir obj cd obj ../configure --disable-bootstrap --enable-languages=c,c++,fortran make -j16 # or how many cores

[PATCH] x96: Remove PTA_CLWB from PTA_ICELAKE_CLIENT

2020-06-24 Thread H.J. Lu via Gcc-patches
CLWB isn't supported on Ice Lake client. But Ice Lake server and Tiger Lake support it. Move PTA_CLWB to PTA_ICELAKE_SERVER and PTA_TIGERLAKE. PR target/95874 * config/i386/i386.h (PTA_ICELAKE_CLIENT): Remove PTA_CLWB. (PTA_ICELAKE_SERVER): Add PTA_CLWB. (PTA_TIGE

[PATCH] libgomp, fortran: Apply if clause to all sub-constructs in combined OpenMP constructs

2020-06-24 Thread Kwok Cheung Yeung
Hello There appears to be a bug in the handling of the 'if' clause (without a directive name modifier) for combined OpenMP constructs in the Fortran front-end: static void gfc_split_omp_clauses (gfc_code *code, gfc_omp_clauses clausesa[GFC_OMP_SPLIT_NUM]) { ... if (code

Re: [PATCH] libgomp: added simple functions and tests for OMPD

2020-06-24 Thread Jakub Jelinek via Gcc-patches
On Wed, Jun 24, 2020 at 06:03:26PM +0200, Tobias Burnus wrote: > On 6/24/20 5:26 PM, Jakub Jelinek via Gcc-patches wrote: > > > Just build the whole gcc tree. > > If you are at the toplevel of gcc tree (i.e. directory that contains libgomp > > subdirectory), do > > mkdir obj > > cd obj > > ../conf

Re: [PATCH] libgomp, fortran: Apply if clause to all sub-constructs in combined OpenMP constructs

2020-06-24 Thread Jakub Jelinek via Gcc-patches
On Wed, Jun 24, 2020 at 05:47:06PM +0100, Kwok Cheung Yeung wrote: > There appears to be a bug in the handling of the 'if' clause (without a > directive name modifier) for combined OpenMP constructs in the Fortran > front-end: > > static void > gfc_split_omp_clauses (gfc_code *code, >

Re: [PATCH] PR fortran/95826 - Buffer overflows with PDTs and long symbols

2020-06-24 Thread Thomas Koenig via Gcc-patches
Hi Harald, here's another fix for a buffer overflow with long symbols. Is the memory you allocate freed anywhere? We have a large number of memory leaks in the front end, but maybe we shouldn't add another one :-) Best regards Thomas

Re: [PATCH] PR fortran/95827 - Buffer overflows with PDTs and long symbols

2020-06-24 Thread Thomas Koenig via Gcc-patches
Hi Haraldd, here's another case with a buffer that did overflow. Regtested on x86_64-pc-linux-gnu. OK for master / backports? OK. Thanks for the patch! Best regards Thomas

Re: [PATCH] PR fortran/95826 - Buffer overflows with PDTs and long symbols

2020-06-24 Thread Harald Anlauf
Hi Thomas, > Is the memory you allocate freed anywhere? We have a large > number of memory leaks in the front end, but maybe we shouldn't > add another one :-) my reading of the definition of XALLOCAVEC include/libiberty.h:#define XALLOCAVEC(T, N)((T *) alloca (sizeof (T) * (N))) and allo

Re: [PATCH] libgomp, fortran: Apply if clause to all sub-constructs in combined OpenMP constructs

2020-06-24 Thread Tobias Burnus
Hi Kwok, the TODO is fixed by the attached patch; I would be happy if you could handle this patch, e.g. together with your patch – or as follow up. (Lightly tested only, i.e. it fixes the ICE but I did not do a full testsuite run. But I regard it as obvious.) Tobias On 6/24/20 6:47 PM, Kwok C

[Patch] [OpenMP, Fortran] Add structure/derived-type element mapping

2020-06-24 Thread Tobias Burnus
(OpenMP 5 extends this a lot, but this is about OpenMP 4.5. It touches code which is also used by OpenACC's attach/detach.) @OpenACC/Julian: I think the character attach/detach for deferred-length strings does not work properly with OpenACC; I did not touch this code – but I think it needs some l

Re: [PATCH] powerpc: Restore bootstrap for PPC Darwin.

2020-06-24 Thread Segher Boessenkool
Hi! On Wed, Jun 24, 2020 at 04:15:53PM +0100, Iain Sandoe wrote: > Darwin has signed chars and the fields in the insn_data > struct are const char, which leads to a bootstrap fail with > > "error: comparison of integer expressions of different signedness: 'unsigned > int' and 'const char' [-Werr

Re: [PATCH] PR 83938 Reduce memory consumption in stable_sort/inplace_merge

2020-06-24 Thread Jonathan Wakely via Gcc-patches
On 11/06/20 08:32 +0200, François Dumont via Libstdc++ wrote: As we are on patching algos we still have this old one.     From the original patch I only kept the memory optimization part as the new performance test was not showing good result for the other part to change pivot value. I als

Re: Fortran: Fix character-kind=4 substring resolution (PR95837)

2020-06-24 Thread Thomas Koenig via Gcc-patches
Hi Tobias, OK for the trunk? I just checked, and this gets a segfault for program main character (len=3), parameter :: x = 'abc' print *, x(2:2) end program main + if (ts) +e->kind = ts->kind; + else if (e->symtree->n.sym->ts.type == BT_CHARACTER) +e->kind = ts->kind; There a

Re: Fortran: Fix character-kind=4 substring resolution (PR95837)

2020-06-24 Thread Tobias Burnus
Hi Thomas, could you review the second patch instead? I have sent the wrong patch (early draft) and corrected it half an hour later! https://gcc.gnu.org/pipermail/gcc-patches/2020-June/548779.html Tobias On 6/24/20 8:01 PM, Thomas Koenig via Fortran wrote: Hi Tobias, OK for the trunk? I

Re: [PATCH 0/3, v2] rs6000: Add support for Matrix-Multiply Assist (MMA) built-in functions.

2020-06-24 Thread Peter Bergner via Gcc-patches
On 6/18/20 3:42 PM, Peter Bergner wrote: > POWER ISA 3.1 added new Matrix-Multiply Assist (MMA) instructions. > The following patch set adds support for generating these instructions > through built-in functions which are enabled with the -mmma option. > > The patch1 and patch1+patch2+patch3 have

[PATCH 1/2] simplify-rtx: Parity of parity is parity

2020-06-24 Thread Segher Boessenkool
From: Roger Sayle 2020-06-24 Roger Sayle * simplify-rtx.c (simplify_unary_operation_1): Simplify (parity (parity x)) as (parity x), i.e. PARITY is idempotent. --- gcc/simplify-rtx.c | 4 1 file changed, 4 insertions(+) diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.

[PATCH 2/2] simplify-rtx: Simplify rotates by zero

2020-06-24 Thread Segher Boessenkool
From: Roger Sayle 2020-06-24 Roger Sayle Segher Boessenkool * simplify-rtx.c (simplify_unary_operation_1): Simplify rotates by 0. --- gcc/simplify-rtx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index 65008ea..3e913b5

Re: [PATCH 0/3, v2] rs6000: Add support for Matrix-Multiply Assist (MMA) built-in functions.

2020-06-24 Thread Segher Boessenkool
Hi! On Wed, Jun 24, 2020 at 02:28:00PM -0500, Peter Bergner via Gcc-patches wrote: > On 6/18/20 3:42 PM, Peter Bergner wrote: > > POWER ISA 3.1 added new Matrix-Multiply Assist (MMA) instructions. > > The following patch set adds support for generating these instructions > > through built-in funct

Re: [PATCH] c++: Fix CTAD for aggregates in template [PR95568]

2020-06-24 Thread Jason Merrill via Gcc-patches
On 6/23/20 6:58 PM, Marek Polacek wrote: 95568 complains that CTAD for aggregates doesn't work within requires-clause and it turned out that it doesn't work when we try the deduction in a template. The reason is that maybe_aggr_guide creates a guide that can look like this template X(decltyp

[pushed] c++: Fix ICE with using and virtual function [PR95719]

2020-06-24 Thread Jason Merrill via Gcc-patches
Looking in the vtable for cand->conversion_path doesn't work because it's the base where we found the function, not the base where the function is defined. If those are different, look farther. Applying to trunk and 10. The second patch uses that same base lookup for the actual conversion as

Re: Fortran: Fix character-kind=4 substring resolution (PR95837)

2020-06-24 Thread Thomas Koenig via Gcc-patches
Hi Tobias, could you review the second patch instead? I have sent the wrong patch (early draft) and corrected it half an hour later! Sorry, I missed that. Here's the review of the real patch :-) So, the first part is + if (ts) +e->ts.kind = ts->kind; Ok, I unerstand that - ts has been

Re: [PATCHv8] c++:Handle TYPE_PACK_EXPANSION in cxx_incomplete_type_diagnostic[PR96752]

2020-06-24 Thread Jason Merrill via Gcc-patches
I'm applying your patch with some tweaks. First, I shortened your subject line; we try to keep them under 50 chars so they look good in git log --oneline. Going over isn't a big deal, but that's the goal. On 6/23/20 3:47 PM, Nicholas Krause wrote: From: Nicholas Krause This fixes the PR95

[pushed] coroutines, testsuite: Update tests for get-return-object errors.

2020-06-24 Thread Iain Sandoe
Hi, Just an improvement to test-coverage, tested on x86_64-darwin,linux powerpc64-linux applied to master, thanks Iain = We updated the handling of the errors for cases when the ramp return cannot be constructed from the user's provided get-return-object method. This updates the testcases

Re: [PATCH] PR 83938 Reduce memory consumption in stable_sort/inplace_merge

2020-06-24 Thread François Dumont via Gcc-patches
On 24/06/20 7:39 pm, Jonathan Wakely wrote: On 11/06/20 08:32 +0200, François Dumont via Libstdc++ wrote: As we are on patching algos we still have this old one.     From the original patch I only kept the memory optimization part as the new performance test was not showing good result for

Re: [PATCH] Treat { 0 } specially for structs with the designated_init attribute.

2020-06-24 Thread Asher Gordon via Gcc-patches
Hi Martin, Asher Gordon writes: > Martin Sebor writes: > >> Unfortunately, attributes don't have locations (yet). > > Hmm, well maybe I could implement that. I'm not very familiar with the > GCC source (this is my first patch), but I'll see if I can figure it > out. It would probably be useful

[PATCH] PR fortran/95828 - Buffer overflows with SELECT RANK

2020-06-24 Thread Harald Anlauf
Another case of buffer overflow, this time coming in pairs. Regtested on x86_64-pc-linux-gnu. OK for master? Thanks, Harald PR fortran/95828 - Buffer overflows with SELECT RANK With SELECT RANK, name mangling results in long internal symbols that overflows internal buffers. Fix that. gcc/fo

[PATCH] c++: Improve checking of decls with trailing return type [PR95820]

2020-06-24 Thread Marek Polacek via Gcc-patches
This is an ICE-on-invalid but I've been seeing it when reducing various testcases, so it's more important for me than usually. splice_late_return_type now checks that if we've seen a late return type, the function return type was auto. That's a fair assumption but grokdeclarator/cdk_function wasn

Re: [PATCH] Treat { 0 } specially for structs with the designated_init attribute.

2020-06-24 Thread Martin Sebor via Gcc-patches
On 6/24/20 2:15 PM, Asher Gordon wrote: Hi Martin, Asher Gordon writes: Martin Sebor writes: Unfortunately, attributes don't have locations (yet). Hmm, well maybe I could implement that. I'm not very familiar with the GCC source (this is my first patch), but I'll see if I can figure it o

Re: [PATCH 1/7 v5] ifn/optabs: Support vector load/store with length

2020-06-24 Thread Segher Boessenkool
Hi! On Tue, Jun 23, 2020 at 01:20:53PM +0100, Richard Sandiford wrote: > SVE supports integer division btw. :-) So does Power (ISA 3.1, power10). > In summary, I'm not saying we should never define the inactive values > to be zero. I just think that we should leave it until it matters. > And I

Re: [PATCH 1/6 ver 3] rs6000, Update support for vec_extract

2020-06-24 Thread Segher Boessenkool
Hi! On Thu, Jun 18, 2020 at 03:20:01PM -0700, Carl Love wrote: > 2020-06-18 Carl Love > > * config/rs6000/altivec.md: (UNSPEC_EXTRACTL, UNSPEC_EXTRACTR) > (vextractl, vextractr) > (vextractl_internal, vextractr_internal) Please say what the iterator for the is? Just adding

Re: [PATCH 2/6 ver 3] rs6000 Add vector insert builtin support

2020-06-24 Thread Segher Boessenkool
Hi! On Thu, Jun 18, 2020 at 03:20:05PM -0700, Carl Love wrote: > * config/rs6000/altivec.h (vec_insertl, vec_inserth): New defines. > * config/rs6000/rs6000-builtin.def (VINSERTGPRBL, VINSERTGPRHL, > VINSERTGPRWL, VINSERTGPRDL, VINSERTVPRBL, VINSERTVPRHL, VINSERTVPRWL, > VI

Re: [PATCH 3/6 ver 3] rs6000, Add vector replace builtin support

2020-06-24 Thread Segher Boessenkool
Hi! On Thu, Jun 18, 2020 at 03:20:10PM -0700, Carl Love wrote: > +The programmer is responsible for understanding the endianness issues > involved > +with the first argument and the result. :-) > --- /dev/null > +++ b/gcc/testsuite/gcc.target/powerpc/vec-replace-word-runnable.c > @@ -0,0 +1,289

Re: [PATCH] Treat { 0 } specially for structs with the designated_init attribute.

2020-06-24 Thread Asher Gordon via Gcc-patches
Martin Sebor writes: > I have no experience with changing tree nodes but I wouldn't be > surprised if there were assumptions baked into code that made it > a non-trivial exercise. > > There's also lots of sharing of data in GCC so I'm not sure it > makes sense for an identifier to have an associa

Re: [PATCH] Add TARGET_UPDATE_DECL_ALIGNMENT [PR95237]

2020-06-24 Thread Sunil Pandey via Gcc-patches
On Wed, Jun 24, 2020 at 12:30 AM Richard Biener wrote: > > On Tue, Jun 23, 2020 at 5:31 PM Sunil K Pandey via Gcc-patches > wrote: > > > > From: Sunil K Pandey > > > > Default for this hook is NOP. For x86, in 32 bit mode, this hook > > sets alignment of long long on stack to 32 bits if preferre

  1   2   >