Re: [PATCH] [x86] Don't use builtins for SIMD shifts

2016-12-13 Thread Marc Glisse
On Tue, 13 Dec 2016, Richard Biener wrote: On Sat, Dec 10, 2016 at 7:59 PM, Marc Glisse wrote: On Sat, 10 Dec 2016, Allan Sandfeld Jensen wrote: On Saturday 10 December 2016, Marc Glisse wrote: On Sat, 10 Dec 2016, Marc Glisse wrote: On Sat, 10 Dec 2016, Allan

[PATCH] Add pretty printer for ASAN_MARK and add a helper fn

2016-12-13 Thread Martin Liška
It would be easier to read ASAN_MARK (UNPOISON, , 4); instead of ASAN_MARK (2, , 4); Apart from that new helper function asan_mark_p is added. Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. Ready to be installed? Martin >From ff843db17ba284d2e99bab567d76d4b779f9f1d6

Re: [PATCH, middle-end]: Fix PR78738, unrecognized insn with -ffast-math

2016-12-13 Thread Richard Biener
On Sun, Dec 11, 2016 at 5:16 PM, Uros Bizjak wrote: > On Fri, Dec 9, 2016 at 11:09 AM, Richard Biener > wrote: >> On Thu, Dec 8, 2016 at 10:44 PM, Uros Bizjak wrote: >>> Hello! >>> >>> Attached patch fixes fall-out from

Re: [PATCH] Avoid creating unbounded complexity debug insns in valtrack (PR debug/77844)

