Re: [PATCH] RISC-V: Fix regular expression in target-specific test

2020-07-10 Thread Jim Wilson
On Fri, Jul 10, 2020 at 6:53 AM Simon Cook wrote: > Some square brackets were missing escape characters, causing DejaGnu to > try and call a proc with the name "at". > > gcc/testsuite/ChangeLog: > > * gcc.target/riscv/read-thread-pointer.c: Fix escaping on > regular expression. Th

Re: [PATCH] rs6000: Define movsf_from_si2 to extract high part SF element from DImode[PR89310]

2020-07-10 Thread Segher Boessenkool
Hi! On Fri, Jul 10, 2020 at 09:39:40AM +0800, luoxhu wrote: > OK, seems the md file needs a format tool too... Heh. Just make sure it looks good (that is, does what it looks like), looks like the rest, etc. It's hard to do anything nice with unspecs, [ ] lists do not format well. > >> + "TARG

Re: [PATCH 2/2] rs6000: Define define_insn_and_split to split unspec sldi+or to rldimi

2020-07-10 Thread Segher Boessenkool
Hi! On Thu, Jul 09, 2020 at 09:14:45PM -0500, Xiong Hu Luo wrote: > * config/rs6000/rs6000.md (rotl_unspec): New > define_insn_and_split. > +; rldimi with UNSPEC_SI_FROM_SF. > +(define_insn_and_split "*rotl_unspec" Please have rotldi3_insert in the name. "unspec" in the name doesn't

Re: [PATCH 1/2] rs6000: Init V4SF vector without converting SP to DP

2020-07-10 Thread Segher Boessenkool
Hi! On Thu, Jul 09, 2020 at 09:14:44PM -0500, Xiong Hu Luo wrote: > Move V4SF to V4SI, init vector like V4SI and move to V4SF back. > Better instruction sequence could be generated on Power9: > The point is to use lwz to avoid converting the single-precision to > double-precision upon load, pack

[PATCH] rs6000: add effective-target test ppc_mma_hw

2020-07-10 Thread Aaron Sawdey via Gcc-patches
Add a test for dejagnu to determine if execution of MMA instructions is supported in the test environment. Add an execution test to make sure that __builtin_cpu_supports("mma") is true if we can execute MMA instructions. OK for trunk and backport to 10? Thanks! Aaron gcc/testsuite/ *

[PATCH] x86: Require Linux target for PR target/93492 tests

2020-07-10 Thread H.J. Lu via Gcc-patches
Since -fpatchable-function-entry is only supported on Linux and used by Linux kernel, require Linux target for PR target/93492 tests. PR target/93492 * gcc.target/i386/pr93492-1.c: Require Linux target. * gcc.target/i386/pr93492-2.c: Likewise. * gcc.target/i386/pr93

Re: Ping Re: c: Add C2X BOOL_MAX and BOOL_WIDTH to limits.h

2020-07-10 Thread Jeff Law via Gcc-patches
On Thu, 2020-07-09 at 15:40 +, Joseph Myers wrote: > Ping for this limits.h patch > ;. OK. jeff

Re: [PATCH] rs6000: Add execution tests for mma builtins [v4]

2020-07-10 Thread Segher Boessenkool
Hi! On Fri, Jul 10, 2020 at 03:49:02PM -0500, Aaron Sawdey via Gcc-patches wrote: > This patch adds execution tests that use the MMA builtins and > check for the right answer, and new tests that checks whether > __builtin_cpu_supports and __builtin_cpu_is return sane > answers for power10. > 2020

Re: [PATCH 4/6] Testsuite: Make it easier to debug environment setting functions

2020-07-10 Thread Jeff Law via Gcc-patches
On Thu, 2020-07-09 at 10:56 +0100, Tamar Christina wrote: > Hi All, > > This adds verbose output to dg-set-compiler-env-var and dg-set-target-env-var > so you can actually see what they're setting when you add -v -v. > > Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. > > Ok for

Re: [PATCH 5/6] Docs: Document environment setting directives for testsuite

2020-07-10 Thread Jeff Law via Gcc-patches
On Thu, 2020-07-09 at 10:57 +0100, Tamar Christina wrote: > Hi All, > > This document some of the existing DejaGnu directives to modify > environment variables before test or compiler invocations. > > Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. > > Ok for master? > > Thanks,

[PATCH] rs6000: Add execution tests for mma builtins [v4]

2020-07-10 Thread Aaron Sawdey via Gcc-patches
This patch adds execution tests that use the MMA builtins and check for the right answer, and new tests that checks whether __builtin_cpu_supports and __builtin_cpu_is return sane answers for power10. I've now cleaned up and separated things out so there are 4 test cases: * MMA single precision ex

Re: [PATCH] Improve shrink-wrapping debug output

2020-07-10 Thread Jeff Law via Gcc-patches
On Sat, 2020-07-04 at 16:07 +0300, Alexander Popov wrote: > Currently if requires_stack_frame_p() returns true for some insn, > the shrink-wrapping debug output contains only the number of a block > containing that insn. > > But it is very useful to see the particular insn that requires the > prol

Re: [PATCH, part 2] PR fortran/95980 - ICE in get_unique_type_string, at fortran/class.c:485

2020-07-10 Thread Thomas Koenig via Gcc-patches
Hi Harald, This is not a regression, so I don't think we will need a backport. understood. On the downside, another patch I was working on unfortunately partially overlaps with the present one in resolve.c. At some point, there will be a conflict between the work involved in either producing

Re: [PATCH] contrib: Don't pass wget options to curl

2020-07-10 Thread Jeff Law via Gcc-patches
On Tue, 2020-07-07 at 18:44 -0400, Mike Nolta via Gcc-patches wrote: > This is a harmless bug, as the script still works, but curl's '-O' > option isn't the same as wget's. > > contrib/ChangeLog: > > * download_prerequisites: Don't pass wget options to curl. THanks. I've pushed this to the

Aw: Re: [PATCH, part 2] PR fortran/95980 - ICE in get_unique_type_string, at fortran/class.c:485

2020-07-10 Thread Harald Anlauf
Hi Thomas, > This is not a regression, so I don't think we will need a backport. understood. On the downside, another patch I was working on unfortunately partially overlaps with the present one in resolve.c. At some point, there will be a conflict between the work involved in either producing

libgo patch committed: Update to Go 1.14.4 release

2020-07-10 Thread Ian Lance Taylor via Gcc-patches
This patch updates libgo to the Go 1.14.4 release. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to trunk and GCC 10 branch. Ian 2b6d99468d4d988fd5f5ea3e9be41a3dc95a1291 diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index ecef60400cc..64b13f410e0 100644 ---

Re: [PATCH] aarch64: Change costs for TX2 to expose more vectorization opportunities

2020-07-10 Thread Richard Sandiford
Anton Youdkevitch writes: > Richard, > > Can you approve the backporting of the patch to GCC10? > Also, since I don't have the commit permission can you push > it if approved? Yeah, that's fine. Now pushed there too. Thanks, Richard

Re: [PATCH] implement pre-c++20 contracts

2020-07-10 Thread Jeff Chapman via Gcc-patches
Hello again :) Attached is a new squashed revision of the patch sans ChangeLogs. The current work is now being done on github: https://github.com/lock3/gcc/tree/contracts-jac-alt Please let me know if there's a better way to share revisions. >>> + /* Check that assertions are null statements.

