Move computation of SLP_TREE_NUMBER_OF_VEC_STMTS

2017-09-15 Thread Richard Sandiford
Previously SLP_TREE_NUMBER_OF_VEC_STMTS was calculated while scheduling an SLP tree after analysis, but sometimes it can be useful to know the value during analysis too. This patch moves the calculation to vect_slp_analyze_node_operaions instead. This became more natural after: 2017-06-30

Invoke vectorizable_live_operation in a consistent way

2017-09-15 Thread Richard Sandiford
vect_transform_stmt calls vectorizable_live_operation for each live statement in an SLP node, but vect_analyze_stmt only called it the once. This patch makes vect_analyze_stmt consistent with vect_transform_stmt, which should be a bit more robust, and also means that a later patch can use

Re: [RFC][PACH 3/5] Prevent tree unroller from completely unrolling inner loops if that results in excessive strided-loads in outer loop

2017-09-15 Thread Richard Biener
On Fri, Sep 15, 2017 at 5:44 AM, Andrew Pinski wrote: > On Thu, Sep 14, 2017 at 6:30 PM, Kugan Vivekanandarajah > wrote: >> This patch prevent tree unroller from completely unrolling inner loops if >> that >> results in excessive

Re: [PATCH] Enhance PHI processing in VN

2017-09-15 Thread David Edelsohn
On Fri, Sep 15, 2017 at 2:53 AM, Richard Biener wrote: > On Thu, 14 Sep 2017, David Edelsohn wrote: > >> * tree-ssa-sccvn.c (visit_phi): Merge undefined values similar >> to VN_TOP. >> >> This seems to have regressed >> >> FAIL: gcc.dg/tree-prof/time-profiler-2.c

Re: [ARM] PR 67591 ARM v8 Thumb IT blocks are deprecated

2017-09-15 Thread Christophe Lyon
On 13 September 2017 at 18:33, Kyrill Tkachov wrote: > Hi Christophe, > > > On 13/09/17 16:23, Christophe Lyon wrote: >> >> Hi, >> >> On 12 October 2016 at 11:22, Christophe Lyon >> wrote: >>> >>> On 12 October 2016 at 11:14, Kyrill

Re: [RFC][PATCH 4/5] Change iv_analyze_result to take const_rtx.

2017-09-15 Thread Richard Biener
On Fri, Sep 15, 2017 at 3:31 AM, Kugan Vivekanandarajah wrote: > Change iv_analyze_result to take const_rtx. This is just to make the > next patch compile. No functional changes: Ok. Richard. > Thanks, > Kugan > > gcc/ChangeLog: > > 2017-09-12 Kugan

Re: [PATCH] Add comments to struct cgraph_thunk_info

2017-09-15 Thread Pierre-Marie de Rodat
On 09/14/2017 07:16 PM, Jeff Law wrote: The comment additions are fine. What's the rationale behind the ordering of the fields? In general we want the opposite order from what you did -- going from most strictly aligned to least strictly aligned minimizes the amount of unused padding. Thank

Transform (x / y) != 0 to x >=y and (x / y) == 0 to x < y if x, y are unsigned

2017-09-15 Thread Prathamesh Kulkarni
Hi, This patch adds the transforms mentioned in $subject. Bootstrap+test in progress on x86_64-unknown-linux-gnu. OK to commit if passes ? Thanks, Prathamesh 2017-09-15 Prathamesh Kulkarni * match.pd ((X / Y) == 0 -> X < Y): New pattern. ((X /

RE: 0001-Part-1.-Add-generic-part-for-Intel-CET-enabling

2017-09-15 Thread Tsimbalist, Igor V
> -Original Message- > From: Tsimbalist, Igor V > Sent: Tuesday, September 12, 2017 5:35 PM > To: 'Richard Biener' > Cc: 'gcc-patches@gcc.gnu.org' ; Tsimbalist, Igor V > > Subject: RE:

[demangler] Fix nested generic lambda

2017-09-15 Thread Nathan Sidwell
This patch fixes PR82195, which turned out to be a demangler bug -- the specification and the compiler were DTRT. The originating source contained a non-generic lambda within a generic lambda. Because we had an older GDB without recursion protection in its demangler, GDB died, and that kind

Re: [PATCH] Add -std=c++2a

2017-09-15 Thread Jakub Jelinek
On Mon, Aug 07, 2017 at 02:17:17PM +0100, Pedro Alves wrote: > I happened to skim this patch and notice a couple issues. > See below. Note I've just posted updated patch based on this to gcc-patches. > > +/* Set the C++ 202a draft standard (without GNU extensions if ISO). */ > > +static void >

Re: Backports for GCC 6 branch

2017-09-15 Thread Martin Liška
On 09/15/2017 10:26 AM, Martin Liška wrote: > Hello. > > I'm going to install following backports. > > Patches can bootstrap on ppc64le-redhat-linux and survives regression tests. > > Martin > Small correction as gcc/c-family/c-attribs.c file was created in time of GCC 6. Thus there's updated

Fix type of bitstart in vectorizable_live_operation

2017-09-15 Thread Richard Sandiford
This patch changes the type of the multiplier applied by vectorizable_live_operation from unsigned_type_node to bitsizetype, which matches the type of TYPE_SIZE and is the type expected of a BIT_FIELD_REF bit position. This is shown by existing tests when SVE is added. Tested on

Re: [PATCH PR82163]Rewrite loop into lcssa form instantly

2017-09-15 Thread Richard Biener
On Thu, Sep 14, 2017 at 5:02 PM, Bin Cheng wrote: > Hi, > Current pcom implementation rewrites into lcssa form after all loops are > transformed, this is > not enough because unrolling of later loop checks lcssa form in function > tree_transform_and_unroll_loop. > This simple

Re: [PATCH, rs6000] [v2] Folding of vector loads in GIMPLE

2017-09-15 Thread Richard Biener
On Thu, Sep 14, 2017 at 4:38 PM, Bill Schmidt wrote: > On Sep 14, 2017, at 5:15 AM, Richard Biener > wrote: >> >> On Wed, Sep 13, 2017 at 10:14 PM, Bill Schmidt >> wrote: >>> On Sep 13, 2017, at 10:40 AM,

[Demangle PATCH] Some pre-fix cleanups

2017-09-15 Thread Nathan Sidwell
In working on bug 82195, a lambda-related demangler bug, I noticed some cleanup opportunities. 1) we express an is_fnqual_component_type in two separate, independent, ways. It would be smarter to express one of those ways in terms of the other. 2) An overly nested function call made it

