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 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. They

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: [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 appropriat

[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 p

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 r

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] 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 e

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, s

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 (void

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 c6

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; >> } >> >> +/* Try to

<    1   2