2016-12-13 Thread Richard Biener
On Mon, 12 Dec 2016, Jakub Jelinek wrote: > Hi! > > On the following testcase (where I've failed to reduce it without the > header, got to over 70KB with both delta and creduce) we end up with huge > RTL expressions in debug insns that just slow down combiner as well as > var-tracking etc. too

Re: [PATCH] Add pretty printer for ASAN_MARK and add a helper fn

2016-12-13 Thread Jakub Jelinek
On Tue, Dec 13, 2016 at 09:51:13AM +0100, Martin Liška wrote: > >From ff843db17ba284d2e99bab567d76d4b779f9f1d6 Mon Sep 17 00:00:00 2001 > From: marxin > Date: Fri, 9 Dec 2016 16:24:16 +0100 > Subject: [PATCH 1/2] Add pretty printer for ASAN_MARK and add a helper fn > >

Re: [PATCH] Fill bitregion_{start,end} in store_constructor (PR, tree-optimization/78428).

2016-12-13 Thread Martin Liška
On 12/12/2016 12:10 PM, Eric Botcazou wrote: >> Ok. I'm sending a patch that put gcc_unreachable to places where either size >> or (and) offset is a non-constant. This survives regression tests >> (including ada) on x86_64-linux-gnu. Apart from that normal bootstrap + >> regression tests works

Re: [PATCH] Fix ipa-pure-const.c bug (PR ipa/77905)

2016-12-13 Thread Richard Biener
On Mon, 12 Dec 2016, Jakub Jelinek wrote: > Hi! > > The local pure const pass notices the static ctor is looping const, > so sets TREE_READONLY and DECL_LOOPING_CONST_OR_PURE_P and does not > clear DECL_STATIC_CONSTRUCTOR bit because it is looping. > Then the ipa pure const pass notices the

Re: [PATCH] [x86] Don't use builtins for SIMD shifts

2016-12-13 Thread Richard Biener
On Sat, Dec 10, 2016 at 7:59 PM, Marc Glisse wrote: > On Sat, 10 Dec 2016, Allan Sandfeld Jensen wrote: > >> On Saturday 10 December 2016, Marc Glisse wrote: >>> >>> On Sat, 10 Dec 2016, Marc Glisse wrote: On Sat, 10 Dec 2016, Allan Sandfeld Jensen wrote: >

Re: [RFC][PATCH] Sanopt for use-after-scope ASAN_MARK internal functions

2016-12-13 Thread Martin Liška
I'm sending updated version that uses asan_mark_p predicate and the patch can bootstrap on ppc64le-redhat-linux and survives regression tests. Ready to be installed? Martin >From d0ff310f636e8281198d5b549d00e6e5d94972e0 Mon Sep 17 00:00:00 2001 From: marxin Date: Mon, 12 Dec

Re: [PATCH], Add PowerPC ISA 3.0 vec_vinsert4b and vec_vextract4b built-in functions

2016-12-13 Thread Michael Meissner
On Tue, Dec 13, 2016 at 04:40:20PM -0600, Segher Boessenkool wrote: > > + /* If we got invalid arguments bail out before generating bad rtl. > > */ > > If what is invalid? Just remove the first comment? I had copied the code from DST before, and it returns (const_int 0). However, normal

[LRA] Fix ICE for paradoxical subregs on strict-alignment platforms

2016-12-13 Thread Eric Botcazou
o.s +===GNAT BUG DETECTED==+ | 7.0.0 20161213 (experimental) [trunk revision 243595] (sparc-sun- solaris2.10) GCC error:| | in lra_set_insn_recog_data, at lra.c:965 | | Error detected around g-debpoo.adb:189

Re: [PATCH], Add PowerPC ISA 3.0 vec_vinsert4b and vec_vextract4b built-in functions

2016-12-13 Thread Segher Boessenkool
Hi Mike, On Tue, Dec 13, 2016 at 01:16:56PM -0500, Michael Meissner wrote: > I have done bootstrap builds on a 64-bit power8 little endian system and a > 32/64-bit power7 big endian system. There were no regressions. Can I check > this into the GCC trunk? Yes, please apply. One remark below.

Re: [PATCH] Add ISA 3.0 PowerPC support for VEXTU{B,H,W}{L,R}X instructions

2016-12-13 Thread Segher Boessenkool
On Tue, Dec 13, 2016 at 10:15:02AM -0500, Michael Meissner wrote: > This patch should address the comments in the last patch. > > I have tested this patch with bootstrap builds and make check regression tests > on a little endian Power8 64-bit system and a big endian Power7 32/64-bit > system

Re: [PATCH] Add ISA 3.0 PowerPC support for VEXTU{B,H,W}{L,R}X instructions

2016-12-13 Thread Michael Meissner
On Tue, Dec 13, 2016 at 04:29:36PM -0600, Segher Boessenkool wrote: > On Tue, Dec 13, 2016 at 10:15:02AM -0500, Michael Meissner wrote: > > This patch should address the comments in the last patch. > > > > I have tested this patch with bootstrap builds and make check regression > > tests > > on

Re: [PATCH v3,rs6000] Add built-in function support for Power9 byte instructions

2016-12-13 Thread Kelvin Nilsen
Thanks for your quick feedback. I'll update the comments regarding possible future enhancement to support QImode for operands[1] as well. Regarding the two test cases that are missing the scan-assembler directive (byte-in-set-1.c and byte-in-set-2.c), those tests are both expected to fail.

Re: [PATCH] fix integer overflow bugs in gimple-ssa-sprintf.c (PR 78608)

2016-12-13 Thread Jeff Law
On 12/13/2016 04:49 PM, Martin Sebor wrote: Ping: https://gcc.gnu.org/ml/gcc-patches/2016-12/msg00262.html (I would have almost forgotten about this if it weren't for bug 78786. While working on a fix for it I keep thinking that some of the changes I'm making look like they should have already

Re: [PATCH v3,rs6000] Add built-in function support for Power9 byte instructions

2016-12-13 Thread Segher Boessenkool
Hi Kelvin, On Mon, Dec 12, 2016 at 05:40:05PM -0700, Kelvin Nilsen wrote: > The patch has been bootstrapped and tested on > powerpc64le-unknown-linux and powerpc-unknown-linux (big-endian, with > both -m32 and -m64 target options) with no regressions. > > Is this ok for the trunk? Yes it is,

Re: [PATCH] fix integer overflow bugs in gimple-ssa-sprintf.c (PR 78608)

2016-12-13 Thread Martin Sebor
Ping: https://gcc.gnu.org/ml/gcc-patches/2016-12/msg00262.html (I would have almost forgotten about this if it weren't for bug 78786. While working on a fix for it I keep thinking that some of the changes I'm making look like they should have already been made.) Thanks Martin On 12/02/2016

Re: [PATCH] Add ISA 3.0 PowerPC support for VEXTU{B,H,W}{L,R}X instructions

2016-12-13 Thread Segher Boessenkool
On Tue, Dec 13, 2016 at 06:17:17PM -0500, Michael Meissner wrote: > > > + else if (mode == V8HImode) > > > + { > > > + rtx tmp_gpr_si = (GET_CODE (tmp_gpr) == SCRATCH > > > + ? dest_si > > > + : gen_rtx_REG (SImode, REGNO (tmp_gpr))); > >

Re: Fold strstr (s, t) eq/ne s to strcmp (s, t) eq/ne 0 if strlen (t) is known

2016-12-13 Thread Prathamesh Kulkarni
On 13 December 2016 at 17:54, Jakub Jelinek wrote: > On Tue, Dec 13, 2016 at 05:41:09PM +0530, Prathamesh Kulkarni wrote: >> --- a/gcc/tree-ssa-strlen.c >> +++ b/gcc/tree-ssa-strlen.c >> @@ -,6 +,90 @@ handle_char_store (gimple_stmt_iterator *gsi) >>return true; >>

Re: [LRA] Fix ICE on pathological testcase

2016-12-13 Thread Jeff Law
On 12/07/2016 04:21 PM, Eric Botcazou wrote: Presumably the MEM isn't a valid memory address, but it's allowed through due to the use of an "X" constraint? Yes (that was supposed to be more or less clear given the description :-). ISTM that LRA has to be prepared to handle an arbitrary RTX,

[PATCH] work around MPFR undefined behavior (PR 78786)

2016-12-13 Thread Martin Sebor
In a discussion of my patch for bug 78696 I mentioned I had found a bug/limitation in MPFR that causes GCC to allocate excessive amounts of memory on some corner cases (very large precision). https://gcc.gnu.org/ml/gcc-patches/2016-12/msg01098.html I've since raised GCC bug 78786 for the GCC

Re: [PATCH] work around MPFR undefined behavior (PR 78786)

2016-12-13 Thread Jeff Law
On 12/13/2016 09:07 PM, Martin Sebor wrote: In a discussion of my patch for bug 78696 I mentioned I had found a bug/limitation in MPFR that causes GCC to allocate excessive amounts of memory on some corner cases (very large precision). https://gcc.gnu.org/ml/gcc-patches/2016-12/msg01098.html

Re: [PATCH v3,rs6000] Add built-in function support for Power9 byte instructions

2016-12-13 Thread Segher Boessenkool
On Tue, Dec 13, 2016 at 05:25:52PM -0700, Kelvin Nilsen wrote: > Regarding the two test cases that are missing the scan-assembler > directive (byte-in-set-1.c and byte-in-set-2.c), those tests are both > expected to fail. They are checking that the compiler rejects those > programs with

Re: [PATCH v3,rs6000] Add built-in function support for Power9 byte instructions

2016-12-13 Thread Sandra Loosemore
On 12/12/2016 05:40 PM, Kelvin Nilsen wrote: @@ -15105,6 +15109,24 @@ If all of the enabled test conditions are false, t The @code{scalar_test_neg} built-in functions return a non-zero value if their @code{source} argument holds a negative value. +The @code{__builtin_byte_in_set} function

Re: [PATCH] fix integer overflow bugs in gimple-ssa-sprintf.c (PR 78608)

2016-12-13 Thread Jeff Law
On 12/02/2016 05:36 PM, Martin Sebor wrote: Bug 78608 - gimple-ssa-sprintf.c:570:17: runtime error: negation of -9223372036854775808 cannot be represented in type 'long int' points out an integer overflow bug in the pass caught by ubsan. The bug was due to negating a number without checking for

Re: [PATCH] add missing attribute nonnull to stdio functions (PR 78673 and 17308)

2016-12-13 Thread Jeff Law
On 12/07/2016 08:24 PM, Martin Sebor wrote: You're right! Good chatch! I missed that there are two ways to represent the same thing. For example, these two declarations void __attribute ((nonnull (1, 2))) f (void); void __attribute ((nonnull (1))) __attribute ((nonnull (2))) f

Re: [PATCH] Enhance analyze_brprob script

2016-12-13 Thread Jeff Law
On 12/09/2016 03:40 AM, Martin Liška wrote: On 12/09/2016 11:02 AM, Martin Liška wrote: Following patch enhances scripts and fixed various small issues. Ready to be installed? Martin I forgot to squash commits, this is the right patch. M. 0001-Enhance-analyze_brprob-script.patch From

Re: [PATCH] S/390: Run md tests with -march=native instead of -march=z13.

2016-12-13 Thread Jakub Jelinek
On Tue, Dec 13, 2016 at 10:28:29AM +0100, Dominik Vogt wrote: > The attached patch fixes an md test execution problem on S/390. > The tests would be built with -march=z13 but executed even on > older machines. Build with -march=native instead, so executing > the tests should work on any machine

Re: [PATCH, GCC/ARM, gcc-5/6-branch, ping2] Fix PR77933: stack corruption on ARM when using high registers and lr

2016-12-13 Thread Thomas Preudhomme
On 09/12/16 15:27, Thomas Preudhomme wrote: On 09/12/16 14:30, Kyrill Tkachov wrote: On 09/12/16 14:24, Thomas Preudhomme wrote: [Seeing as an RC for GCC 6.3 was suggested on IRC for mid next week] Ping? backport for 6 bootstraps on Thumb-1 and testsuite shows no regression for either 5

Re: [PATCH, GCC/testsuite/ARM] Skip optional_mthumb tests if GCC has a default mode

2016-12-13 Thread Thomas Preudhomme
On 12/12/16 21:17, Christophe Lyon wrote: Hi Thomas, Thanks for working on this, On 12 December 2016 at 18:52, Thomas Preudhomme wrote: Hi, The logic to make -mthumb optional for Thumb-only devices is only executed when no -marm or -mthumb is given on the

Re: [PATCH] omp-low.c split

2016-12-13 Thread Jakub Jelinek
On Tue, Dec 13, 2016 at 11:15:43AM +0100, Martin Jambor wrote: > I have bootstrapped the two patches on aarch64-linux and bootstrapped > and tested them on x86_64-linux. What do you think? Thanks a lot for the work. If you wouldn't mind doing a couple of further changes (see below), I'd

Re: [RFC][PATCH] Sanopt for use-after-scope ASAN_MARK internal functions

2016-12-13 Thread Jakub Jelinek
On Tue, Dec 13, 2016 at 09:56:00AM +0100, Martin Liška wrote: > @@ -671,18 +678,203 @@ public: > > }; // class pass_sanopt > Please add a short function comment here... > +static void > +sanitize_asan_mark_unpoison (void) > +{ > + /* 1) Find all BBs that contain an ASAN_MARK poison call.

[PATCH] S/390: Run md tests with -march=native instead of -march=z13.

2016-12-13 Thread Dominik Vogt
The attached patch fixes an md test execution problem on S/390. The tests would be built with -march=z13 but executed even on older machines. Build with -march=native instead, so executing the tests should work on any machine generation. Tested on s390x biarch, but not bootstrapped or regression

Re: [PATCH] Avoid creating unbounded complexity debug insns in valtrack (PR debug/77844)

2016-12-13 Thread Jakub Jelinek
On Tue, Dec 13, 2016 at 10:05:58AM +0100, Richard Biener wrote: > > The following patch just throws away expressions that have 32 register > > references in there, I think that is so huge that it will be really very > > unlikely to be beneficial in the debug info and var-tracking would likely > >

Re: Fold strstr (s, t) eq/ne s to strcmp (s, t) eq/ne 0 if strlen (t) is known

2016-12-13 Thread Jakub Jelinek
On Tue, Dec 13, 2016 at 03:08:17PM +0530, Prathamesh Kulkarni wrote: > Thanks for the suggestions. It didn't occur to me to check for gimple_cond. > I have tried to do the changes in the attached version. > I am not sure if I have handled cond_expr correctly. > IIUC, if gimple_assign has code

Re: [PATCH] S/390: Run md tests with -march=native instead of -march=z13.

2016-12-13 Thread Jakub Jelinek
On Tue, Dec 13, 2016 at 11:18:31AM +0100, Dominik Vogt wrote: > > IMHO you want something like x86 avx_runtime effective target > > (z13_runtime?), which would stand for running on z13 capable hw and > > with z13 assembler support. > > Something like that, yes, but it's not so easy because the

Re: [PATCH, fortran, pr77785, v2] [Coarray] ICE in gfc_get_caf_token_offset, at fortran/trans-expr.c:1990

2016-12-13 Thread Janus Weil
Hi Andre, > all the sanitizer issues I fixed occur during compiling the testsuite. So I > would say, that when with the patch these errors do not occur anymore while > processing the testsuite, then those are tested for, right? aah, so you're saying that hunk is not actually related to the PR in

Re: [PATCH, GCC/testsuite/ARM] Skip optional_mthumb tests if GCC has a default mode

2016-12-13 Thread Christophe Lyon
On 13 December 2016 at 12:18, Thomas Preudhomme wrote: > On 13/12/16 10:11, Christophe Lyon wrote: >> >> On 13 December 2016 at 10:54, Thomas Preudhomme >> wrote: >>> >>> On 12/12/16 21:17, Christophe Lyon wrote: Hi

Re: [PATCH] [AArch64] Implement popcount pattern

2016-12-13 Thread Hurugalawadi, Naveen
Hi Kyrill, Thanks for reviewing the patch and your useful comments. >> looks good to me if it has gone through the normal required >> bootstrap and testing, but I can't approve. Bootstrapped and Regression Tested on aarch64-thunderx-linux. >> The rest of the MD file uses the term AdvSIMD.

Re: [RFC][PATCH] Sanopt for use-after-scope ASAN_MARK internal functions

2016-12-13 Thread Martin Liška
On 12/13/2016 10:17 AM, Jakub Jelinek wrote: > On Tue, Dec 13, 2016 at 09:56:00AM +0100, Martin Liška wrote: >> @@ -671,18 +678,203 @@ public: >> >> }; // class pass_sanopt >> > > Please add a short function comment here... > >> +static void >> +sanitize_asan_mark_unpoison (void) >> +{ >> +