Re: [PATCH][RFC] vector creation from two parts of two vectors produces TBL rather than ins (PR93720)

2020-07-10 Thread Dmitrij Pochepko
Hi, thank you for reviewing it. Please check updated version(attached) with all comments addressed. Thanks, Dmitrij On Tue, Jun 23, 2020 at 06:10:52PM +0100, Richard Sandiford wrote: ... > > I think it would be better to test this as part of the loop below. > done ... > I think it'd be bette

Re: [PATCH] Fortran : ICE in gfc_find_array_ref(): No ref found PR95981

2020-07-10 Thread Thomas Koenig via Gcc-patches
Hi Mark, Fortran  :  ICE in gfc_find_array_ref(): No ref found PR95981 OK for master. With regards to backporting, copy & paste my remarks from the previous e-mails :-) Best regards Thomas

Re: [PATCH] Fortran : Implicitly type parameter causes an invalid error, PR96038

2020-07-10 Thread Thomas Koenig via Gcc-patches
Am 09.07.20 um 10:00 schrieb Mark Eggleston: Please find attached patch for fix PR.  The original patch was provided by Steve Kargl in the initial problem report. OK to commit to master and backport? OK for master. Same remark as just - not a regression, so if you decide to backport, please

Re: [PATCH] Fortran : accepts pointer initialization of DT dummy args, PR45337

2020-07-10 Thread Thomas Koenig via Gcc-patches
Am 09.07.20 um 09:51 schrieb Mark Eggleston: Please find attached a fix for this PR. I think the discussion of intent muddied the waters for this PR. As I understand it initialisation of variables implies the save attribute. The save attribute is incompatible with the dummy attribute so an err

RE: [PATCH] arm: Treat GNU and Advanced SIMD vectors as distinct [PR92789, PR95726]

2020-07-10 Thread Kyrylo Tkachov
> -Original Message- > From: Richard Sandiford > Sent: 10 July 2020 17:54 > To: gcc-patches@gcc.gnu.org > Cc: ni...@redhat.com; Richard Earnshaw ; > Ramana Radhakrishnan ; Kyrylo > Tkachov > Subject: [PATCH] arm: Treat GNU and Advanced SIMD vectors as distinct > [PR92789, PR95726] > >

Re: [PATCH] PR fortran/96086 - ICE in gfc_match_select_rank, at fortran/match.c:6645

2020-07-10 Thread Thomas Koenig via Gcc-patches
Am 06.07.20 um 22:11 schrieb Harald Anlauf: More NULL pointer dereferences on invalid code, detected by Gerhard. Regtested on x86_64-pc-linux-gnu. OK for master? OK. This is actually a regression (does not occur with gcc-8), so if you feel like it, feel free to backport this. However, if yo

Re: [PATCH, part 2] PR fortran/95980 - ICE in get_unique_type_string, at fortran/class.c:485

2020-07-10 Thread Thomas Koenig via Gcc-patches
Hi Harald, As Dominique pointed out in the PR, the committed patch (part 1) fixed only one of the provided testcases, but not the original one. That turned out to be a long and winding road, requiring further checks for NULL pointer dereferences. The resulting attached changes have been regtes

