Go patch committed: rework static initializer code

2016-11-09 Thread Ian Lance Taylor
This patch to the Go frontend reworks the static initializer code. It renames is_immutable to is_static_initializer to try to capture what it really means. It is more precise about when an address expression, or a binary expression, can be a static initializer. Stop checking whether a type has p

Re: [PATCH TEST]Drop xfail for gcc.dg/vect/vect-cond-2.c

2016-11-09 Thread Christophe Lyon
Hi Bin On 8 November 2016 at 13:37, Bin Cheng wrote: > Hi, > Test gcc.dg/vect/vect-cond-2.c can be vectorized by GCC now, this patch drops > the xfail. > > Thanks, > bin > > gcc/testsuite/ChangeLog > 2016-11-04 Bin Cheng > > * gcc.dg/vect/vect-cond-2.c: Drop xfail. But the test is no

[PATCH] shrink-wrap: New spread_components

2016-11-09 Thread Segher Boessenkool
This patch changes spread_components to use a simpler algorithm that puts prologue components as early as possible, and epilogue components as late as possible. This allows better scheduling, and also saves a bit of code size. The blocks that run with some specific component enabled after this pa

Re: [PATCH] simplify-rtx: Transform (xor (and (xor A B) C) B) with C const

2016-11-09 Thread Marc Glisse
On Wed, 9 Nov 2016, Segher Boessenkool wrote: match.pd transforms (A&C)|(B&~C) to ((A^B)&C)^B, which is fewer operations if C is not const (and it is not on simple tests at least, this transform is done very early already). Various processors have "insert" instructions that can do this, but com

Re: [PATCH] simplify-rtx: Transform (xor (and (xor A B) C) B) with C const