Re: [PATCH] omp-low.c split

2016-12-13 Thread Martin Jambor
Hi, On Tue, Dec 13, 2016 at 12:43:16PM +0100, Jakub Jelinek wrote: > On Tue, Dec 13, 2016 at 12:39:01PM +0100, Thomas Schwinge wrote: > > On Fri, 9 Dec 2016 14:08:21 +0100, Martin Jambor wrote: > > > this is the promised attempt at splitting omp-low.c [...] > > > > Yay! \o/ >

Re: Fold strstr (s, t) eq/ne s to strcmp (s, t) eq/ne 0 if strlen (t) is known

2016-12-13 Thread Prathamesh Kulkarni
On 9 December 2016 at 17:59, Jakub Jelinek wrote: > On Fri, Dec 09, 2016 at 05:36:41PM +0530, Prathamesh Kulkarni wrote: >> --- a/gcc/tree-ssa-strlen.c >> +++ b/gcc/tree-ssa-strlen.c >> @@ -2302,7 +2302,81 @@ strlen_optimize_stmt (gimple_stmt_iterator *gsi) >> else if

Ping #1: [patch,testsuite,avr]: Filter-out -mmcu= from options for tests that set -mmcu=

2016-12-13 Thread Georg-Johann Lay
Ping #1 As I explained below, the solution taken be arm (pruning output) does not work here. Johann On 02.12.2016 11:21, Georg-Johann Lay wrote: On 01.12.2016 17:40, Mike Stump wrote: On Dec 1, 2016, at 3:54 AM, Georg-Johann Lay wrote: This patch moves the compile tests