[patch, fortran] Fix PR 96018, wrong code caused by implicit_pure

2020-07-10 Thread Thomas Koenig via Gcc-patches
Hello world, the attached patch fixes a 9/10/11 regression where we left over an implicit_pure attribute when a non-implicit_pure procedure was called. The fix is explained in the ChangeLog. If there is a quick review, please also indicate if you think it is still suitable for gcc 10.2. If the

[PATCH] arm: Treat GNU and Advanced SIMD vectors as distinct [PR92789, PR95726]

2020-07-10 Thread Richard Sandiford
This is an arm version of aarch64 patch r11-1741. The approach is essentially identical, not much more than s/aarch64/arm/. To recap, PR95726 is about template look-up for things like: foo foo The immediate cause of the problem is that the hash function usually returns different hashes

Patch RFA: In C++ demangler don't treat lambda as substitution candidate

2020-07-10 Thread Ian Lance Taylor via Gcc-patches
As discussed in PR 96143, the C++ frontend and the demangler disagree as to whether a lambda is a substitution candidate. According to the ABI, the C++ frontend is behaving correctly. This patch changes the demangler accordingly. This caused the demangling of several existing test cases to chang

Re: [PATCH] expr: Move reduce_bit_field target mode check [PR96151]

2020-07-10 Thread Aaron Sawdey via Gcc-patches
This fixed the ICE I was seeing, thanks. Aaron Sawdey, Ph.D. saw...@linux.ibm.com IBM Linux on POWER Toolchain > On Jul 10, 2020, at 10:40 AM, Richard Sandiford > wrote: > > In some cases, expand_expr_real_2 prefers to use the mode of the > caller-suggested target instead of the mode of the

[PATCH] ipa-fnsummary: Fix ICE with switch predicates [PR96130]

2020-07-10 Thread Jakub Jelinek via Gcc-patches
Hi! The following testcase ICEs since r10-3199. There is a switch with default label, where the controlling expression has range just 0..7 and there are case labels for all those 8 values, but nothing has yet optimized away the default. Since r10-3199, set_switch_stmt_execution_predicate sets the

Re: [PATCH] c++: Fix tentative parsing of enum-specifier [PR96077]

2020-07-10 Thread Marek Polacek via Gcc-patches
On Fri, Jul 10, 2020 at 05:53:21PM +0200, Jakub Jelinek wrote: > On Fri, Jul 10, 2020 at 11:43:59AM -0400, Marek Polacek via Gcc-patches wrote: > > diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c > > index 528b41b7170..ee6a956aea9 100644 > > --- a/gcc/cp/parser.c > > +++ b/gcc/cp/parser.c > > @@ -19

Re: [PATCH] expr: Move reduce_bit_field target mode check [PR96151]

2020-07-10 Thread Jeff Law via Gcc-patches
On Fri, 2020-07-10 at 16:40 +0100, Richard Sandiford wrote: > In some cases, expand_expr_real_2 prefers to use the mode of the > caller-suggested target instead of the mode of the expression when > passing values to reduce_to_bit_field_precision. E.g.: > > else if (target == 0) > op

Re: [PATCH] c++: Fix tentative parsing of enum-specifier [PR96077]

2020-07-10 Thread Jakub Jelinek via Gcc-patches
On Fri, Jul 10, 2020 at 11:43:59AM -0400, Marek Polacek via Gcc-patches wrote: > diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c > index 528b41b7170..ee6a956aea9 100644 > --- a/gcc/cp/parser.c > +++ b/gcc/cp/parser.c > @@ -19412,7 +19412,12 @@ cp_parser_enum_specifier (cp_parser* parser) >

[PATCH] c++: Fix tentative parsing of enum-specifier [PR96077]

2020-07-10 Thread Marek Polacek via Gcc-patches
Here's an interesting issue: in this code a ) is missing: enum { E = (2 } e; but we compile the code anyway, and E is set to 0 in build_enumerator, which is sneaky. The problem is that cp_parser_enum_specifier parses tentatively, because when we see the enum keyword, we don't know yet if we'll

[PATCH] expr: Move reduce_bit_field target mode check [PR96151]