[Demangle PATCH] Some pre-fix cleanups

2017-09-15 Thread Nathan Sidwell
In working on bug 82195, a lambda-related demangler bug, I noticed some cleanup opportunities. 1) we express an is_fnqual_component_type in two separate, independent, ways. It would be smarter to express one of those ways in terms of the other. 2) An overly nested function call made it

Fix an SVE failure in the Fortran matmul* tests

2017-09-15 Thread Richard Sandiford
The vectoriser was calling vect_get_smallest_scalar_type without having proven that the type actually is a scalar. This seems to be the intended behaviour: the ultimate test of whether the type is interesting (and hence scalar) is whether an associated vector type exists, but this is only tested

Include phis in SLP unrolling calculation

2017-09-15 Thread Richard Sandiford
Without this we'd pick an unrolling factor based purely on longs, ignoring the ints. It's posssible that vect_get_smallest_scalar_type should also handle shifts, but I think we'd still want this as a belt-and-braces fix. Tested on aarch64-linux-gnu, x86_64-linux-gnu and powerpc64le-linux-gnu. OK

Re: Turn CANNOT_CHANGE_MODE_CLASS into a hook

2017-09-15 Thread Richard Sandiford
Jeff Law writes: > On 09/13/2017 01:19 PM, Richard Sandiford wrote: >> Tested on aarch64-linux-gnu, x86_64-linux-gnu and powerpc64le-linux-gnu. >> Also tested by comparing the testsuite assembly output on at least one >> target per CPU directory. OK to install? >> >> Richard >>

Re: libgo patch committed: Upgrade to Go 1.9 release