2016-11-09 Thread Segher Boessenkool
On Wed, Nov 09, 2016 at 10:27:35PM +0100, Bernd Schmidt wrote: > On 11/09/2016 10:13 PM, Segher Boessenkool wrote: > > * simplify-rtx.c (simplify_binary_operation_1): Simplify > > (xor (and (xor A B) C) B) to (ior (and A C) (and B ~C)) and > > (xor (and (xor A B) C) B) to (ior (and A ~C

Re: [PATCH] simplify-rtx: Transform (xor (and (xor A B) C) B) with C const

2016-11-09 Thread Segher Boessenkool
On Wed, Nov 09, 2016 at 10:54:53PM +0100, Marc Glisse wrote: > >match.pd transforms (A&C)|(B&~C) to ((A^B)&C)^B, which is fewer > >operations if C is not const (and it is not on simple tests at least, > >this transform is done very early already). > > > >Various processors have "insert" instruction

[PATCH] PR78241, fix loop unroller when niter expr is not reliable

2016-11-09 Thread Pat Haugen
The following fixes a problem introduced by my earlier loop unroller patch, https://gcc.gnu.org/ml/gcc-patches/2016-09/msg01612.html. In instances where the niter expr is not reliable we need to still emit an initial peel copy of the loop. Bootstrap/regtest on powerpc64le with no new regression

Re: [PATCH, LIBGCC] Avoid count_leading_zeros with undefined result (PR 78067)

2016-11-09 Thread Joseph Myers
On Wed, 9 Nov 2016, Bernd Edlinger wrote: > Yes, but maybe introduce a test if the half-wide value fits? > > like: > > #define M_OK2(M, T) ((M) > sizeof(T) * CHAR_BIT / 2 - 1) Something like that. -- Joseph S. Myers jos...@codesourcery.com

Re: [PATCH] simplify-rtx: Transform (xor (and (xor A B) C) B) with C const

2016-11-09 Thread Marc Glisse
On Wed, 9 Nov 2016, Segher Boessenkool wrote: On Wed, Nov 09, 2016 at 10:54:53PM +0100, Marc Glisse wrote: match.pd transforms (A&C)|(B&~C) to ((A^B)&C)^B, which is fewer operations if C is not const (and it is not on simple tests at least, this transform is done very early already). Various p

[PING] [PATCH] enhance buffer overflow warnings (and c/53562)

2016-11-09 Thread Martin Sebor
The attached minor update to the patch also resolves bug 77784 that points out that -Wformat-length issues a warning also issued during the expansion of some of the __builtin___sprintf_chk intrinsics. Martin On 11/04/2016 02:16 PM, Martin Sebor wrote: Attached is an update to the patch that tak

Re: [PATCH] simplify-rtx: Transform (xor (and (xor A B) C) B) with C const

2016-11-09 Thread Marc Glisse
On Wed, 9 Nov 2016, Marc Glisse wrote: On Wed, 9 Nov 2016, Segher Boessenkool wrote: On Wed, Nov 09, 2016 at 10:54:53PM +0100, Marc Glisse wrote: match.pd transforms (A&C)|(B&~C) to ((A^B)&C)^B, which is fewer operations if C is not const (and it is not on simple tests at least, this transfor

Re: Review debug message generation

2016-11-09 Thread Jonathan Wakely
On 09/11/16 22:36 +0100, François Dumont wrote: Hi Here is a proposal to review how we generate the debug output in case of assertion failure. It removes usage of format_word which, as a side effect will fix PR 77459. Should I reference this PR in the ChangeLog ? Please do either mention

[committed] Fix -Wc++1z-compat warning (PR c++/78283)

2016-11-09 Thread Jakub Jelinek
Hi! Once mangle_decl warns once about the mangling changes for C++1z, it warns about all following symbols, including stuff like , .L* symbols etc. or any other symbols that are not affected by the exception specification mangling changes. Fixed thusly, bootstrapped/regtested on x86_64-linux and i

[committed] Fix g++.dg/asan/asan_test.C failure

2016-11-09 Thread Jakub Jelinek
Hi! I've noticed that the asan_test.C test started failing today. The problem are many -Wc++1z-compat warnings. This lead to discovery of PR78283, which fixes the "many" part of it, but there are still some, so this patch disables them. While playing with the preprocessed source of the testcase,

Re: [PATCH] simplify-rtx: Transform (xor (and (xor A B) C) B) with C const

2016-11-09 Thread Segher Boessenkool
On Wed, Nov 09, 2016 at 11:29:45PM +0100, Marc Glisse wrote: > >>>This patch makes RTL simplify transform (xor (and (xor A B) C) B) back > >>>to (ior (and A C) (and B ~C)) for constant C (and similar with A instead > >>>of B for that last term). > >> > >>Would it make sense to implement this transf

Re: [PATCH] simplify-rtx: Transform (xor (and (xor A B) C) B) with C const

2016-11-09 Thread Bernd Schmidt
On 11/09/2016 10:58 PM, Segher Boessenkool wrote: I'll do a PowerPC-specific testcase for all rl[wd]* next week. rl[wd]imi will show this xor-xor thing (half of all possible insns were not optimised before this patch). Is that enough? Sure. Once David's rtl testing work is ready we'll want to

[PATCH] loop distribution bug fix

2016-11-09 Thread Jim Wilson
This fixes a bug in code adding edges to the dependence graph. Values for this_dir can be -1 (backward edge), 0 (no edge), 1 (forward edge), and 2 (both backward and forward edges). There can be multiple dependencies checked, creating multiple edges that have to be merged together. this_dir contain

Re: [ipa-vrp] ice in set_value_range

2016-11-09 Thread Andrew Pinski
On Wed, Nov 9, 2016 at 12:01 AM, kugan wrote: > Hi Andrew, > > On 09/11/16 17:02, Andrew Pinski wrote: >> >> Either this patch or the patch for "Handle unary pass-through jump >> functions for ipa-vrp" caused a bootstrap failure on >> aarch64-linux-gnu. >> Bootstrap comparison failure! >> gcc/go/t

Re: [ipa-vrp] ice in set_value_range

2016-11-09 Thread kugan
Hi Andrew, On 10/11/16 17:14, Andrew Pinski wrote: On Wed, Nov 9, 2016 at 12:01 AM, kugan wrote: Hi Andrew, On 09/11/16 17:02, Andrew Pinski wrote: Either this patch or the patch for "Handle unary pass-through jump functions for ipa-vrp" caused a bootstrap failure on aarch64-linux-gnu. Boot

<    1   2