2020-07-10 Thread Richard Sandiford
In some cases, expand_expr_real_2 prefers to use the mode of the caller-suggested target instead of the mode of the expression when passing values to reduce_to_bit_field_precision. E.g.: else if (target == 0) op0 = convert_to_mode (mode, op0, TYPE_UNSI

Re: [PATCH] rs6000: Allow MMA built-in initialization regardless of compiler options

2020-07-10 Thread Peter Bergner via Gcc-patches
On 7/9/20 4:10 PM, Peter Bergner wrote: > I verified the updated test case passes on both LE and BE, so I've > pushed this now. I'll let Bill Seurer's nightly testing try this > on a wider variety of builds before backporting this to GCC10. > I'll try and do that tomorrow. Bill's nightly testsuit

Re: [PATCH] middle-end: Call get_constant_section with DECL not EXP.

2020-07-10 Thread David Edelsohn via Gcc-patches
On Fri, Jul 10, 2020 at 2:55 AM Richard Biener wrote: > > On Thu, Jul 9, 2020 at 8:29 PM David Edelsohn wrote: > > > > output_constant_def_contents() can call get_constant_section() with an > > EXP that is a CONSTRUCTOR, which is not a declaration. This can hit > > asserts in GCC machinery to ch

Re: testsuite: missed testcase

2020-07-10 Thread Nathan Sidwell
On 7/10/20 10:28 AM, Christophe Lyon wrote: Hi, On Tue, 7 Jul 2020 at 20:47, Nathan Sidwell wrote: I discovered I'd missed applying a testcase when fixing up the EOF token location a while back. gcc/testsuite/ * c-c++-common/cpp/pragma-eof.c: New The new testcase fail

Re: [PATCH 2/2] openacc: Adjust dynamic reference count semantics

2020-07-10 Thread Thomas Schwinge
Hi Julian! On 2020-07-09T17:06:59-0700, Julian Brown wrote: > This patch adjusts how dynamic reference counts work so that they match > the semantics of the source program more closely, instead of representing > "excess" reference counts beyond those that represent pointers in the > internal libg

Re: testsuite: missed testcase

2020-07-10 Thread Christophe Lyon via Gcc-patches
Hi, On Tue, 7 Jul 2020 at 20:47, Nathan Sidwell wrote: > > I discovered I'd missed applying a testcase when fixing up the EOF token > location a while back. > > gcc/testsuite/ > * c-c++-common/cpp/pragma-eof.c: New > The new testcase fails on targets that do not support openmp

Re: [PATCH 1/2] openacc: Helper functions for enter/exit data using single mapping

2020-07-10 Thread Thomas Schwinge
Hi Julian! On 2020-07-09T17:06:58-0700, Julian Brown wrote: > This patch factors out the parts of goacc_enter_datum and > goacc_exit_datum that can be shared with goacc_enter_data_internal > and goacc_exit_data_internal respectively (in the next patch), > without overloading function return value

[PATCH] RISC-V: Fix regular expression in target-specific test

2020-07-10 Thread Simon Cook
Some square brackets were missing escape characters, causing DejaGnu to try and call a proc with the name "at". gcc/testsuite/ChangeLog: * gcc.target/riscv/read-thread-pointer.c: Fix escaping on regular expression. --- gcc/testsuite/gcc.target/riscv/read-thread-pointer.c | 2 +-

Ping: [PATCH] diagnostics: Add options to control the column units [PR49973] [PR86904]

2020-07-10 Thread Lewis Hyatt via Gcc-patches
Hello- May I please ping you about this patch? Thanks! https://gcc.gnu.org/pipermail/gcc-patches/2020-June/547900.html -Lewis On Thu, Jun 11, 2020 at 11:26:28AM -0400, Lewis Hyatt wrote: > On Wed, Jun 10, 2020 at 12:11:00PM -0400, David Malcolm wrote: > > Thanks for the patch; sorry about the de

Re: [PATCH] rs6000: Refine RTL unroll adjust hook

2020-07-10 Thread Jiufu Guo via Gcc-patches
Hi Segher, Thanks a lot for your time and helpful comments! Segher Boessenkool writes: > Hi Jiufu, > > On Thu, Jul 09, 2020 at 04:01:38PM +0800, Jiufu Guo wrote: >> Segher Boessenkool writes: ... > If the generic code decides to unroll big loops with calls *and* jumps, > there is a big problem

Re: [PATCH] rs6000: Refine RTL unroll adjust hook

2020-07-10 Thread Jiufu Guo via Gcc-patches
Hi, Segher Boessenkool writes: > Hi Jiufu, > > On Thu, Jul 09, 2020 at 04:01:38PM +0800, Jiufu Guo wrote: >> Segher Boessenkool writes: >> >> But for each single condition, loop unrolling may still be helpful. >> >> While, if these conditions are all occur in a loop, it would be more >> >> po

Re: [PATCH V2] PING^2 correct COUNT and PROB for unrolled loop

2020-07-10 Thread Jiufu Guo via Gcc-patches
Hi Martin, Martin Liška writes: > On 7/10/20 4:14 AM, Jiufu Guo wrote: >> Thanks so much for your time and kindly help!!! > > And I run your patch on SPEC2006 with: > https://gcc.gnu.org/pipermail/gcc-patches/2020-July/549728.html > > Doing that I see just few changes: > > diff -qr /tmp/before

Re: [PATCH][RFC] __builtin_shuffle sometimes should produce zip1 rather than TBL (PR82199)

2020-07-10 Thread Dmitrij Pochepko
Hi, please take a look at updated version (attached). Thanks, Dmitrij On Wed, Jul 08, 2020 at 03:48:39PM +0100, Richard Sandiford wrote: ... > > maybe s/use bigger size up/combines odd and even elements/ done > It should be possible to do this without the to_constants, e.g.: > > poly_int64

[PATCH] testsuite: Fix WPA scanning.

2020-07-10 Thread Martin Liška
Installed to master. Martin gcc/testsuite/ChangeLog: PR gcov-profile/96148 * lib/scanwpaipa.exp: Fix wpa dump file suffix the same way as other in the file. --- gcc/testsuite/lib/scanwpaipa.exp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/

[pushed] c++: Support non-type template parms of union type.

2020-07-10 Thread Jason Merrill via Gcc-patches
Another thing newly allowed by P1907R1. The ABI group has discussed representing unions with designated initializers, and has separately specified how to represent designators; this patch implements both. Tested x86_64-pc-linux-gnu, applying to trunk. gcc/cp/ChangeLog: * tree.c (structu

[pushed] c++: Allow floating-point template parms in C++20.

2020-07-10 Thread Jason Merrill via Gcc-patches
P1907R1 made various adjustments to non-type template parameters, notably introducing the notion of "structural type". I implemented an early version of that specification in r10-4426, but it was adjusted in the final paper to allow more. This patch implements allowing template parameters of floa

[pushed] c++: [[no_unique_address]] fixes. [PR96105]

2020-07-10 Thread Jason Merrill via Gcc-patches
We were wrongly checking is_empty_class on the result of strip_array_types rather than the actual field type. We weren't considering the alignment of the data member. We needed to handle unions the same way as layout_nonempty_base_or_field. Tested x86_64-pc-linux-gnu, applying to trunk and 10.

Re: [PATCH v2]: Optimize a >= 0 && b >= 0 to (a | b) >= 0 [PR95731]

2020-07-10 Thread Marc Glisse
On Fri, 10 Jul 2020, Joe Ramsay wrote: adds a new pattern to simplify a >= 0 && b >= 0 to (a | b) >= 0. We should probably add the symmetric simplification of a<0|b<0 to (a|b)<0 * match.pd: New simplication. I think Jakub was suggesting something slightly mode detailed. It would be

Re: [PATCH 3/9] [OpenACC] Adjust dynamic reference count semantics

2020-07-10 Thread Julian Brown
On Fri, 3 Jul 2020 17:41:12 +0200 Thomas Schwinge wrote: > Hi Julian! > > On 2020-06-30T15:51:14+0200, I wrote: > > On 2020-06-16T15:38:33-0700, Julian Brown > > wrote: > >> This is a new version of the patch last sent here: > >> > >> https://gcc.gnu.org/pipermail/gcc-patches/2020-May/546332.

Re: [PATCH 3/7] [OpenACC] Don't pass kind array via pointer to goacc_enter_datum

2020-07-10 Thread Julian Brown
On Thu, 25 Jun 2020 12:52:23 +0200 Thomas Schwinge wrote: > Hi Julian! > > On 2020-05-22T15:16:06-0700, Julian Brown > wrote: > > Since goacc_enter_datum only maps a single data item now, there is > > no need to pass "kinds" as an array. Passing as a scalar allows > > for some simplification i

Re: [PATCH] x86: Check TARGET_AVX512VL when enabling FMA

2020-07-10 Thread H.J. Lu via Gcc-patches
On Fri, Jul 10, 2020 at 4:19 AM Jakub Jelinek wrote: > > On Thu, Jul 09, 2020 at 03:02:35PM -0700, H.J. Lu via Gcc-patches wrote: > --- a/gcc/config/i386/i386-expand.c > +++ b/gcc/config/i386/i386-expand.c > @@ -15540,7 +15540,11 @@ void ix86_emit_swsqrtsf (rtx res, rtx a, > machine_mode mode, bo

[PATCH v2]: Optimize a >= 0 && b >= 0 to (a | b) >= 0 [PR95731]

2020-07-10 Thread Joe Ramsay
Hi! Apologies, resending as I previously attached the wrong patch file. This is a fix for PR95731, which adds a new pattern to simplify a >= 0 && b >= 0 to (a | b) >= 0. Bootstrapped and tested on x86_linux and aarch64_linux. Any comments are appreciated. Thanks, Joe gcc/ChangeLog: 2020-05-2

Re: [PATCH] x86: Check TARGET_AVX512VL when enabling FMA

2020-07-10 Thread Jakub Jelinek via Gcc-patches
On Thu, Jul 09, 2020 at 03:02:35PM -0700, H.J. Lu via Gcc-patches wrote: --- a/gcc/config/i386/i386-expand.c +++ b/gcc/config/i386/i386-expand.c @@ -15540,7 +15540,11 @@ void ix86_emit_swsqrtsf (rtx res, rtx a, machine_mode mode, bool recip) /* e0 = x0 * a */ emit_insn (gen_rtx_SET (e0, gen_

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

2020-07-10 Thread Andrea Corallo
Kyrylo Tkachov writes: [...] > > Ok. > Thanks for doing this. > Kyrill Hi Kyrill, installed into trunk as d2ed233cb940. Thanks Andrea

Re: [PATCH] x86: Check TARGET_AVX512VL when enabling FMA

2020-07-10 Thread H.J. Lu via Gcc-patches
On Thu, Jul 9, 2020 at 3:02 PM H.J. Lu wrote: > > On Thu, Jul 9, 2020 at 6:35 AM H.J. Lu wrote: > > > > On Thu, Jul 9, 2020 at 5:04 AM Kirill Yukhin > > wrote: > > > > > > On 07 июл 09:06, H.J. Lu wrote: > > > > On Tue, Jul 7, 2020 at 8:56 AM Kirill Yukhin > > > > wrote: > > > > > > > > > > H

Re: [PATCH]: Optimize a >= 0 && b >= 0 to (a | b) >= 0 [PR95731]

2020-07-10 Thread Jakub Jelinek via Gcc-patches
On Fri, Jul 10, 2020 at 10:50:22AM +, Joe Ramsay wrote: > gcc/ChangeLog: > > 2020-05-20 Joe Ramsay > > * match.pd: New pattern to optimize a >= 0 && b >= 0 to (a | b) >= 0 Better * match.pd (a >= 0 && b >= 0 to (a | b) >= 0): New simplification. (and note the period at the

[PATCH]: Optimize a >= 0 && b >= 0 to (a | b) >= 0 [PR95731]

2020-07-10 Thread Joe Ramsay
Hi! This is a fix for PR95731, which adds a new pattern to simplify a >= 0 && b >= 0 to (a | b) >= 0. Bootstrapped and tested on x86_linux and aarch64_linux. Any comments are appreciated. Thanks, Joe gcc/ChangeLog: 2020-05-20 Joe Ramsay * match.pd: New pattern to optimize a >= 0 &

Re: [PATCH] middle-end: Improve RTL expansion in expand_mul_overflow,

2020-07-10 Thread Richard Sandiford
"Roger Sayle" writes: > Hi Richard, > >> On Thu, Jul 09, 2020 at 09:17:46AM +0100, Richard Sandiford wrote: >>> > + res = force_reg (mode, res); >>> >>> In general, this can be dangerous performance-wise on targets where >>> subregs are free. If the move survives to the register allocator

Re: [PATCH] remove premature vect_verify_datarefs_alignment

2020-07-10 Thread Kewen.Lin via Gcc-patches
on 2020/7/9 下午7:22, Richard Biener wrote: > On Thu, 9 Jul 2020, Kewen.Lin wrote: > >> on 2020/7/9 上午10:48, Kewen.Lin via Gcc-patches wrote: >>> Hi Richi, >>> >>> on 2020/7/8 下午10:45, Richard Biener wrote: This followup removes vect_verify_datarefs_alignment and its premature cancellation

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

2020-07-10 Thread Kyrylo Tkachov
Hi Andrea, Sorry for the delay > -Original Message- > From: Gcc-patches On Behalf Of > Andrea Corallo > Sent: 24 June 2020 11:04 > To: gcc-patches@gcc.gnu.org > Cc: Richard Earnshaw ; nd ; > Kyrill Tkachov > Subject: Re: [PATCH v4] arm: Implement Armv8.1-M low overhead loops > > Andrea

RE: [PATCH] middle-end: Improve RTL expansion in expand_mul_overflow,

2020-07-10 Thread Roger Sayle
Hi Richard, > On Thu, Jul 09, 2020 at 09:17:46AM +0100, Richard Sandiford wrote: >> > +res = force_reg (mode, res); >> >> In general, this can be dangerous performance-wise on targets where >> subregs are free. If the move survives to the register allocators, >> it increases the risk

[PATCH 7/7 v2] rs6000/testsuite: Vector with length test cases

2020-07-10 Thread Kewen.Lin via Gcc-patches
Hi, v2 changes: - Updated param from vect-with-length-scope to vect-partial-vector-usage - Add *-7*/*-8* to cover peeling alignment and gaps. All cases passed on powerpc64le-linux-gnu P9. BR, Kewen - gcc/testsuite/ChangeLog: * gcc.target/powerpc/p9-vec-length-1.h: New test.

[PATCH 5/7 v7] vect: Support vector load/store with length in vectorizer

2020-07-10 Thread Kewen.Lin via Gcc-patches
Hi Richard, The new version v7 is attached which has addressed your review comments on v6. Could you have a further look? Many thanks in advance! Bootstrapped/regtested on aarch64-linux-gnu and powerpc64le-linux-gnu P9. Even with explicit vect-partial-vector-usage settings 1/2 on Power target,

[Ada] Revert mistaken negation related to references to labels

2020-07-10 Thread Pierre-Marie de Rodat
Commit titled "Update handling of assigned value/unreferenced warnings" added a comment "... *unless* this is an actual parameter" and at the same time removed a "not" operator from the corresponding condition. This is now reverted to match both the previous code and the current comment. Tested on

[Ada] Preserve casing of output files

2020-07-10 Thread Pierre-Marie de Rodat
Windows is case insensitive but also case preserving, so we don't want to generate a file in lower case if the input file wasn't. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * osint-c.adb (Set_File_Name): Preserve casing of file. * osint.adb (File_Names_Equal): New

[Ada] Potentially unevaluated nested expressions

2020-07-10 Thread Pierre-Marie de Rodat
This patch fixes the general problem in the detection of potentially unevaluated nested expressions. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_util.adb (Immediate_Context_Implies_Is_Potentially_Unevaluated): New subprogram. (Is_Potentially_U

[Ada] Add warning for overlays changing scalar storage order

2020-07-10 Thread Pierre-Marie de Rodat
This makes the compiler issue an unconditional warning for an overlay that changes the scalar storage order, i.e. for an address clause when the overlaid and the underlying objects are of array or record types that have opposite scalar storage order. The reason is that the code generator does not

[Ada] Ada2020: AI12-0368 Declare expressions can be static

2020-07-10 Thread Pierre-Marie de Rodat
This patch implements AI12-0368, which allows declare expressions to be static. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_res.adb (Resolve_Expression_With_Actions): Check the rules of AI12-0368, and mark the declare expression as static or known at

[Ada] Spurious error on parameterless acccess_to_subprogram

2020-07-10 Thread Pierre-Marie de Rodat
Compiler rejects an indirect call through an Access_To_Subprogram value that denotes a parameterless subprogram, when the corresponding access type has a pre- or postcondition. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_ch3.adb (Build_Access_Subprogram_Wrapper_Body)

[Ada] Fix detection of actual parameters for procedure calls

2020-07-10 Thread Pierre-Marie de Rodat
Routine Is_Actual_Parameter, which deals with cross-references and pragma Unreferenced, for a procedure call like this: P (A); was wrongly returning True for both the identifiers P and A above, on the grounds that both have N_Procedure_Call_Statement as their parent. Now it only returns True f

[Ada] Remove references to non-existing E_Protected_Object

2020-07-10 Thread Pierre-Marie de Rodat
Nowhere in the code we call set Ekind to E_Protected_Object, so all the code that tests this is necessarily dead. This patch removes references to E_Protected_Object. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * einfo.ads (E_Protected_Object): Enumeration literal removed.

[Ada] Further improve the expansion of array aggregates

2020-07-10 Thread Pierre-Marie de Rodat
First, this change extends the memset optimization to the case of array aggregates nested in other aggregates, when the outer aggregates are expanded component-wise; second, it prevents the compiler from duplicating allocators and other nonstatic constructs present in an Others choice of array aggr

[Ada] Spurious error in generic dispatching constructor call

2020-07-10 Thread Pierre-Marie de Rodat
Given two interface types Ifc0 and Ifc1 where Ifc1 is a descendant of Ifc0, the frontend reports a spurious error handling a call to a Generic_Dispatching_Constructor instance that occurs as the operand of a qualified expression initializing an allocator where Ifc1'Class is the subtype_mark of the

[Ada] Part of implementation of AI12-0212: container aggregates

2020-07-10 Thread Pierre-Marie de Rodat
This is ongoing work for the implementation of Ada 2020 generalized aggregates for containers. The patch includes the infrastructure to support the new aspect and related subprograms, and implements the functionality of positional aggregates for set-like containers. Still to come: a) resolution a

[Ada] Fix internal error on if-expression in call returning tagged type

2020-07-10 Thread Pierre-Marie de Rodat
This removes the left-overs of an expansion done in Expand_Call_Helper in order to pass the correct accessibility level to the callee when the actual is an if-expression of an access type. The expansion uses a dummy temporary to analyze the outermost Expression_With_Actions it makes and removes it

[Ada] Cleanup excessive conditions in Check_Completion

2020-07-10 Thread Pierre-Marie de Rodat
In routine Check_Completion once the entity kind is determined, it is enough to look if the required completion is provided. However, those two tests were combined, so we were processing the entity several times, which was inelegant and inefficient. Tested on x86_64-pc-linux-gnu, committed on trun

[Ada] Small cleanup throughout Exp_Ch4

2020-07-10 Thread Pierre-Marie de Rodat
This replaces calls to Esize or RM_Size for standard integer types with their value, uses Standard_Long_Long_Unsigned directly in one case and Standard_Long_Long_Integer in another case, and changes the recently added Narrow_Large_Operation to use Uint instead of Nat for sizes. No functional chang

[Ada] Use small limit for aggregates inside subprograms

2020-07-10 Thread Pierre-Marie de Rodat
We want to favor large static aggregate at library level, but within subprograms, we want to favor loops instead when relevant. As part of this work we uncovered a missing freeze on allocator subtype marks showing up with this change, as well as the need to generate predicate checks within init pr

[Ada] Fix detection of volatile properties in SPARK

2020-07-10 Thread Pierre-Marie de Rodat
Now that volatile properties can be set on types, objects other than variable may have fine-grain volatile properties inherited through their type. This is now fixed. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_util.adb (Has_Enabled_Property): Add handling of

[Ada] Reuse SPARK expansion of attribute Update for delta_aggregate

2020-07-10 Thread Pierre-Marie de Rodat
For GNATprove we have a special expansion of attribute Update. It is now refactored it into a dedicated routine and reused for delta_aggregate. For attribute Update the behaviour is as it was; for delta_aggregate we now decorate the AST with range checks flags that were previously missing. Tested

[Ada] Fix failing assertions related to volatile objects

2020-07-10 Thread Pierre-Marie de Rodat
Comments for routines No_Caching_Enabled and Is_Effectively_Volatile, which are both related to volatile objects, were not enforced with assertions. As a result, we had failing assertions much deeper in the call tree, far from where the problems occur. This patch adds both the missing assertions an

[Ada] Revert too late setting of Ekind on discriminants

2020-07-10 Thread Pierre-Marie de Rodat
A recent patch enforced an existing comment in Is_Effectively_Volatile with an assertion. To satisfy this assertion, it also set the Ekind on discriminants earlier. However, a subtle prevention of cascaded errors in routine Enter_Name relies on the Ekind of discriminants being set late. This patch

[Ada] Fix expansion of 'Update with multiple choices in GNATprove

2020-07-10 Thread Pierre-Marie de Rodat
GNAT expands attribute Update applied to a record component into a sequence of assignments to a temporary object and applies range checks when analysing those assignment. GNATprove keeps such an aggregate unexpanded, so it misses range checks, especially when several components of a different type

[Ada] Make System.Generic_Bignums more flexible

2020-07-10 Thread Pierre-Marie de Rodat
Reorganize the code and add new generic parameters so that this unit can be reused in more contexts and in particular provide support for bounded large integers without needing any dynamic memory allocation nor secondary stack. Move the implementation of To_String to System.Generic_Bignums to allo

[Ada] Fix crash on quantified expression in expression function (2)

2020-07-10 Thread Pierre-Marie de Rodat
This just replaces Find_Aspect with Find_Value_Of_Aspect, which seems to be the preferred idiom to retrieve the value of an aspect. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * freeze.adb (Freeze_Expr_Types): Replace call to Find_Aspect with call to Find_Value_Of_

[Ada] Fix crash on quantified expression in expression function

2020-07-10 Thread Pierre-Marie de Rodat
The problem is that the compiler freezes the iterator type associated with a given type in the body of an expression function that contains a quantified expression for this type and happens to be the completion of a previous declaration. The reason is that Freeze_Expr_Types does not see that the

[Ada] Add global contracts to Ada.Numerics.Big_Numbers libraries

2020-07-10 Thread Pierre-Marie de Rodat
This patch adds global contracts to functions from Ada.Numerics.Big_Numbers.Big_Integers and Ada.Numerics.Big_Numbers.Big_Reals. This removes the warnings returned when using these functions in SPARK. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/a-nbnbin.ads, libg

Re: [PATCH] [AVX512] [PR87767] Optimize memory broadcast for constant vector under AVX512

2020-07-10 Thread Hongtao Liu via Gcc-patches
+ maintainer. cc H.J On Thu, Jul 9, 2020 at 4:33 PM Hongtao Liu wrote: > > Hi: > For a constant vector having one duplicated value, there's no need > to put the whole vector in the constant pool, using embedded broadcast > instead. > > Bootstrap test is Ok, regression test for i386/x86-64 bac

[PATCH] gcov: create folders with 0777.

2020-07-10 Thread Martin Liška
As mention in the PR, we should leave rights to umask. I'm going to install the patch if there are no comments. Martin libgcc/ChangeLog: PR gcov-profile/96035 * libgcov-driver-system.c: Create gcov folders with 0777 so that it respects a system umask. --- libgcc/libgcov

[PATCH] fix constant folding from array CTORs

2020-07-10 Thread Richard Biener
This fixes the case where we try to fold a read from an array initalizer and happen to cross the boundary of multiple CTORs which isn't really supported. For the interesting cases like the testcase we actually handle the folding by encoding the whole initializer. Bootstrapped and tested on x86_64

Re: [PATCH] Remove dead vector comparisons

2020-07-10 Thread Richard Biener via Gcc-patches
On Fri, Jul 10, 2020 at 9:50 AM Martin Liška wrote: > > As mentioned in the PR, we need to clean up orphan vector comparisons > that tend to happen be gimplification of VEC_COND_EXPR. > > I've done that easily in expand_vector_comparison where I add these > to a bitmap used in simple DCE. > > Patc

Re: [PATCH] Add -fdump-profile-report.

2020-07-10 Thread Richard Biener via Gcc-patches
On Thu, Jul 9, 2020 at 1:55 PM Martin Liška wrote: > > When using -fprofile-report, -fdump-profile-report can be used to > print the report to a foo.c.000i.profile-report file instead > of stderr. I see it handy for comparison purpose. > > Patch can bootstrap on x86_64-linux-gnu and survives regre

[PATCH] Remove dead vector comparisons

2020-07-10 Thread Martin Liška
As mentioned in the PR, we need to clean up orphan vector comparisons that tend to happen be gimplification of VEC_COND_EXPR. I've done that easily in expand_vector_comparison where I add these to a bitmap used in simple DCE. Patch can bootstrap on x86_64-linux-gnu and survives regression tests.

Re: [PATCH] rs6000: Split movsf_from_si from high word before reload[PR89310]

2020-07-10 Thread luoxhu via Gcc-patches
On 2020/7/10 03:25, Segher Boessenkool wrote: > >> + "TARGET_NO_SF_SUBREG" >> + "#" >> + "&& vsx_reg_sfsubreg_ok (operands[0], SFmode)" > > Put this in the insn condition? And since this is just a predicate, > you can just use it instead of gpc_reg_operand. > > (The split condition become

Re: [PATCH 5/7 v6] vect: Support vector load/store with length in vectorizer

2020-07-10 Thread Kewen.Lin via Gcc-patches
Hi Richard, on 2020/7/8 下午8:50, Richard Sandiford wrote: > "Kewen.Lin" writes: >>> […] I tested the updated patch with this releasing, LOOP_VINFO_PEELING_FOR_GAPS part looks fine, but LOOP_VINFO_PEELING_FOR_ALIGNMENT caused one case to fail at execution during vect-partial-vector-u

Re: [PATCH V2] PING^2 correct COUNT and PROB for unrolled loop

2020-07-10 Thread Martin Liška
On 7/10/20 4:14 AM, Jiufu Guo wrote: Thanks so much for your time and kindly help!!! And I run your patch on SPEC2006 with: https://gcc.gnu.org/pipermail/gcc-patches/2020-July/549728.html Doing that I see just few changes: diff -qr /tmp/before /tmp/after Files /tmp/before/Meat.fppized.f90.000

  1   2   >