2017-09-15 Thread Rainer Orth
Hi Ian, >>> the patch broke Solaris bootstrap: >>> >>> /vol/gcc/src/hg/trunk/local/libgo/go/syscall/exec_unix.go:240:11: error: >>> reference to undefined name 'forkExecPipe' >>> if err = forkExecPipe(p[:]); err != nil { >>>^ >>> >>> libgo/go/syscall/forkpipe_bsd.go is needed on

Re: 0001-Part-1.-Add-generic-part-for-Intel-CET-enabling

2017-09-15 Thread Richard Biener
On Fri, Sep 15, 2017 at 1:12 PM, Tsimbalist, Igor V wrote: >> -Original Message- >> From: Tsimbalist, Igor V >> Sent: Tuesday, September 12, 2017 5:35 PM >> To: 'Richard Biener' >> Cc: 'gcc-patches@gcc.gnu.org'

Re: Transform (x / y) != 0 to x >=y and (x / y) == 0 to x < y if x, y are unsigned

2017-09-15 Thread Marc Glisse
On Fri, 15 Sep 2017, Prathamesh Kulkarni wrote: +/* (X / Y) == 0 -> X < Y if X, Y are unsigned. */ +(simplify + (eq (trunc_div @0 @1) integer_zerop) + (if (TYPE_UNSIGNED (TREE_TYPE(@0)) && TYPE_UNSIGNED (TREE_TYPE (@1))) +(lt @0 @1))) + +/* (X / Y) != 0 -> X >= Y, if X, Y are unsigned.

Backports to 7.x

2017-09-15 Thread Jakub Jelinek
Hi! I've bootstrapped/regtested (x86_64-linux and i686-linux) and committed following 4 backports to gcc-7-branch: Jakub 2017-09-15 Jakub Jelinek Backported from mainline 2017-09-12 Jakub Jelinek PR target/82112

Backports for GCC 5 branch

2017-09-15 Thread Martin Liška
Hello. I'm going to install following backports. Patches can bootstrap on ppc64le-redhat-linux and survives regression tests. Martin >From baece18f7986907d9cd7cedea78fea9b1d7ef895 Mon Sep 17 00:00:00 2001 From: marxin Date: Wed, 28 Jun 2017 07:59:23

[PATCH] Fix PR82217

2017-09-15 Thread Richard Biener
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2017-09-15 Richard Biener PR tree-optimization/82217 * tree-ssa-sccvn.c (visit_phi): Properly handle all VN_TOP but not undefined case. * gcc.dg/torture/pr82217.c: New

[C++ Patch Ping] PR 64644 (""warning: anonymous union with no members" should be an error with -pedantic-errors")

2017-09-15 Thread Paolo Carlini
Hi, gently pinging this. On 16/06/2017 15:47, Paolo Carlini wrote: Hi, submitter and Manuel analyzed this a while ago and came to the conclusion - which I think is still valid vs the current working draft - that strictly speaking this kind of code violates [dcl.dcl], thus a pedwarn seems

[c-family] Issue a warning in C++ on pragma scalar_storage_order

2017-09-15 Thread Eric Botcazou
Hi, this plugs the hole reported by Florian on the gcc@ list, namely that no warning is issued with -Wall in C++ on pragma scalar_storage_order. Tested on x86_64-suse-linux, OK for the mainline? And some branches? 2017-09-15 Eric Botcazou * c-pragma.c

Re: Backports for GCC 6 branch

2017-09-15 Thread Martin Liška
One more that I've just tested. Martin >From 69bdfd4b8d845d2262139b4406cfd9f2d947f80d Mon Sep 17 00:00:00 2001 From: marxin Date: Wed, 28 Jun 2017 07:59:23 + Subject: [PATCH] Backport r249728 gcc/ChangeLog: 2017-06-28 Martin Liska

[C++ PATCH] Incremental patch for -std=gnu++2a and -std=c++2a

2017-09-15 Thread Jakub Jelinek
Hi! On Thu, Sep 14, 2017 at 11:28:09PM +0200, Jakub Jelinek wrote: > > I'd be tempted to say leave all this, and march 1z -> 2a for the _next_ > > standard. 2020 or so is a good first stab at the date. > > I didn't want to add c++2a and gnu++2a in the same patch, it can be added >

RE: [PATCH, i386] Enable option -mprefer-avx256 added for Intel AVX512 configuration

2017-09-15 Thread Shalnov, Sergey
Rationale is similar and related to better performance of 256-bit code for some of the cases. In case of Skylake Server the Optimization Manual has following "Since port 0 and port 1 are 256-bits wide, Intel AVX-512 operations that will be dispatched to port 0 will execute on both port 0 and

Re: [RFC][PATCH 1/5] Add separate parms for rtl unroller

2017-09-15 Thread Richard Biener
On Fri, Sep 15, 2017 at 3:27 AM, Kugan Vivekanandarajah wrote: > This patch adds separate params for rtl unroller so that they can be > tunned accordingly. Default values I have are based on some testing on > aarch64. I am happy to leave it as the current value

Fix vectorizable_mask_load_store handling of invariant masks

2017-09-15 Thread Richard Sandiford
vectorizable_mask_load_store was not passing the required mask type to vect_get_vec_def_for_operand. This doesn't matter for masks that are defined in the loop, since their STMT_VINFO_VECTYPE will be what we need anyway. But it's not possible to tell which mask type the caller needs when looking

Fix vectorizable_live_operation handling of vector booleans

2017-09-15 Thread Richard Sandiford
vectorizable_live_operation needs to use BIT_FIELD_REF to extract one element of a vector. For a packed vector boolean type, the number of bits to extract should be taken from TYPE_PRECISION rather than TYPE_SIZE. This is shown by existing tests once SVE is added. Tested on aarch64-linux-gnu,

Re: [PATCH] Factor out division by squares and remove division around comparisons (1/2)

2017-09-15 Thread Richard Biener
On Wed, Sep 13, 2017 at 11:20 PM, Wilco Dijkstra wrote: > Jeff Law wrote: >> On 09/06/2017 03:55 AM, Jackson Woodruff wrote: >> > On 08/30/2017 01:46 PM, Richard Biener wrote: > rdivtmp = 1 / (y*C); tem = x *rdivtmp; tem2= z * rdivtmp;

[PATCH] Revert r238089 (PR driver/81829).

2017-09-15 Thread Martin Liška
Hi. In order to make the code simple and transparent, I suggest to revert r238089. Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. Ready to be installed? Martin >From 0a865d51a5f61d0fa13e5d4eea208c62ff89e32e Mon Sep 17 00:00:00 2001 From: marxin Date:

[PATCH] More PR81968 fixing

2017-09-15 Thread Richard Biener
This fixes simple_object_elf_copy_lto_debug_sections to properly iterate the marking sections as necessary process. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2017-09-15 Richard Biener PR lto/81968 * simple-object-elf.c

Re: [RFC] propagate malloc attribute in ipa-pure-const pass

2017-09-15 Thread Prathamesh Kulkarni
On 1 September 2017 at 08:09, Prathamesh Kulkarni wrote: > On 17 August 2017 at 18:02, Prathamesh Kulkarni > wrote: >> On 8 August 2017 at 09:50, Prathamesh Kulkarni >> wrote: >>> On 31 July 2017 at

Re: [PATCH] Add -std=c++2a

2017-09-15 Thread Pedro Alves
On 09/15/2017 01:53 PM, Jakub Jelinek wrote: > On Mon, Aug 07, 2017 at 02:17:17PM +0100, Pedro Alves wrote: >> I happened to skim this patch and notice a couple issues. >> See below. > > Note I've just posted updated patch based on this to gcc-patches. Thanks ( FWIW :-) ). >>> @@ -497,7 +499,10

Re: [PATCH, rs6000] [v2] Folding of vector loads in GIMPLE

2017-09-15 Thread Bill Schmidt
On Sep 15, 2017, at 4:13 AM, Richard Biener wrote: > > On Thu, Sep 14, 2017 at 4:38 PM, Bill Schmidt > wrote: >> On Sep 14, 2017, at 5:15 AM, Richard Biener >> wrote: >>> >>> On Wed, Sep 13, 2017 at 10:14

Re: [PATCH PR82163]Rewrite loop into lcssa form instantly

2017-09-15 Thread Bin.Cheng
On Fri, Sep 15, 2017 at 12:49 PM, Richard Biener wrote: > On Thu, Sep 14, 2017 at 5:02 PM, Bin Cheng wrote: >> Hi, >> Current pcom implementation rewrites into lcssa form after all loops are >> transformed, this is >> not enough because unrolling

[pushed] Fix compile time error when using ansidecl.h with an old version of GCC.

2017-09-15 Thread Pedro Alves
Hi guys, I was looking at merging libiberty from gcc to binutils-gdb, and noticed this one patch that is in binutils-gdb and not in gcc, since last July. I think the patch is borderline obvious (it's arguable whether to define OVERRIDE/FINAL for C), but in interest of re-syncing the trees, I'm

Re: Transform (x / y) != 0 to x >=y and (x / y) == 0 to x < y if x, y are unsigned

2017-09-15 Thread Jeff Law
On 09/15/2017 07:09 AM, Marc Glisse wrote: > On Fri, 15 Sep 2017, Prathamesh Kulkarni wrote: > > +/* (X / Y) == 0 -> X < Y if X, Y are unsigned. */ > +(simplify > + (eq (trunc_div @0 @1) integer_zerop) > + (if (TYPE_UNSIGNED (TREE_TYPE(@0)) && TYPE_UNSIGNED (TREE_TYPE (@1))) > +(lt @0

Re: [RFC][PACH 3/5] Prevent tree unroller from completely unrolling inner loops if that results in excessive strided-loads in outer loop

2017-09-15 Thread Jeff Law
On 09/15/2017 03:42 AM, Richard Biener wrote: > On Fri, Sep 15, 2017 at 5:44 AM, Andrew Pinski wrote: >> On Thu, Sep 14, 2017 at 6:30 PM, Kugan Vivekanandarajah >> wrote: >>> This patch prevent tree unroller from completely unrolling inner

Re: [PATCH] Add macro DISABLE_COPY_AND_ASSIGN

2017-09-15 Thread Yao Qi
On Sat, Sep 9, 2017 at 1:27 PM, Ian Lance Taylor wrote: > > The patch to include/ansidecl.h is basically OK. Please add an > example in the comment showing how to use it: after `private:`, and > with a trailing semicolon. Thanks. Patch below is committed. Thanks for the

Re: [PATCHv2] Add a -Wcast-align=strict warning

2017-09-15 Thread Joseph Myers
On Thu, 14 Sep 2017, Bernd Edlinger wrote: > Hi, > > as suggested by Joseph, here is an updated patch that > uses min_align_of_type instead of TYPE_ALIGN. > > Is it OK? OK. -- Joseph S. Myers jos...@codesourcery.com

Re: [demangler] Fix nested generic lambda

2017-09-15 Thread Pedro Alves
On 09/15/2017 01:04 PM, Nathan Sidwell wrote: > > > Pedro, would you like me to port to gdb's libiberty, or will you do a > merge in the near future? I wasn't planning to, but I'm doing it now. Thanks much for the fix! -- Pedro Alves

Re: Move computation of SLP_TREE_NUMBER_OF_VEC_STMTS

2017-09-15 Thread Jeff Law
On 09/15/2017 04:43 AM, Richard Sandiford wrote: > Previously SLP_TREE_NUMBER_OF_VEC_STMTS was calculated while scheduling > an SLP tree after analysis, but sometimes it can be useful to know the > value during analysis too. This patch moves the calculation to > vect_slp_analyze_node_operaions

Re: [PATCH 3/3] [ARM] Add table of costs for AAarch32 addressing modes.

2017-09-15 Thread Charles Baylis
On 13 September 2017 at 10:02, Kyrill Tkachov wrote: > > Please add a comment here saying that the units are in COSTS_N_INSNS > so that we can reduce the temptation to use these in inappropriate contexts. >> + if (VECTOR_MODE_P (mode)) >> + { >> +

Re: Invoke vectorizable_live_operation in a consistent way

2017-09-15 Thread Jeff Law
On 09/15/2017 04:44 AM, Richard Sandiford wrote: > vect_transform_stmt calls vectorizable_live_operation for > each live statement in an SLP node, but vect_analyze_stmt > only called it the once. This patch makes vect_analyze_stmt > consistent with vect_transform_stmt, which should be a bit >

Re: [PATCH] Add comments to struct cgraph_thunk_info

2017-09-15 Thread Pierre-Marie de Rodat
On 09/15/2017 06:10 PM, Jeff Law wrote: OK. jeff Committed. Thanks! -- Pierre-Marie de Rodat

[PATCH, rs6000] [v3] Folding of vector loads in GIMPLE

2017-09-15 Thread Will Schmidt
Hi, [PATCH, rs6000] [v3] Folding of vector loads in GIMPLE Folding of vector loads in GIMPLE. Add code to handle gimple folding for the vec_ld builtins. Remove the now obsoleted folding code for vec_ld from rs6000-c.c. Surrounding comments have been adjusted slightly so they continue to

Re: [libstdc++/71500] make back reference work with icase

2017-09-15 Thread Jonathan Wakely
On 04/09/17 03:31 -0700, Tim Shen via libstdc++ wrote: This fixes the follow-up comments in 71500. Back-reference matching is different from other matching, as the content the back-reference refers to is at "run-time", aka during regex_match(), not regex() compilation. For compilation we do

Re: Fix type of bitstart in vectorizable_live_operation

2017-09-15 Thread Jeff Law
On 09/15/2017 04:45 AM, Richard Sandiford wrote: > This patch changes the type of the multiplier applied by > vectorizable_live_operation from unsigned_type_node to bitsizetype, > which matches the type of TYPE_SIZE and is the type expected of a > BIT_FIELD_REF bit position. This is shown by

Re: Include phis in SLP unrolling calculation

2017-09-15 Thread Jeff Law
On 09/15/2017 04:48 AM, Richard Sandiford wrote: > Without this we'd pick an unrolling factor based purely on longs, > ignoring the ints. It's posssible that vect_get_smallest_scalar_type > should also handle shifts, but I think we'd still want this as a > belt-and-braces fix. > > Tested on

Re: [C++ Patch Ping] PR 64644 (""warning: anonymous union with no members" should be an error with -pedantic-errors")

2017-09-15 Thread Nathan Sidwell
On 09/15/2017 05:53 AM, Paolo Carlini wrote: Hi, gently pinging this. On 16/06/2017 15:47, Paolo Carlini wrote: Hi, submitter and Manuel analyzed this a while ago and came to the conclusion - which I think is still valid vs the current working draft - that strictly speaking this kind of

[committed] Fix combine make_extraction (PR rtl-optimization/82192)

2017-09-15 Thread Jakub Jelinek
Hi! When we have (x >> y) & 0x1fff or similar (for non-constant y or even for constant y if y + 13 is bigger than x's bits) and x is a non-paradoxical lowpart subreg (in the testcase (subreg:SI (reg:DI ...) 0)) then the lshiftrt extracts some bits out (0 to 13) out of the wider DImode registers

Re: [PATCH] Add comments to struct cgraph_thunk_info

2017-09-15 Thread Jeff Law
On 09/15/2017 08:48 AM, Pierre-Marie de Rodat wrote: > On 09/15/2017 12:54 PM, Pierre-Marie de Rodat wrote: >> I’m not super confident about this though, so I’ll resubmit a patch >> without the reordering: I’ve added more comments anyway as I’ve >> learned more about this since yesterday. ;-) > >

Re: [c-family] Issue a warning in C++ on pragma scalar_storage_order

2017-09-15 Thread Jeff Law
On 09/15/2017 05:07 AM, Eric Botcazou wrote: > Hi, > > this plugs the hole reported by Florian on the gcc@ list, namely that no > warning is issued with -Wall in C++ on pragma scalar_storage_order. > > Tested on x86_64-suse-linux, OK for the mainline? And some branches? > > > 2017-09-15

Re: Backports for GCC 6 branch

2017-09-15 Thread Martin Liška
One more. Martin >From 6853238cc8103fefb8b8acc8f56d444860495714 Mon Sep 17 00:00:00 2001 From: marxin Date: Fri, 11 Aug 2017 10:01:13 + Subject: [PATCH] Backport r251049 gcc/ChangeLog: 2017-08-11 Martin Liska PR

Re: Backports for GCC 5 branch

2017-09-15 Thread Martin Liška
One more also for GCC 5 branch. Martin >From 6853238cc8103fefb8b8acc8f56d444860495714 Mon Sep 17 00:00:00 2001 From: marxin Date: Fri, 11 Aug 2017 10:01:13 + Subject: [PATCH] Backport r251049 gcc/ChangeLog: 2017-08-11 Martin Liska

RE: 0002-Part-2.-Document-finstrument-control-flow-and-notrack attribute

2017-09-15 Thread Tsimbalist, Igor V
> -Original Message- > From: Jeff Law [mailto:l...@redhat.com] > Sent: Friday, August 25, 2017 10:59 PM > To: Tsimbalist, Igor V ; 'gcc- > patc...@gcc.gnu.org' > Subject: Re: 0002-Part-2.-Document-finstrument-control-flow-and-notrack >

Re: Fix vectorizable_mask_load_store handling of invariant masks

2017-09-15 Thread Jeff Law
On 09/15/2017 04:47 AM, Richard Sandiford wrote: > vectorizable_mask_load_store was not passing the required mask type to > vect_get_vec_def_for_operand. This doesn't matter for masks that are > defined in the loop, since their STMT_VINFO_VECTYPE will be what we need > anyway. But it's not

Re: Transform (x / y) != 0 to x >=y and (x / y) == 0 to x < y if x, y are unsigned

2017-09-15 Thread Wilco Dijkstra
Marc Glisse wrote: > The question is whether, having computed c=a/b, it is cheaper to test a c!=0. > I think it is usually the second one, but not for all types on all targets. > Although since > you mention VRP, it is easier to do further optimizations using the > information a

Re: [PATCH 2/3] [ARM] Refactor costs calculation for MEM.

2017-09-15 Thread Charles Baylis
On 13 September 2017 at 10:02, Kyrill Tkachov wrote: > Hi Charles, > > On 12/09/17 09:34, charles.bay...@linaro.org wrote: >> >> From: Charles Baylis >> >> This patch moves the calculation of costs for MEM into a >> separate function, and

Re: [PATCH 3/3] [ARM] Add table of costs for AAarch32 addressing modes.

2017-09-15 Thread Charles Baylis
On 13 September 2017 at 10:02, Kyrill Tkachov wrote: > > Please add a comment here saying that the units are in COSTS_N_INSNS > so that we can reduce the temptation to use these in inappropriate contexts. >> + if (VECTOR_MODE_P (mode)) >> + { >> +

Re: [PATCH 1/3] [ARM] Add bus_width_bits to tune_params

2017-09-15 Thread Charles Baylis
On 13 September 2017 at 10:02, Kyrill Tkachov wrote: > Hi Charles, > > On 12/09/17 09:34, charles.bay...@linaro.org wrote: >> >> From: Charles Baylis >> >> Add bus widths. These use the approximation that v7 and later cores have >> 64bit

Re: Fix vectorizable_live_operation handling of vector booleans

2017-09-15 Thread Jeff Law
On 09/15/2017 04:45 AM, Richard Sandiford wrote: > vectorizable_live_operation needs to use BIT_FIELD_REF to extract one > element of a vector. For a packed vector boolean type, the number of > bits to extract should be taken from TYPE_PRECISION rather than TYPE_SIZE. > > This is shown by

Re: Fix an SVE failure in the Fortran matmul* tests

2017-09-15 Thread Jeff Law
On 09/15/2017 04:49 AM, Richard Sandiford wrote: > The vectoriser was calling vect_get_smallest_scalar_type without > having proven that the type actually is a scalar. This seems to > be the intended behaviour: the ultimate test of whether the type > is interesting (and hence scalar) is whether

Re: [C++ PATCH] Renames/adjustments of 1z to 17

2017-09-15 Thread Nathan Sidwell
On 09/14/2017 04:26 PM, Jakub Jelinek wrote: Hi! Given https://herbsutter.com/2017/09/06/c17-is-formally-approved/ this patch makes -std=c++17 and -std=gnu++17 the documented options and -std=c++1z and -std=gnu++1z deprecated aliases, adjusts diagnostics etc. Bootstrapped/regtest on

[PATCH, rs6000] gimple folding vector load test variant

2017-09-15 Thread Will Schmidt
Hi, This is a test created during investigation of the feedback on the rs6000 gimple vector folding code, regarding the handling of arg1_type. Inspired by feedback from Richard and Bill. This was useful to illustrate the issue to me. Whether this is a valid test for the testsuite I'll defer

Re: [PATCH] Add comments to struct cgraph_thunk_info

2017-09-15 Thread Pierre-Marie de Rodat
On 09/15/2017 12:54 PM, Pierre-Marie de Rodat wrote: I’m not super confident about this though, so I’ll resubmit a patch without the reordering: I’ve added more comments anyway as I’ve learned more about this since yesterday. ;-) Here it is! -- Pierre-Marie de Rodat >From

RE: 0006-Part-6.-Add-x86-tests-for-Intel-CET-implementation

2017-09-15 Thread Tsimbalist, Igor V
> -Original Message- > From: gcc-patches-ow...@gcc.gnu.org [mailto:gcc-patches- > ow...@gcc.gnu.org] On Behalf Of Jeff Law > Sent: Friday, August 25, 2017 11:03 PM > To: Tsimbalist, Igor V ; 'gcc- > patc...@gcc.gnu.org' > Subject: Re:

Re: [PATCH, rs6000 version 2] Add support for vec_xst_len_r() and vec_xl_len_r() builtins

2017-09-15 Thread Segher Boessenkool
Hi Carl, On Thu, Sep 14, 2017 at 02:23:47PM -0700, Carl Love wrote: > vecload isn't really the correct type for this, but I see we have the > same on the existing lvsl patterns (it's permute unit on p9; I expect > the same on p8 and older, but please check). It is a bit more complicated on older

Re: Transform (x / y) != 0 to x >=y and (x / y) == 0 to x < y if x, y are unsigned

2017-09-15 Thread Marc Glisse
On Fri, 15 Sep 2017, Jeff Law wrote: On 09/15/2017 07:09 AM, Marc Glisse wrote: On Fri, 15 Sep 2017, Prathamesh Kulkarni wrote: +/* (X / Y) == 0 -> X < Y if X, Y are unsigned. */ +(simplify + (eq (trunc_div @0 @1) integer_zerop) + (if (TYPE_UNSIGNED (TREE_TYPE(@0)) && TYPE_UNSIGNED

Re: Transform (x / y) != 0 to x >=y and (x / y) == 0 to x < y if x, y are unsigned

2017-09-15 Thread Jeff Law
On 09/15/2017 09:55 AM, Marc Glisse wrote: > On Fri, 15 Sep 2017, Jeff Law wrote: > >> On 09/15/2017 07:09 AM, Marc Glisse wrote: >>> On Fri, 15 Sep 2017, Prathamesh Kulkarni wrote: >>> >>> +/* (X / Y) == 0 -> X < Y if X, Y are unsigned. */ >>> +(simplify >>> + (eq (trunc_div @0 @1)

Re: [PATCH 3/3] [ARM] Add table of costs for AAarch32 addressing modes.

2017-09-15 Thread Kyrill Tkachov
On 15/09/17 16:38, Charles Baylis wrote: On 13 September 2017 at 10:02, Kyrill Tkachov wrote: Please add a comment here saying that the units are in COSTS_N_INSNS so that we can reduce the temptation to use these in inappropriate contexts. + if

Re: [C++ PATCH] Renames/adjustments of 1z to 17

2017-09-15 Thread Nathan Sidwell
On 09/14/2017 04:26 PM, Jakub Jelinek wrote: There is one 1z spot in gcc/doc/standards.texi, but that whole paragraph looks wrong, can somebody please rewrite it to match the reality? This patch addresses that paragraph. I've rewritten it using the c++11 and C++14 examples and removed any

[PATCH] lra: make reload_pseudo_compare_func a proper comparator

2017-09-15 Thread Alexander Monakov
Hello, I'd like to apply the following LRA patch to make qsort comparator reload_pseudo_compare_func proper (right now it lacks transitivity due to incorrect use of non_reload_pseudos bitmap, PR 68988). This function was originally a proper comparator, and the problematic code was added as a fix

Re: [C PATCH] field_decl_cmp

2017-09-15 Thread Nathan Sidwell
On 09/12/2017 12:48 PM, Joseph Myers wrote: I'd be concerned about the possibility of a qsort implementation that calls the comparison function with two pointers to the same object (as far as I can tell, it's valid for qsort to do that). That is, I think you need to check for the two DECLs

Re: [C++ PATCH] Incremental patch for -std=gnu++2a and -std=c++2a

2017-09-15 Thread Jason Merrill
OK. On Fri, Sep 15, 2017 at 8:49 AM, Jakub Jelinek wrote: > Hi! > > On Thu, Sep 14, 2017 at 11:28:09PM +0200, Jakub Jelinek wrote: >> > I'd be tempted to say leave all this, and march 1z -> 2a for the _next_ >> > standard. 2020 or so is a good first stab at the date. >> >> I

Re: [C PATCH] field_decl_cmp

2017-09-15 Thread Joseph Myers
On Fri, 15 Sep 2017, Nathan Sidwell wrote: > On 09/12/2017 12:48 PM, Joseph Myers wrote: > > > I'd be concerned about the possibility of a qsort implementation that > > calls the comparison function with two pointers to the same object (as far > > as I can tell, it's valid for qsort to do that).

[PATCH][aarch64] Fix pr81356 - copy empty string with wrz, not a ldrb/strb

2017-09-15 Thread Steve Ellcey
PR 81356 points out that doing a __builtin_strcpy of an empty string on aarch64 does a copy from memory instead of just writing out a zero byte. In looking at this I found that it was because of aarch64_use_by_pieces_infrastructure_p, which returns false for STORE_BY_PIECES.  The comment says:  

Re: [PATCH 2/3] [ARM] Refactor costs calculation for MEM.

2017-09-15 Thread Kyrill Tkachov
On 15/09/17 16:38, Charles Baylis wrote: On 13 September 2017 at 10:02, Kyrill Tkachov wrote: Hi Charles, On 12/09/17 09:34, charles.bay...@linaro.org wrote: From: Charles Baylis This patch moves the calculation of costs for MEM

Re: [PATCH 1/3] [ARM] Add bus_width_bits to tune_params

2017-09-15 Thread Kyrill Tkachov
On 15/09/17 16:38, Charles Baylis wrote: On 13 September 2017 at 10:02, Kyrill Tkachov wrote: Hi Charles, On 12/09/17 09:34, charles.bay...@linaro.org wrote: From: Charles Baylis Add bus widths. These use the approximation that v7

Re: [PATCH] Factor out division by squares and remove division around comparisons (1/2)

2017-09-15 Thread Jeff Law
On 09/13/2017 03:20 PM, Wilco Dijkstra wrote: > Jeff Law wrote: >> On 09/06/2017 03:55 AM, Jackson Woodruff wrote: >>> On 08/30/2017 01:46 PM, Richard Biener wrote: > rdivtmp = 1 / (y*C); tem = x *rdivtmp; tem2= z * rdivtmp; instead of rdivtmp = 1/y;

Re: [demangler] Fix nested generic lambda

2017-09-15 Thread Pedro Alves
On 09/15/2017 05:15 PM, Pedro Alves wrote: > On 09/15/2017 01:04 PM, Nathan Sidwell wrote: >> >> >> Pedro, would you like me to port to gdb's libiberty, or will you do a >> merge in the near future? > > I wasn't planning to, but I'm doing it now. > Now done:

Re: [C++ PATCH] Renames/adjustments of 1z to 17

2017-09-15 Thread Sandra Loosemore
On 09/15/2017 11:07 AM, Nathan Sidwell wrote: On 09/14/2017 04:26 PM, Jakub Jelinek wrote: There is one 1z spot in gcc/doc/standards.texi, but that whole paragraph looks wrong, can somebody please rewrite it to match the reality? This patch addresses that paragraph. I've rewritten it using

Re: Transform (x / y) != 0 to x >=y and (x / y) == 0 to x < y if x, y are unsigned

2017-09-15 Thread Marc Glisse
On Fri, 15 Sep 2017, Wilco Dijkstra wrote: Marc Glisse wrote: The question is whether, having computed c=a/b, it is cheaper to test a No, a This would indicate that we do not need to check for single-use, makes the patch simpler, thanks. (let's ignore -Os) -- Marc Glisse

Re: [PATCH] Fix PR target/82066 - target pragma and attribute documentation for ARM, AArch64, and S/390

2017-09-15 Thread Jeff Law
On 09/13/2017 12:00 PM, Steve Ellcey wrote: > This patch fixes the documentation issues pointed out in PR target/82066. > It may be considered obvious enough to just check in but I'd rather have > someone look it over to make sure I didn't mess something up. > > Steve Ellcey > sell...@cavium.com

Re: [PATCH] Enhance PHI processing in VN

2017-09-15 Thread Richard Biener
On Thu, 14 Sep 2017, David Edelsohn wrote: > * tree-ssa-sccvn.c (visit_phi): Merge undefined values similar > to VN_TOP. > > This seems to have regressed > > FAIL: gcc.dg/tree-prof/time-profiler-2.c scan-ipa-dump-times profile > "Read tp_first_run: 0" 2 > FAIL:

Backports for GCC 6 branch

2017-09-15 Thread Martin Liška
Hello. I'm going to install following backports. Patches can bootstrap on ppc64le-redhat-linux and survives regression tests. Martin >From 2b43a95e12e3876535129303e156e8cbcddec122 Mon Sep 17 00:00:00 2001 From: marxin Date: Wed, 30 Aug 2017 12:38:31

Re: Backports for GCC 7 branch

2017-09-15 Thread Martin Liška
On 09/15/2017 10:10 AM, Martin Liška wrote: > Hello. > > I'm going to install following backports. Last patch fixes wrongly backported > patch > in gcc/gimple-ssa-strength-reduction.c. > > Patches can bootstrap on ppc64le-redhat-linux and survives regression tests. > > Martin > Forgot to add

Backports for GCC 7 branch

2017-09-15 Thread Martin Liška
Hello. I'm going to install following backports. Last patch fixes wrongly backported patch in gcc/gimple-ssa-strength-reduction.c. Patches can bootstrap on ppc64le-redhat-linux and survives regression tests. Martin >From 01f734bc63cfa38cc3ef63d8e6b30de4217c7784 Mon Sep 17 00:00:00 2001 From:

[PATCH][GRAPHITE] Fix PR68823

2017-09-15 Thread Richard Biener
The following fixes dependence handling in GRAPHITE which currently cannot cope with DRs that may alias but are not compatible so to be handled solely by looking at their DR_ACCESS_FNs. This includes pointer vs. array accesses for example. Bootstrapped and tested on x86_64-unknown-linux-gnu,

RE: [PATCH] [Aarch64] Optimize subtract in shift counts

2017-09-15 Thread Michael Collison
Patch updated with comments to simplify pattern .from Richard Sandiford. Okay for trunk? 2017-09-14 Michael Collison * config/aarch64/aarch64.md (*aarch64_reg__minus3): New pattern. 2017-09-14 Michael Collison *

Re: [RFC][AARCH64][PATCH 5/5] add aarch64_loop_unroll_adjust to limit partial unrolling in rtl based on strided-loads in loop

2017-09-15 Thread Ramana Radhakrishnan
On Fri, Sep 15, 2017 at 2:33 AM, Kugan Vivekanandarajah wrote: > This patch adds aarch64_loop_unroll_adjust to limit partial unrolling > in rtl based on strided-loads in loop. > > Thanks, > Kugan > > gcc/ChangeLog: > > 2017-09-12 Kugan Vivekanandarajah

Implement C11 excess precision semantics for conversions (PR c/82071)

2017-09-15 Thread Joseph Myers
C11 semantics for excess precision (from N1531) are that an implicit conversion (from the usual arithmetic conversions, not by assignment) from integer to floating point has a result in the corresponding evaluation format of that floating-point type, so possibly with excess precision (whereas a

Re: [PATCH, rs6000] [v3] Folding of vector loads in GIMPLE

2017-09-15 Thread Segher Boessenkool
Hi Will, On Fri, Sep 15, 2017 at 09:59:54AM -0500, Will Schmidt wrote: > +/* Vector loads. */ > +case ALTIVEC_BUILTIN_LVX_V16QI: > +case ALTIVEC_BUILTIN_LVX_V8HI: > +case ALTIVEC_BUILTIN_LVX_V4SI: > +case ALTIVEC_BUILTIN_LVX_V4SF: > +case ALTIVEC_BUILTIN_LVX_V2DI: > +

Go patch committed: return an error statement for fallthrough in last case

2017-09-15 Thread Ian Lance Taylor
This patch by Cherry Zhang changes the Go frontend to call error_statement when generating GIMPLE for a fallthrough in the last case in a switch. This avoids generating incorrect IR in an erroneous case. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian Index:

  1   2   >