Re: [PATCH] Add pretty printer for ASAN_MARK and add a helper fn

2016-12-13 Thread Jakub Jelinek
On Tue, Dec 13, 2016 at 01:14:00PM +0100, Martin Liška wrote: > On 12/13/2016 10:05 AM, Jakub Jelinek wrote: > > Ok. But the builtins should be renamed too (incrementally), > > BUILT_IN_ASAN_CLOBBER_N, "__asan_poison_stack_memory", > > should really be BUILT_IN_ASAN_POISON_STACK_MEMORY etc. > >

Re: [RFC][PATCH] Sanopt for use-after-scope ASAN_MARK internal functions

2016-12-13 Thread Jakub Jelinek
On Tue, Dec 13, 2016 at 01:12:34PM +0100, Martin Liška wrote: > >> + gimple_stmt_iterator gsi; > >> + bool finish = false; > >> + for (gsi = gsi_last_bb (bb); !gsi_end_p (gsi); gsi_prev ()) > >> + { > >> +gimple *stmt = gsi_stmt (gsi); > >> +if (maybe_contains_asan_check

Re: [PATCH] S/390: Run md tests with -march=native instead of -march=z13.

2016-12-13 Thread Dominik Vogt
On Tue, Dec 13, 2016 at 10:42:37AM +0100, Jakub Jelinek wrote: > On Tue, Dec 13, 2016 at 10:28:29AM +0100, Dominik Vogt wrote: > > The attached patch fixes an md test execution problem on S/390. > > The tests would be built with -march=z13 but executed even on > > older machines. Build with

Re: [Patch, fortran] PR78737 - [OOP] linking error with deferred, undefined user-defined derived-type I/O

2016-12-13 Thread Paul Richard Thomas
Dear Janus, We got there! OK for trunk. This was a demonstration of the corollary of the "bon mot" from Barack Obama at the end of the message :-) Many thanks for finding the right path. Paul On 13 December 2016 at 10:23, Janus Weil wrote: > 2016-12-13 10:58 GMT+01:00

Re: [PATCH] omp-low.c split

2016-12-13 Thread Thomas Schwinge
Hi! On Fri, 9 Dec 2016 14:08:21 +0100, Martin Jambor wrote: > this is the promised attempt at splitting omp-low.c [...] Yay! \o/ I have not yet had a chance to review/test this patch, but I plan to. A few initial comments from the "bike shed departement"; I understand in GCC

Re: [PATCH, GCC, gcc-5/6-branch] Fix PR77673: bswap loads passed end of object

2016-12-13 Thread Thomas Preudhomme
Sorry, ignore the first attachment (2_combine_profile_multilib.patch). i always miss that Thunderbird selects the first file in the in-review folder upfront. Best regards, Thomas On 13/12/16 11:43, Thomas Preudhomme wrote: Hi, Fix in r242869 for PR77673 (bswap loads after end of object)

Re: [PATCH] Add pretty printer for ASAN_MARK and add a helper fn

2016-12-13 Thread Martin Liška
On 12/13/2016 10:05 AM, Jakub Jelinek wrote: > Ok. But the builtins should be renamed too (incrementally), > BUILT_IN_ASAN_CLOBBER_N, "__asan_poison_stack_memory", > should really be BUILT_IN_ASAN_POISON_STACK_MEMORY etc. > > Jakub This is follow-up that I've just tested and

Re: [PATCH, middle-end]: Fix PR78738, unrecognized insn with -ffast-math

2016-12-13 Thread James Greenhalgh
On Tue, Dec 13, 2016 at 09:52:40AM +0100, Richard Biener wrote: > On Sun, Dec 11, 2016 at 5:16 PM, Uros Bizjak wrote: > > On Fri, Dec 9, 2016 at 11:09 AM, Richard Biener > > wrote: > >> On Thu, Dec 8, 2016 at 10:44 PM, Uros Bizjak

Re: [PATCH, GCC/testsuite/ARM] Skip optional_mthumb tests if GCC has a default mode

2016-12-13 Thread Thomas Preudhomme
On 13/12/16 10:11, Christophe Lyon wrote: On 13 December 2016 at 10:54, Thomas Preudhomme wrote: On 12/12/16 21:17, Christophe Lyon wrote: Hi Thomas, Thanks for working on this, On 12 December 2016 at 18:52, Thomas Preudhomme

Re: [patch, doc] Move -pthread documentation to linker options

2016-12-13 Thread Rainer Orth
Hi Sandra, > On 12/11/2016 01:28 PM, Rainer Orth wrote: >> Hi Sandra, >> >>> PR 16519 notes that -pthread has only ever been documented as an RS6000 and >>> Solaris 2 option. In fact it's supported by most/all(?) POSIX-flavored >>> targets, including GNU/Linux, BSD variants, Darwin, etc. It's

Re: [PATCH] Optimiza aggregate a = b = c = {} (PR c/78408)

2016-12-13 Thread Jakub Jelinek
Hi! Sorry for not getting to this earlier. On Mon, Nov 28, 2016 at 10:50:26AM +0100, Richard Biener wrote: > > + else if (gimple_call_builtin_p (defstmt, BUILT_IN_MEMSET) > > + && TREE_CODE (gimple_call_arg (defstmt, 0)) == ADDR_EXPR > > + && TREE_CODE (gimple_call_arg (defstmt, 1))

[PATCH, GCC, gcc-5/6-branch] Fix PR77673: bswap loads passed end of object

2016-12-13 Thread Thomas Preudhomme
Hi, Fix in r242869 for PR77673 (bswap loads after end of object) applies cleanly on GCC 6 and with trivial fix for GCC 5 (gimple * in GCC 6 -> gimple in GCC 5). The backports also bootstrap fine on x86_64-linux-gnu and testsuite shows no regression. ChangeLog entries are as follow: ***

[PATCH, GCC, gcc-5/6-branch] Improve comment for struct symbolic_number in bswap pass

2016-12-13 Thread Thomas Preudhomme
Hi, Fix in r242869 for PR77673 was accompanied with r242870 which updated the description of the struct symbolic_number modified by the previous patch. It did so by rewriting the comment completely but I believe this patch should be still backported to make the comment match the code.

Re: [PATCH] [AArch64] Implement popcount pattern

2016-12-13 Thread Kyrill Tkachov
Hi Naveen, On 13/12/16 11:51, Hurugalawadi, Naveen wrote: Hi Kyrill, Thanks for reviewing the patch and your useful comments. looks good to me if it has gone through the normal required bootstrap and testing, but I can't approve. Bootstrapped and Regression Tested on aarch64-thunderx-linux.

Re: [PATCH, GCC/testsuite/ARM] Skip optional_mthumb tests if GCC has a default mode

2016-12-13 Thread Christophe Lyon
On 13 December 2016 at 10:54, Thomas Preudhomme wrote: > On 12/12/16 21:17, Christophe Lyon wrote: >> >> Hi Thomas, >> >> Thanks for working on this, >> >> >> On 12 December 2016 at 18:52, Thomas Preudhomme >> wrote: >>> >>> Hi, >>>

Re: [PATCH] avoid infinite recursion in maybe_warn_alloc_args_overflow (pr 78775)

2016-12-13 Thread Richard Biener
On Tue, Dec 13, 2016 at 2:36 AM, Martin Sebor wrote: > The attached patch avoids infinite recursion when traversing phi > nodes in maybe_warn_alloc_args_overflow by using a bitmap to keep > track of those already visited and breaking out. It looks somewhat excessive (the whole

Re: [PATCH] avoid infinite recursion in maybe_warn_alloc_args_overflow (pr 78775)

2016-12-13 Thread Marek Polacek
On Mon, Dec 12, 2016 at 06:36:16PM -0700, Martin Sebor wrote: > +/* Return true if the type of OP is signed, looking through any casts > + to an unsigned type. */ > + > +static bool > +operand_signed_p (tree op) > +{ > + bitmap visited = NULL; > + bool ret = operand_signed_p (op, ); > + > +

Re: [PATCH] omp-low.c split

2016-12-13 Thread Jakub Jelinek
On Tue, Dec 13, 2016 at 12:39:01PM +0100, Thomas Schwinge wrote: > On Fri, 9 Dec 2016 14:08:21 +0100, Martin Jambor wrote: > > this is the promised attempt at splitting omp-low.c [...] > > Yay! \o/ > > I have not yet had a chance to review/test this patch, but I plan to. > >

Re: [PATCH, fortran, pr77785, v2] [Coarray] ICE in gfc_get_caf_token_offset, at fortran/trans-expr.c:1990

2016-12-13 Thread Andre Vehreschild
Hi Janus, no sorry. I mixed up the context. I thought your question was on pr78534. Sorry for getting those two PRs mixed up. Just void my answer below. It is wrong. I will see what I can do about a better testcase for the trans-array part. The code responsible for the error unfortunately does

Re: Fold strstr (s, t) eq/ne s to strcmp (s, t) eq/ne 0 if strlen (t) is known

2016-12-13 Thread Prathamesh Kulkarni
On 13 December 2016 at 15:27, Jakub Jelinek wrote: > On Tue, Dec 13, 2016 at 03:08:17PM +0530, Prathamesh Kulkarni wrote: >> Thanks for the suggestions. It didn't occur to me to check for gimple_cond. >> I have tried to do the changes in the attached version. >> I am not sure if

Re: Fold strstr (s, t) eq/ne s to strcmp (s, t) eq/ne 0 if strlen (t) is known

2016-12-13 Thread Jakub Jelinek
On Tue, Dec 13, 2016 at 05:41:09PM +0530, Prathamesh Kulkarni wrote: > --- a/gcc/tree-ssa-strlen.c > +++ b/gcc/tree-ssa-strlen.c > @@ -,6 +,90 @@ handle_char_store (gimple_stmt_iterator *gsi) >return true; > } > > +/* Try to fold strstr (s, t) eq/ne s to memcmp (s, t, strlen (t))

Re: [PATCH] omp-low.c split

2016-12-13 Thread Martin Jambor
Hi, On Fri, Dec 09, 2016 at 07:18:54PM +0300, Alexander Monakov wrote: > On Fri, 9 Dec 2016, Jakub Jelinek wrote: > > Can you post an incremental patch fixing those issues? > > A few small nits I found while reading the patch. > > First of all, please use 'git diff --patience' (or --histogram)

Re: [PATCH, fortran, pr77785, v3] [Coarray] ICE in gfc_get_caf_token_offset, at fortran/trans-expr.c:1990

2016-12-13 Thread Janus Weil
Hi Andre, > thanks for the input on the missing testcase, Janus (btw, when you know where > to > get a new crystal ball, let me know; I am missing mine, too). The new version > of the patch adds a new testcase coarray_41.f90 to test that the compiler > compiles correctly and the test runs ok. >

[PATCH] Dump number of loops in a function plus fixup state

2016-12-13 Thread Richard Biener
I've found this useful several times. Note that currently number_of_loops returns loops plus freed ones, the patch prepares to change that, adjusting number_of_loops callers to use vec_safe_length if they really want the maximum allocated loop number. Bootstrapped on x86_64-unknown-linux-gnu,

Re: [PATCH] Add ISA 3.0 PowerPC support for VEXTU{B,H,W}{L,R}X instructions

2016-12-13 Thread Michael Meissner
This patch should address the comments in the last patch. I have tested this patch with bootstrap builds and make check regression tests on a little endian Power8 64-bit system and a big endian Power7 32/64-bit system with no regressions. Can I check this into the trunk? [gcc] 2016-12-13

Re: [RFC][PATCH] Sanopt for use-after-scope ASAN_MARK internal functions

2016-12-13 Thread Martin Liška
On 12/13/2016 01:29 PM, Jakub Jelinek wrote: > On Tue, Dec 13, 2016 at 01:12:34PM +0100, Martin Liška wrote: + gimple_stmt_iterator gsi; + bool finish = false; + for (gsi = gsi_last_bb (bb); !gsi_end_p (gsi); gsi_prev ()) + { +gimple *stmt = gsi_stmt

Re: [RFC][PATCH] Sanopt for use-after-scope ASAN_MARK internal functions

2016-12-13 Thread Jakub Jelinek
On Tue, Dec 13, 2016 at 04:21:56PM +0100, Martin Liška wrote: > gcc/ChangeLog: > > 2016-12-12 Martin Liska > > * sanopt.c (sanopt_optimize_walker): Set contains_asan_mark. > (sanopt_optimize): Add new argument. > (sanitize_asan_mark_unpoison): New function. >

Re: [PATCH] omp-low.c split

2016-12-13 Thread Alexander Monakov
On Tue, 13 Dec 2016, Martin Jambor wrote: > I have bootstrapped the two patches on aarch64-linux and bootstrapped > and tested them on x86_64-linux. What do you think? Sorry for my 'false alarm' about cp/parser.c conflict in the previous mail -- I thought I was applying your patch to trunk, but

RE: [PATCH, testsuite] MIPS: Skip msa-builtins-err.c if there is no assembly output.

2016-12-13 Thread Matthew Fortune
Toma Tabacu writes: > > > > It's a shame this is the only way to deal with this but I see aarch64 > > have to resort to the same thing for error checking tests. > > > > I have looked into this some more and I 've found that the solution I > proposed is incomplete. > >

[PATCH] Fix PR78788

2016-12-13 Thread Richard Biener
The following patch fixes PR78788. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. Richard. 2016-12-13 Richard Biener PR tree-optimization/78788 * tree-vrp.c (set_value_range): Allow [-INF(OVF), +INF(OVF)].

Re: RFC: Allow emergency EH pool size to be controlled (for stage 1)

2016-12-13 Thread Ville Voutilainen
On 13 December 2016 at 16:52, Richard Biener wrote: > On Tue, Dec 13, 2016 at 3:45 PM, Ville Voutilainen > wrote: >> On 13 December 2016 at 16:42, Richard Biener >> wrote: >>> Also maybe N should be the number

Re: [PATCH, fortran, pr77785, v3] [Coarray] ICE in gfc_get_caf_token_offset, at fortran/trans-expr.c:1990

2016-12-13 Thread Andre Vehreschild
Hi Janus, hi all, thanks for the input on the missing testcase, Janus (btw, when you know where to get a new crystal ball, let me know; I am missing mine, too). The new version of the patch adds a new testcase coarray_41.f90 to test that the compiler compiles correctly and the test runs ok.

Re: [PATCH] Fill bitregion_{start,end} in store_constructor (PR, tree-optimization/78428).

2016-12-13 Thread Richard Biener
On Tue, Dec 13, 2016 at 10:05 AM, Martin Liška wrote: > On 12/12/2016 12:10 PM, Eric Botcazou wrote: >>> Ok. I'm sending a patch that put gcc_unreachable to places where either size >>> or (and) offset is a non-constant. This survives regression tests >>> (including ada) on

Re: RFC: Allow emergency EH pool size to be controlled (for stage 1)

2016-12-13 Thread Ville Voutilainen
On 13 December 2016 at 16:42, Richard Biener wrote: > Also maybe N should be the number of exception objects rather > than bytes? Otherwise a target independent N is hard to specify > for say, a distribution that wants either a different default or a > static buffer.

Re: [PATCH] omp-low.c split

2016-12-13 Thread Cesar Philippidis
On 12/13/2016 04:42 AM, Martin Jambor wrote: >> And this as well. But omp-grid.c is fine too. > > ...I prefer omp-grid.c because I plan to use gridification also for > GCN targets, though hopefully only as an optimization rather than a > hard requirement ...and in fact I still think it is a

Re: [PATCH] Tree-level fix for PR 69526

2016-12-13 Thread Richard Biener
On Wed, Dec 7, 2016 at 5:14 PM, Robin Dapp wrote: >> So we have (uint64_t)(uint32 + -1U) + 1 and using TYPE_SIGN (inner_type) >> produces (uint64_t)uint32 + -1U + 1. This simply means that we cannot ignore >> overflow of the inner operation and for some reason your

RFC: Allow emergency EH pool size to be controlled (for stage 1)

2016-12-13 Thread Jonathan Wakely
This patch allows the size of the emergency buffer for exception handling to be controlled by a build-time macro (to avoid dynamic allocation) or by a run-time environment variable (to allocate a larger or smaller buffer). This will have to wait for the next stage 1 now, as it's too late for GCC

Re: [RFC][PATCH] Speed-up use-after-scope (re-writing to SSA)

2016-12-13 Thread Richard Biener
On Thu, Dec 8, 2016 at 1:51 PM, Martin Liška wrote: > On 12/02/2016 01:29 PM, Richard Biener wrote: >> On Thu, Dec 1, 2016 at 5:30 PM, Martin Liška wrote: >>> On 11/23/2016 03:13 PM, Jakub Jelinek wrote: On Wed, Nov 23, 2016 at 02:57:07PM +0100, Martin Liška

Re: [Patch, fortran] PR78737 - [OOP] linking error with deferred, undefined user-defined derived-type I/O

2016-12-13 Thread Janus Weil
Hi Paul, > We got there! OK for trunk. thanks. Unfortunately there was a problem with my latest patch, so what I now committed as r243609 is basically your fixed version of my draft patch (with some very minor adjustments). Phew, we finally nailed it! (My dtio_13 fix had seemed to work at some

Re: [PR78365] ICE in determine_value_range, at tree-ssa-loo p-niter.c:413

2016-12-13 Thread Richard Biener
On Mon, Dec 12, 2016 at 8:57 AM, kugan wrote: > Hi Richard, > >>> I am fine with the new patch but you'll need an approval from Honza >>> or Richi. >>> >>> I find it a bit saddening that we cannot really rely on >>> gimple_call_fntype but at least I do not see

Re: RFC: Allow emergency EH pool size to be controlled (for stage 1)

2016-12-13 Thread Richard Biener
On Tue, Dec 13, 2016 at 2:50 PM, Jonathan Wakely wrote: > This patch allows the size of the emergency buffer for exception > handling to be controlled by a build-time macro (to avoid dynamic > allocation) or by a run-time environment variable (to allocate a > larger or smaller

Re: RFC: Allow emergency EH pool size to be controlled (for stage 1)

2016-12-13 Thread Richard Biener
On Tue, Dec 13, 2016 at 3:45 PM, Ville Voutilainen wrote: > On 13 December 2016 at 16:42, Richard Biener > wrote: >> Also maybe N should be the number of exception objects rather >> than bytes? Otherwise a target independent N is hard to

[PATCH, rs6000] Cost model adjustment

2016-12-13 Thread Bill Schmidt
Hi, This patch makes a slight adjustment to the vectorization cost model that was previously overlooked. Bootstrapped and tested on powerpc64le-unknown-linux gnu with no regressions. Ok for trunk? Thanks, Bill 2016-12-13 Bill Schmidt *

[arm-embedded] Add ARMv8-M Security Extensions support to Cortex-M23 and Cortex-M33

2016-12-13 Thread Thomas Preudhomme
Hi, We have decided to apply the following patch to the embedded-6-branch to enable ARMv8-M Security Extensions to ARM Cortex-M23 and ARM Cortex-M33. ChangeLog entry is as follows: *** gcc/ChangeLog *** 2016-12-13 Thomas Preud'homme *

[PATCH, i386]: Fix PR78794, ~9% regression in 32-bit mode for 462.libquntum on Avoton after r243202

2016-12-13 Thread Uros Bizjak
Hello! Attached patch fixes STV cost function to better model gains of pandn insn on non-BMI targets. As explained in the PR, STV converts four scalar arithmetic insns (2 * not and 2 * and) to one (pandn). The patch increases gain for non-BMI targets for 2 * ix86_cost->add to a total of 3 *

Re: [PATCH, rs6000] Add support for vec_pack and vec_sld built-ins

2016-12-13 Thread Carl E. Love
On Thu, 2016-12-08 at 21:03 -0600, Segher Boessenkool wrote: > On Thu, Dec 08, 2016 at 08:28:22AM -0800, Carl E. Love wrote: > > The following patch adds two more built-ins that are missing. > > Specifically: > > > > vector floatvec_packvector doublevector double > >

Re: [PATCH] avoid infinite recursion in maybe_warn_alloc_args_overflow (pr 78775)

2016-12-13 Thread Jeff Law
On 12/13/2016 03:52 AM, Marek Polacek wrote: On Mon, Dec 12, 2016 at 06:36:16PM -0700, Martin Sebor wrote: +/* Return true if the type of OP is signed, looking through any casts + to an unsigned type. */ + +static bool +operand_signed_p (tree op) +{ + bitmap visited = NULL; + bool ret =

Re: [PATCH, fortran, pr77785, v3] [Coarray] ICE in gfc_get_caf_token_offset, at fortran/trans-expr.c:1990

2016-12-13 Thread Andre Vehreschild
Hi Janus, thanks for the review. Committed as r243614. - Andre On Tue, 13 Dec 2016 16:08:59 +0100 Janus Weil wrote: > Hi Andre, > > > thanks for the input on the missing testcase, Janus (btw, when you know > > where to get a new crystal ball, let me know; I am missing

Re: Ping #1: [patch,testsuite,avr]: Filter-out -mmcu= from options for tests that set -mmcu=

2016-12-13 Thread Denis Chertykov
2016-12-13 13:36 GMT+04:00 Georg-Johann Lay : > Ping #1 > > As I explained below, the solution taken be arm (pruning output) > does not work here. Approved. Please apply your patch. > > Johann > > On 02.12.2016 11:21, Georg-Johann Lay wrote: >> >> On 01.12.2016 17:40, Mike Stump

[PATCH], Add PowerPC ISA 3.0 vec_vinsert4b and vec_vextract4b built-in functions

2016-12-13 Thread Michael Meissner
This patch adds support for the vec_vinsert4b and vec_vextract4b built-in functions that generate the ISA 3.0 XXINSERTW and XXEXTRACTUW/VEXTUW{L,R}X instructions. These functions are part of the PowerOpen 64-bit ELF V2 abi. In doing the work, I noticed the P9V built-in ternary functions

Re: [Patch, Fortran, cleanup] PR 78798: some int-valued functions should be bool

2016-12-13 Thread Janne Blomqvist
On Tue, Dec 13, 2016 at 8:13 PM, Janus Weil wrote: > Hi all, > > here is a straightforward cleanup patch that makes a few functions > return a bool instead of an int. Regtests cleanly on x86_64-linux-gnu. > Ok for trunk? Ok, thanks. -- Janne Blomqvist

[PATCH, Fortran, pr78780, v1] [7 Regression] [Coarray] ICE in conv_caf_send, at fortran/trans-intrinsic.c:1936

2016-12-13 Thread Andre Vehreschild
Hi all, attached patch fixes the issue by improving the check whether a call of the caf-runtime-routines needs to be generated instead of a regular assignment. Bootstraps and regtests ok on x86_64-linux/f23. Ok for trunk? - Andre -- Andre Vehreschild * Email: vehre ad gmx dot de

Re: [C++ PATCH] c++/78776 fix alias template ICE

2016-12-13 Thread Nathan Sidwell
On 12/12/2016 10:28 PM, Jason Merrill wrote: I suspect that most uses don't need to change. Indeed. This addresses the ones I could find. Both by grepping pt.c and fixing subsequent test fall out. took the opportunity to make the control flow in get_underlying_template somewhat clearer.

Re: libgo patch committed: Copy hash code from Go 1.7 runtime

2016-12-13 Thread Ian Lance Taylor
On Fri, Dec 9, 2016 at 1:37 AM, Rainer Orth wrote: > > 2016-12-09 Rainer Orth > > * configure.ac: Call GCC_CHECK_LINKER_HWCAP. > * Makefile.am (AM_LDFLAGS): Initialize to HWCAP_LDFLAGS. >

[Patch, Fortran, cleanup] PR 78798: some int-valued functions should be bool

2016-12-13 Thread Janus Weil
Hi all, here is a straightforward cleanup patch that makes a few functions return a bool instead of an int. Regtests cleanly on x86_64-linux-gnu. Ok for trunk? Cheers, Janus 2016-12-13 Janus Weil PR fortran/78798 * gfortran.h (gfc_is_constant_expr,

Re: [PATCH, rs6000] Cost model adjustment

2016-12-13 Thread Segher Boessenkool
Hi Bill, On Tue, Dec 13, 2016 at 11:13:08AM -0600, Bill Schmidt wrote: > This patch makes a slight adjustment to the vectorization cost model that > was previously overlooked. > > Bootstrapped and tested on powerpc64le-unknown-linux gnu with no regressions. > Ok for trunk? Sure, thanks! >

  1   2   >