[x86][patch] Fix clwb for skylake

2017-12-11 Thread Koval, Julia
Hi Uros, Kirill, According to isa-extensions doc CLWB appeared first in Skylake-avx512, but it isn't in the PTA. This patch fixes it. Ok for trunk? Thanks, Julia 0001-i386.patch Description: 0001-i386.patch

Re: [x86][patch] Fix clwb for skylake

2017-12-11 Thread Uros Bizjak
On Mon, Dec 11, 2017 at 9:34 AM, Koval, Julia wrote: > Hi Uros, Kirill, > According to isa-extensions doc CLWB appeared first in Skylake-avx512, but it > isn't in the PTA. This patch fixes it. Ok for trunk? Please also include ChangeLog entry in your patch submission. Uros.

Re: [PATCH][GCC][ARM] Fix failing testcase pragma_fpu_attribute.c

2017-12-11 Thread Christophe Lyon
On 8 December 2017 at 15:53, Tamar Christina wrote: > Hi All, > > My previous patch had two issues with the new test cases. > It seems that depending on which DejaGnu version you have > dg-additional-options will add the options before or after the > ones added by the test suite. Which means I can

[PATCH] [SPARC] Make sure that jump is to a label in errata workaround

2017-12-11 Thread Daniel Cederman
In some cases the jump could be to a return instruction and in those cases the next_active_insn() function tries to follow an invalid pointer which leads to a crash. This error did not manifest when using a 32-bit version of GCC which is why I did not detect it before. Thanks to Sebastian for repor

Re: [PATCH] Fix cgraph_edge::redirect_call_stmt_to_callee noreturn call handling (PR c++/78692)

2017-12-11 Thread Thomas Schwinge
Hi! On Wed, 7 Dec 2016 18:28:39 +0100, Jakub Jelinek wrote: > The code in this function assumes that lhs is the lhs of new_stmt (it tests > that new_stmt is a noreturn call etc.), but that is only the case if > new_stmt == e->call_stmt. But in the function it can be set to various > other stmts.

Re: [PATCH] Fix Bug 83237 - Values returned by std::poisson_distribution are not distributed correctly

2017-12-11 Thread Paolo Carlini
Hi, On 10/12/2017 14:47, Michele Pezzutti wrote: Hi. This patch intends to fix Bug 83237 - Values returned by std::poisson_distribution are not distributed correctly. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83237for issue description and tests. In any case, the fix should come with a

Re: [PATCH] Fix Bug 83237 - Values returned by std::poisson_distribution are not distributed correctly

2017-12-11 Thread Paolo Carlini
Hi, On 10/12/2017 14:47, Michele Pezzutti wrote: Hi. This patch intends to fix Bug 83237 - Values returned by std::poisson_distribution are not distributed correctly. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83237for issue description and tests. In any case, the fix should come with a

RE: [PATCH][GCC][ARM] Fix failing testcase pragma_fpu_attribute.c

2017-12-11 Thread Tamar Christina
Hi Christoph, > -Original Message- > From: Christophe Lyon [mailto:christophe.l...@linaro.org] > Sent: Monday, December 11, 2017 09:02 > To: Tamar Christina > Cc: gcc-patches@gcc.gnu.org; nd ; Ramana Radhakrishnan > ; Richard Earnshaw > ; ni...@redhat.com; Kyrylo Tkachov > > Subject: Re:

Re: [PATCH] [SPARC] Make sure that jump is to a label in errata workaround

2017-12-11 Thread Eric Botcazou
> 2017-12-11 Daniel Cederman > > * config/sparc/sparc.c (sparc_do_work_around_errata): Make sure > the jump is to a label. OK for mainline and 7 branch, thanks. -- Eric Botcazou

Re: [PATCH] Allow USE in PARALLELs in store_data_bypass_p

2017-12-11 Thread Eric Botcazou
> When looking at the rs6000_store_data_bypass_p stuff, I've noticed that > it accepts PARALLELs containing not just SETs and CLOBBERs like > store_data_bypass_p, but also USEs. Given that it is something that > single_set also ignores, I think fixing store_data_bypass_p is the > right fix here. >

Re: [PATCH] Allow USE in PARALLELs in store_data_bypass_p

2017-12-11 Thread Jakub Jelinek
On Mon, Dec 11, 2017 at 11:45:25AM +0100, Eric Botcazou wrote: > > When looking at the rs6000_store_data_bypass_p stuff, I've noticed that > > it accepts PARALLELs containing not just SETs and CLOBBERs like > > store_data_bypass_p, but also USEs. Given that it is something that > > single_set also

Re: [PATCH] Fix result for conditional reductions matching at index 0

2017-12-11 Thread Kilian Verhetsel
Hello, Jakub Jelinek writes: > As it doesn't apply, I can't easily check what the patch generates > on the PR80631 testcases vs. my thoughts on that; though, if it emits > something more complicated for the simple cases, perhaps we could improve > those (not handle it like COND_REDUCTION, but in

Re: [PATCH] Allow USE in PARALLELs in store_data_bypass_p

2017-12-11 Thread Eric Botcazou
> Is that long enough to be worth it? I mean, in all other places (rtlanal.c, > recog.c, ...) we use similar code in all spots where it is needed, adding > an inline would just mean yet another thing to remember. Or do you mean > CLOBBER_OR_USE_P macro? No, the whole function, it seems to duplic

Re: [PATCH][GCC][ARM] Fix failing testcase pragma_fpu_attribute.c

2017-12-11 Thread Christophe Lyon
On 11 December 2017 at 11:35, Tamar Christina wrote: > Hi Christoph, > >> -Original Message- >> From: Christophe Lyon [mailto:christophe.l...@linaro.org] >> Sent: Monday, December 11, 2017 09:02 >> To: Tamar Christina >> Cc: gcc-patches@gcc.gnu.org; nd ; Ramana Radhakrishnan >> ; Richard

RE: [PATCH][GCC][ARM] Fix failing testcase pragma_fpu_attribute.c

2017-12-11 Thread Tamar Christina
> -Original Message- > From: Christophe Lyon [mailto:christophe.l...@linaro.org] > Sent: Monday, December 11, 2017 11:24 > To: Tamar Christina > Cc: gcc-patches@gcc.gnu.org; nd ; Ramana Radhakrishnan > ; Richard Earnshaw > ; ni...@redhat.com; Kyrylo Tkachov > > Subject: Re: [PATCH][GCC]

[PATCH] Allow USE in PARALLELs in store_data_bypass_p (take 2)

2017-12-11 Thread Jakub Jelinek
On Mon, Dec 11, 2017 at 12:09:14PM +0100, Eric Botcazou wrote: > > Is that long enough to be worth it? I mean, in all other places (rtlanal.c, > > recog.c, ...) we use similar code in all spots where it is needed, adding > > an inline would just mean yet another thing to remember. Or do you mean

RE: [PATCH][GCC][ARM] Fix failing testcase pragma_fpu_attribute.c

2017-12-11 Thread Tamar Christina
> > > > > > It also works when I build natively using just configure && make. > > > Could be > > something in the configure flags. > > > Looking back at it, if the vanilla compiler doesn't support neon I > > > can see the test failing. But fixing it means Turning on neon and > > > then turning it >

Re: [PATCH][GCC][ARM] Fix failing testcase pragma_fpu_attribute.c

2017-12-11 Thread Christophe Lyon
On 11 December 2017 at 12:56, Tamar Christina wrote: >> > > >> > > It also works when I build natively using just configure && make. >> > > Could be >> > something in the configure flags. >> > > Looking back at it, if the vanilla compiler doesn't support neon I >> > > can see the test failing. But

Re: [PATCH] Allow USE in PARALLELs in store_data_bypass_p (take 2)

2017-12-11 Thread Eric Botcazou
> Ah, that makes a lot of sense. So like this? > > 2017-12-11 Jakub Jelinek > > * recog.c (store_data_bypass_p_1): New function. > (store_data_bypass_p): Handle USE in a PARALLEL like CLOBBER. Use > store_data_bypass_p_1 to avoid code duplication. Formatting fixes. Yes, b

Re: [PATCH] Allow USE in PARALLELs in store_data_bypass_p (take 2)

2017-12-11 Thread Jakub Jelinek
On Mon, Dec 11, 2017 at 01:26:42PM +0100, Eric Botcazou wrote: > > Ah, that makes a lot of sense. So like this? > > > > 2017-12-11 Jakub Jelinek > > > > * recog.c (store_data_bypass_p_1): New function. > > (store_data_bypass_p): Handle USE in a PARALLEL like CLOBBER. Use > > stor

Re: [PATCH] Fix result for conditional reductions matching at index 0

2017-12-11 Thread Jakub Jelinek
On Mon, Dec 11, 2017 at 11:56:55AM +0100, Kilian Verhetsel wrote: > Jakub Jelinek writes: > > As it doesn't apply, I can't easily check what the patch generates > > on the PR80631 testcases vs. my thoughts on that; though, if it emits > > something more complicated for the simple cases, perhaps we

[PATCH][AArch64] Specify fp16 support for Cortex-A55 and Cortex-A75

2017-12-11 Thread Kyrill Tkachov
Hi all, The Cortex-A55 and Cortex-A75 processors support the fp16 extension. We already specify them as such in the arm port. This patch makes aarch64 consistent on this front. Bootstrapped and tested on aarch64-none-linux-gnu. Manually checked that compiling with aarch64-none-linux-gnu-gcc -mc

Re: [PATCH] Fix result for conditional reductions matching at index 0

2017-12-11 Thread Jakub Jelinek
On Mon, Dec 11, 2017 at 02:11:34PM +0100, Jakub Jelinek wrote: > Thanks, it applies cleanly now > > + else if ((STMT_VINFO_VEC_REDUCTION_TYPE (stmt_info) == COND_REDUCTION > > + || (STMT_VINFO_VEC_REDUCTION_TYPE (stmt_info) > > + == INTEGER_INDUC_COND_REDUCTION)) > > + && redu

Re: [patch, fortran] Implement maxval for characters

2017-12-11 Thread James Greenhalgh
On Wed, Dec 06, 2017 at 11:38:21AM +, Christophe Lyon wrote: > Hi, > > > On 28 November 2017 at 19:40, Thomas Koenig wrote: > > Hello world, > > > > the attached patch implements maxval for characters, an F2003 feature > > that we were missing up to now. > > > > Regression-tested on x86_64-p

[Patch combine] Don't create vector mode ZERO_EXTEND from subregs

2017-12-11 Thread James Greenhalgh
Hi, In simplify_set we try transforming the paradoxical subreg expression: (set FOO (subreg:M (mem:N BAR) 0)) in to: (set FOO (zero_extend:M (mem:N BAR))) However, this code does not consider the case where M is a vector mode, allowing it to construct (for example): (zero_extend:V4SI (

Re: [PATCH] annotate vector::_M_default_append fo better codegen (PR 83229)

2017-12-11 Thread Jonathan Wakely
On 05/12/17 20:44 -0700, Martin Sebor wrote: Bug 83239 - False positive from -Wstringop-overflow on simple std::vector code, besides pointing out the warning, suggests a missed optimization opportunity. This is the second report involving for vector (the last one was pr79095) with the same sympt

[PATCH] Fix PR81889

2017-12-11 Thread Richard Biener
Unrolling often has only rudimentary info for the upper bound of a loop even though VRP would compute reasonable bounds for the variables participating in the loop exit test. This causes excessive peeling and thus warnings from array bound and uninit warning code. The following mitigates missing

[PR83370][AARCH64]Use tighter register constraints for sibcall patterns.

2017-12-11 Thread Renlin Li
Hi all, In aarch64 backend, ip0/ip1 register will be used in the prologue/epilogue as temporary register. When the compiler is performing sibcall optimization. It has the chance to use ip0/ip1 register for indirect function call to hold the address. However, those two register might be clobbere

Re: [PATCH] Fix stack overflow with autofdo (PR83355)

2017-12-11 Thread Richard Biener
On Mon, Dec 11, 2017 at 8:01 AM, Andi Kleen wrote: > From: Andi Kleen > > g++.dg/bprob* is failing currently with autofdo. > > Running in gdb shows that there is a very deep recursion in get_index_by_decl > until it > overflows the stack. > > This patch seems to fix it (but not sure why the abst

Re: [PATCH] Fix segfault in inliner with attribute flatten

2017-12-11 Thread Richard Biener
On Mon, Dec 11, 2017 at 8:01 AM, Andi Kleen wrote: > From: Andi Kleen > > This fixes a segfault in gcc 7/8 when building turicreate. > > For some reason the node has no decl here, and there is a > crash when checking for attribute flatten. As said in the PR it looks like the order array is corru

RE: [PATCH] rl78 anddi3 improvement

2017-12-11 Thread Sebastian Perta
Hello Jeff, Thank you for your comments. >>So I think you're ultimately far better off determining why GCC does not >>generate efficient code for 64bit logicals on the rl78 target. I totally agree with you, this is why: 1. I have another patch: I define_expand movdi in which I instruct GCC to use

[patch AArch64] Do not perform a vector splat for vector initialisation if it is not useful

2017-12-11 Thread James Greenhalgh
Hi, In the testcase in this patch we create an SLP vector with only two elements. Our current vector initialisation code will first duplicate the first element to both lanes, then overwrite the top lane with a new value. This duplication can be clunky and wasteful. Better would be to simply use

[PATCH] ifcvt: Call fixup_partitions (PR83361)

2017-12-11 Thread Segher Boessenkool
After converting a conditional branch to an unconditional trap to a conditional trap, if the original trap is still reachable from another path, it may be that it is in a hot basic block and only reachable from cold blocks. Fix that up. This fixes PR83361. Bootstrapping on powerpc64-linux {-m32

[PATCH, rs6000] generate loop code for memcmp inline expansion

2017-12-11 Thread Aaron Sawdey
This patch builds on two previously posted patches: https://gcc.gnu.org/ml/gcc-patches/2017-11/msg01216.html https://gcc.gnu.org/ml/gcc-patches/2017-11/msg02599.html The previous patches allow the use of bdnzt. This patch allows the cmpstrsi pattern expansion to handle longer blocks without incr

[PING ^ 2] Re: [PATCH v2: 00/14] Preserving locations for variable-uses and constants (PR 43486)

2017-12-11 Thread David Malcolm
Ping for this patch kit: https://gcc.gnu.org/ml/gcc-patches/2017-11/msg00880.html (and thanks again for looking at patch 2 earlier) On Thu, 2017-11-30 at 14:17 -0500, David Malcolm wrote: > Ping for the rest of this kit: > https://gcc.gnu.org/ml/gcc-patches/2017-11/msg00880.html > > (thanks

PING: [PATCH] C++: avoid most reserved words as misspelling suggestions (PR c++/81610 and PR c++/80567)

2017-12-11 Thread David Malcolm
Ping: https://gcc.gnu.org/ml/gcc-patches/2017-11/msg02048.html On Wed, 2017-11-22 at 10:36 -0500, David Malcolm wrote: > lookup_name_fuzzy can offer some reserved words as suggestions for > misspelled words, helping with "singed"/"signed" typos. > > PR c++/81610 and PR c++/80567 report problems w

Re: [PATCH #2], PR target/81959, Fix ++int to _Float128 conversion on power9

2017-12-11 Thread Segher Boessenkool
On Mon, Dec 04, 2017 at 04:31:55PM -0500, Michael Meissner wrote: > On Fri, Dec 01, 2017 at 05:33:39PM -0600, Segher Boessenkool wrote: > > Okay for trunk. Further improvements welcome ;-) Thanks! > > Here is the patch for GCC 7 (the bug shows up in GCC 7). It is slightly > different due to the

PING: Re: [PATCH] Expensive selftests: torture testing for fix-it boundary conditions (PR c/82050)

2017-12-11 Thread David Malcolm
Ping: https://gcc.gnu.org/ml/gcc-patches/2017-11/msg02459.html On Tue, 2017-11-28 at 14:31 -0500, David Malcolm wrote: > This patch adds selftest coverage for the fix for PR c/82050 > (r255214). > > The selftest iterates over various "interesting" column and line- > width > values to try to shake

Re: [PATCH, rs6000] (v2) Gimple folding of splat_uX

2017-12-11 Thread Segher Boessenkool
Hi! On Fri, Dec 08, 2017 at 11:08:26AM -0600, Will Schmidt wrote: > Add support for gimple folding of splat_u{8,16,32}. > Testcase coverage is primarily handled by existing tests > testsuite/gcc.target/powerpc/fold-vec-splat_*.c > > One new test added to verify we continue to receive > an 'in

[PATCH] have -Wnonnull print inlining stack (PR 83369)

2017-12-11 Thread Martin Sebor
Bug 83369 - Missing diagnostics during inlining, notes that when -Wnonnull is issued for an inlined call to a built-in function, GCC doesn't print the inlining stack, making it hard to debug where the problem comes from. When the -Wnonnull warning was introduced into the middle-end the diagnostic

Re: [PATCH] Fix result for conditional reductions matching at index 0

2017-12-11 Thread Kilian Verhetsel
Jakub Jelinek writes: > Of course it can be done efficiently, what we care most is that the body of > the vectorized loop is efficient. That's fair, I was looking at the x86 assembly being generated when a single vectorized iteration was enough (because that is the context in which I first encou

Re: [PATCH] Fix result for conditional reductions matching at index 0

2017-12-11 Thread Jakub Jelinek
On Mon, Dec 11, 2017 at 06:00:11PM +0100, Kilian Verhetsel wrote: > Jakub Jelinek writes: > > Of course it can be done efficiently, what we care most is that the body of > > the vectorized loop is efficient. > > That's fair, I was looking at the x86 assembly being generated when a single > vector

Re: [PATCH][ARM][gcc-7] Fix wrong code by arm_final_prescan with fp16 move instructions

2017-12-11 Thread Sudakshina Das
On 30/11/17 16:01, Sudakshina Das wrote: Hi This patch is the fix for gcc-7 for the same issue as mentioned in: https://gcc.gnu.org/ml/gcc-patches/2017-11/msg02209.html For the following test case: __fp16 test_select (__fp16 a, __fp16 b, __fp16 c) {   return (a < b) ? b : c; } when compiled

[PATCH] RL78 movdi improvement

2017-12-11 Thread Sebastian Perta
Hello, The following patch improves 64 bit operations by instructing GCC to use 16 bit movw instead of 8 bit mov. On the following test case the patch reduces the code size from 323 bytes to 245 bytes. unsigned long long my_anddi3(unsigned long long x, unsigned long long y){ return x & y; } I did

[PATCH] Fix broken capitalization in aarch64 diagnostics

2017-12-11 Thread Jakub Jelinek
Hi! Diagnostics should not start with capital letters unless the first word is capitalized that way even in the middle of a sentence. Fixed thusly, ok for trunk? 2017-12-11 Jakub Jelinek * config/aarch64/aarch64.c (aarch64_print_operand): Don't start output_operand_lossage fi

[AArch64] Fix ICEs in aarch64_print_operand_internal (PR target/83335)

2017-12-11 Thread Jakub Jelinek
Hi! On Fri, Dec 08, 2017 at 08:10:08PM +0100, Christophe Lyon wrote: > >> Can you check? > > > > I think that's a separate preexisting problem. Could you file a PR? > > > > Sure, I filed: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83335 > > > Personally I'd just remove the assert, but I'm g

Re: [patch, fortran] Implement maxval for characters

2017-12-11 Thread Thomas Koenig
Christophe and James (and everybody else), I have created https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83379 and assigned it to myself. This should be easy to fix. Regards Thomas

Re: [PATCH] Fix broken capitalization in aarch64 diagnostics

2017-12-11 Thread Richard Biener
On December 11, 2017 6:29:07 PM GMT+01:00, Jakub Jelinek wrote: >Hi! > >Diagnostics should not start with capital letters unless the first word >is >capitalized that way even in the middle of a sentence. > >Fixed thusly, ok for trunk? OK. Richard. >2017-12-11 Jakub Jelinek > > * con

Re: [patch, fortran] Implement maxval for characters

2017-12-11 Thread Thomas Koenig
I have created https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83379 and assigned it to myself. This should be easy to fix. OK, I have updated the test cases in question. They pass for me at least. I'll keep the PR open for a couple of days to make sure this is really fixed. Regards T

Re: [PATCH 3/3] diagnose attribute aligned conflicts (PR 81566)

2017-12-11 Thread Martin Sebor
On 12/09/2017 04:40 AM, Andreas Schwab wrote: That requires updates to gcc.dg/pr53037-4.c and g++.dg/pr53037-4.C. I don't see these failures in my own test result or in those reported for common targets. Would you mind providing some details about where this output came from? Martin FAIL: g

Re: [PATCH 3/3] diagnose attribute aligned conflicts (PR 81566)

2017-12-11 Thread Andreas Schwab
http://gcc.gnu.org/ml/gcc-testresults/2017-12/msg00672.html Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."

Re: [PATCH][RFA][P1 PR tree-optimization/83298] Avoid over-optimistic result range for COND_EXPR

2017-12-11 Thread Jeff Law
On 12/08/2017 04:17 AM, Richard Biener wrote: > On Fri, Dec 8, 2017 at 1:18 AM, Jeff Law wrote: >> >> So the underlying issue here is quite simple. Given something like >> >> x = (cond) ? res1 : res2; >> >> EVRP analysis will compute the resultant range using vrp_meet of the >> ranges for res1 an

Re: [RFA][PATCH] 8/n Pull evrp range analyzer into its own file

2017-12-11 Thread Jeff Law
On 12/09/2017 02:19 PM, Gerald Pfeifer wrote: > On Wed, 22 Nov 2017, Jeff Law wrote: * gimple-ssa-evrp-analyze.c: New file pulled from gimple-ssa-evrp.c. >>> >>> With the move to C++, wasn't there a policy to name new files *.cc >>> instead of *.c? >> I'm happy to use .cc if that's where we wa

Re: [PATCH][RFA][P1 PR tree-optimization/83298] Avoid over-optimistic result range for COND_EXPR

2017-12-11 Thread Jeff Law
On 12/08/2017 04:17 AM, Richard Biener wrote: > > I'm not convinced that when you look forward past the dominance frontier > and do VRP analysis on stmts without analyzing all intermediate > stmts on the path (or at least push all defs on that path temporarily > to VR_VARYING) is fixed by this pat

Re: [PR81165] discount killed stmts when sizing blocks for threading

2017-12-11 Thread Jeff Law
On 12/07/2017 05:04 AM, Alexandre Oliva wrote: > We limit the amount of copying for jump threading based on counting > stmts. This counting is overly pessimistic, because we will very > often delete stmts as a consequence of jump threading: when the final > conditional jump of a block is removed,

[patch, fortran, doc, committed] Update description of MINLOC and MAXLOC

2017-12-11 Thread Thomas Koenig
Hi, I have just committed the attached doc patch as obvious after "make dvi" and "make pdf". 2017-12-11 Thomas Koenig * intrinsic.texi (MAXLOC): Update documentation for character arrays and KIND argument. (MINLOC): Likewise. Regards Thomas Index: intrinsic.

[PATCH] testsuite: add coverage for diagnostics relating to inlining (PR tree-optimization/83336)

2017-12-11 Thread David Malcolm
In theory, the diagnostics subsystem can print context information on code inlining when diagnostics are emitted by the middle-end, describing the chain of inlined callsites that led to a particular warning, but PR tree-optimization/83336 describes various issues with this. An underlying issue is

Re: [PATCH] PR libgcc/83112, Fix warnings on libgcc float128-ifunc.c

2017-12-11 Thread Michael Meissner
On Fri, Dec 01, 2017 at 05:53:55PM -0600, Segher Boessenkool wrote: > On Fri, Dec 01, 2017 at 12:40:22AM -0500, Michael Meissner wrote: > > After committing the previous patch, I noticed that it was now generating > > warnings for __{mul,div}kc3_{sw,hw} not having a prototype that I hadn't > > noti

Re: [PATCH] Fix Bug 83237 - Values returned by std::poisson_distribution are not distributed correctly

2017-12-11 Thread Michele Pezzutti
I apologize as I am unable to run the test suitein its full form. Nevertheless, I locally tested the following patch for the test suite: *26_numerics/random/poisson_distribution/operators/values.cc     Add additional test to cover bin 'floor(mu) + 1' by compiling locally values.cc and running i

Re: [PATCH] have -Wnonnull print inlining stack (PR 83369)

2017-12-11 Thread David Malcolm
On Mon, 2017-12-11 at 09:51 -0700, Martin Sebor wrote: > Bug 83369 - Missing diagnostics during inlining, notes that when > -Wnonnull is issued for an inlined call to a built-in function, > GCC doesn't print the inlining stack, making it hard to debug > where the problem comes from. > > When the -

[PATCH] Handle LOOP_DIST_ALIAS ifns in move_sese_region_to_fn (PR tree-optimization/83359)

2017-12-11 Thread Jakub Jelinek
Hi! Unlike LOOP_VECTORIZED ifns, LOOP_DIST_ALIAS is added by the ldist pass and needs to be maintained until the vectorizer, and parloops in between that. Earlier I've added code to update or drop orig_loop_num during move_sese_region_to_fn, but that is not sufficient. If we move the whole pair

Re: [PATCH] ifcvt: Call fixup_partitions (PR83361)

2017-12-11 Thread Jeff Law
On 12/11/2017 08:49 AM, Segher Boessenkool wrote: > After converting a conditional branch to an unconditional trap to a > conditional trap, if the original trap is still reachable from another > path, it may be that it is in a hot basic block and only reachable from > cold blocks. Fix that up. >

Re: Ping ^2 [PATCH], Add rounding built-ins to the _Float and _FloatX built-in functions

2017-12-11 Thread Michael Meissner
On Fri, Oct 27, 2017 at 06:39:21PM -0400, Michael Meissner wrote: > The power9 (running PowerPC ISA 3.0) has a round to integer instruction > (XSRQPI) that does various flavors of round an IEEE 128-bit floating point to > integeral values. This patch adds the support to the machine independent > p

Re: [PATCH] Allow USE in PARALLELs in store_data_bypass_p (take 2)

2017-12-11 Thread Eric Botcazou
> The old code was inconsistent, had return false; in one case and assert in > the remaining two spots. If you are not against it, I'd use return false; > in both cases if we want consistency. Sure, thanks. -- Eric Botcazou

[PATCH] Fix result for conditional reductions matching at index 0 (PR tree-optimization/80631)

2017-12-11 Thread Jakub Jelinek
On Mon, Dec 11, 2017 at 06:00:11PM +0100, Kilian Verhetsel wrote: > Jakub Jelinek writes: > > Of course it can be done efficiently, what we care most is that the body of > > the vectorized loop is efficient. > > That's fair, I was looking at the x86 assembly being generated when a single > vector

Re: [Patch combine] Don't create vector mode ZERO_EXTEND from subregs

2017-12-11 Thread Jeff Law
On 12/11/2017 07:18 AM, James Greenhalgh wrote: > > Hi, > > In simplify_set we try transforming the paradoxical subreg expression: > > (set FOO (subreg:M (mem:N BAR) 0)) > > in to: > > (set FOO (zero_extend:M (mem:N BAR))) > > However, this code does not consider the case where M is a vec

[PATCH, rs6000] Fix PR83332 (missing vcond patterns)

2017-12-11 Thread Bill Schmidt
Hi, A new test case introduced for PR81303 failed on powerpc64 (BE, LE). This turns out to be due to a missing standard pattern (vcondv2div2df). This and a couple of other patterns are easy to support with existing logic by just adding new patterns with appropriate modes. That's all this patch

Re: [PATCH] [GOLD] Add plugin API for processing plugin-added input files

2017-12-11 Thread Sriraman Tallam via gcc-patches
On Thu, Nov 9, 2017 at 9:04 PM, Cary Coutant wrote: >> include/ChangeLog: >> 2017-11-09 Stephen Crane >> >> * plugin-api.h: Add new plugin hook to allow processing of input >> files added by a plugin. >> (ld_plugin_new_input_handler): New funcion hook type. >> (l

Re: [PATCH] [GOLD] Add plugin API for processing plugin-added input files

2017-12-11 Thread Stephen Crane
Thanks for committing the GCC portion and following up on this. I had been meaning to write and ask. I don't have commit privs for binutils, so either you or Cary will have to commit the binutils patch as well, if it's not too much trouble. I think much has changed to need a rebase? Thanks, Stephe

Re: [PATCH] Fix Bug 83237 - Values returned by std::poisson_distribution are not distributed correctly

2017-12-11 Thread Michele Pezzutti
I lowered to N = 250 and still fails with a good margin. On 12/11/2017 09:58 PM, Michele Pezzutti wrote: I apologize as I am unable to run the test suite in its full form. Nevertheless, I locally tested the following patch for the test suite: *26_numerics/random/poisson_distribution/opera

Re: [PATCH] have -Wnonnull print inlining stack (PR 83369)

2017-12-11 Thread Martin Sebor
On 12/11/2017 02:08 PM, David Malcolm wrote: On Mon, 2017-12-11 at 09:51 -0700, Martin Sebor wrote: Bug 83369 - Missing diagnostics during inlining, notes that when -Wnonnull is issued for an inlined call to a built-in function, GCC doesn't print the inlining stack, making it hard to debug where

Re: [PATCH] C++: avoid most reserved words as misspelling suggestions (PR c++/81610 and PR c++/80567)

2017-12-11 Thread Jason Merrill
On Wed, Nov 22, 2017 at 10:36 AM, David Malcolm wrote: > PR c++/81610 and PR c++/80567 report problems where the C++ frontend > suggested "if", "for" and "else" as corrections for misspelled variable > names. Hmm, what about cases where people are actually misspelling keywords? Don't we want to h

Re: [PING 2][PATCH] enhance -Wrestrict to handle string built-ins (PR 78918)

2017-12-11 Thread Jeff Law
On 12/08/2017 12:19 PM, Martin Sebor wrote: > Attached is revision 8 of the patch with the changes suggested > and/or requested below. [ Big snip. ] > > > gcc-78918.diff > > > PR tree-optimization/78918 - missing -Wrestrict on memcpy copying over self > > gcc/c-family/ChangeLog: > > P

Re: [PATCH] [GOLD] Add plugin API for processing plugin-added input files

2017-12-11 Thread Sriraman Tallam via gcc-patches
On Mon, Dec 11, 2017 at 2:16 PM, Stephen Crane wrote: > Thanks for committing the GCC portion and following up on this. I had > been meaning to write and ask. I don't have commit privs for binutils, > so either you or Cary will have to commit the binutils patch as well, > if it's not too much trou

Re: C PATCH for c/82679 (rejects-valid with _Atomic and arrays)

2017-12-11 Thread Jeff Law
On 12/10/2017 10:48 AM, Marek Polacek wrote: > We were wrongly rejecting code in the attached test because the check > in grokdeclarator is wrong: we only want to check whether the user is > trying to apply _Atomic to an array type, i.e. this: > > typedef int T[10]; > _Atomic T a; > > Bootstrappe

[PATCH] avoid false negatives in attr-nonstring-3.c (PR 83131)

2017-12-11 Thread Martin Sebor
The attr-nonstring-3.c test fails on targets that expand the calls to some of the tested string functions in builtins.c, before they reach the checker in calls.c. The failures were reported on powrrpc64le but tests can be constructed that fail even on other targets (including x86_64). To fix the

Re: [PATCH] [GOLD] Add plugin API for processing plugin-added input files

2017-12-11 Thread Sriraman Tallam via gcc-patches
On Mon, Dec 11, 2017 at 2:16 PM, Stephen Crane wrote: > Thanks for committing the GCC portion and following up on this. I had > been meaning to write and ask. I don't have commit privs for binutils, > so either you or Cary will have to commit the binutils patch as well, > if it's not too much trou

Re: Handle more SLP constant and extern definitions for variable VF

2017-12-11 Thread Jeff Law
On 11/09/2017 07:20 AM, Richard Sandiford wrote: > This patch adds support for vectorising SLP definitions that are > constant or external (i.e. from outside the loop) when the vectorisation > factor isn't known at compile time. It can only handle cases where the > number of SLP statements is a po

Re: [SFN+LVU+IEPM v4 7/9] [LVU] Introduce location views

2017-12-11 Thread Jeff Law
On 11/09/2017 07:34 PM, Alexandre Oliva wrote: > This patch introduces an option to enable the generation of location > views along with location lists. The exact format depends on the > DWARF version: it can be a separate attribute (DW_AT_GNU_locviews) or > (DW_LLE_view_pair) entries in DWARF5+ l

Re: [PATCH] Expensive selftests: torture testing for fix-it boundary conditions (PR c/82050)

2017-12-11 Thread Jeff Law
On 11/28/2017 12:31 PM, David Malcolm wrote: > This patch adds selftest coverage for the fix for PR c/82050 (r255214). > > The selftest iterates over various "interesting" column and line-width > values to try to shake out bugs in the fix-it printing routines, a kind > of "torture" selftest. > >

Re: [PATCH 01/14] C++: preserve locations within build_address

2017-12-11 Thread Jason Merrill
On 11/10/2017 04:45 PM, David Malcolm wrote: This is needed for the locations of string literals to be usable, otherwise the ADDR_EXPR has UNKNOWN_LOCATION, despite wrapping a node with a correct location_t. gcc/cp/ChangeLog: * typeck.c (build_address): Use location of operand when build

[PATCH] Fix the new pr83361.c testcase

2017-12-11 Thread Segher Boessenkool
It needs the following. Sorry for that. Committing. Segher 2017-12-11 Segher Boessenkool gcc/testsuite/ * gcc.dg/pr83361.c: Add -Wno-div-by-zero to dg-options. --- gcc/testsuite/gcc.dg/pr83361.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/gc

Re: [PATCH 05/14] tree.c: strip location wrappers from integer_zerop etc

2017-12-11 Thread Jason Merrill
On 11/10/2017 04:45 PM, David Malcolm wrote: We need to strip away location wrappers in tree.c predicates like integer_zerop, otherwise they fail when they're called on wrapped INTEGER_CST; an example can be seen for c-c++-common/Wmemset-transposed-args1.c in g++.sum, where the warn_for_memset

Re: [PATCH 06/14] Fix Wsizeof-pointer-memaccess*.c

2017-12-11 Thread Jason Merrill
On 11/10/2017 04:45 PM, David Malcolm wrote: gcc/c-family/ChangeLog: * c-warn.c (sizeof_pointer_memaccess_warning): Strip any location wrappers from src and dest. Here the existing calls to tree_strip_nop_conversions ought to handle the wrappers. Jason

Re: [PATCH 07/14] reject_gcc_builtin: strip any location wrappers

2017-12-11 Thread Jason Merrill
On 11/10/2017 04:45 PM, David Malcolm wrote: Otherwise pr70144-1.c breaks. gcc/c-family/ChangeLog: * c-common.c (reject_gcc_builtin): Strip any location from EXPR. --- gcc/c-family/c-common.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcc/c-family/c-common.c b/gcc/c-family/

Re: [PATCH 09/14] Strip location wrappers in null_ptr_cst_p

2017-12-11 Thread Jason Merrill
On 11/10/2017 04:45 PM, David Malcolm wrote: Without this, "NULL" fails to be usable in C++11 onwards. gcc/cp/ChangeLog: * call.c (null_ptr_cst_p): Strip location wrappers when converting from '0' to a pointer type in C++11 onwards. OK. Jason

Re: [PATCH 08/14] cp/tree.c: strip location wrappers in lvalue_kind

2017-12-11 Thread Jason Merrill
On 11/10/2017 04:45 PM, David Malcolm wrote: Without this, then lvalue_p returns false for decls, and hence e.g. uses of them for references fail. Stripping location wrappers in lvalue_kind restores the correct behavior of lvalue_p etc. gcc/cp/ChangeLog: * tree.c (lvalue_kind): Strip an

Re: [PATCH 10/14] warn_for_memset: handle location wrappers

2017-12-11 Thread Jason Merrill
On 11/10/2017 04:45 PM, David Malcolm wrote: gcc/c-family/ChangeLog: * c-warn.c (warn_for_memset): Strip any location wrappers from arg0 and arg2. gcc/cp/ChangeLog: * parser.c (cp_parser_postfix_expression): Before warn_for_memset, strip any wrapper around "arg2"

Re: [PATCH 11/14] Handle location wrappers in string_conv_p

2017-12-11 Thread Jason Merrill
On 11/10/2017 04:45 PM, David Malcolm wrote: gcc/cp/ChangeLog: * typeck.c (string_conv_p): Strip any location wrapper from "exp". OK. Jason

Re: [PATCH 12/14] C++: introduce null_node_p

2017-12-11 Thread Jason Merrill
On 11/10/2017 04:45 PM, David Malcolm wrote: Eschew comparison with null_node in favor of a new null_node_p function, which strips any location wrappers. OK. Jason

Re: [PATCH 13/14] c-format.c: handle location wrappers

2017-12-11 Thread Jason Merrill
On 11/10/2017 04:45 PM, David Malcolm wrote: gcc/c-family/ChangeLog: * c-format.c (check_format_arg): Strip any location wrapper around format_tree. --- gcc/c-family/c-format.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/c-family/c-format.c b

Re: [PATCH 14/14] pp_c_cast_expression: don't print casts for location wrappers

2017-12-11 Thread Jason Merrill
On 11/10/2017 04:45 PM, David Malcolm wrote: This patch suppresses the user-visible printing of location wrappers for "%E" (and "%qE"), adding test coverage via selftests. OK. Jason

Re: [PATCH][Middle-end]79538 missing -Wformat-overflow with %s and non-member array arguments

2017-12-11 Thread Martin Sebor
On 12/04/2017 08:34 AM, Qing Zhao wrote: Hi, https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79538 missing -Wformat-overflow with %s and non-member array arguments -Wformat-overflow uses the routine "get_range_strlen" to decide the maximum stri

Re: [PATCH] Fix Bug 83237 - Values returned by std::poisson_distribution are not distributed correctly

2017-12-11 Thread Paolo Carlini
Hi, On 11/12/2017 23:16, Michele Pezzutti wrote: I lowered to N = 250 and still fails with a good margin. Good. At the moment however, I think we need a bit of rationale for the change that you are proposing, what would you put in a comment in the code? It's been a while since the last tim

[PATCH] avoid alignment error for attribute warn_if_not_aligned

2017-12-11 Thread Martin Sebor
My enhancement to improve the detection of attribute collisions introduced a regression of sorts in the g++.dg/pr53037-4.C test on ia64. https://gcc.gnu.org/ml/gcc-testresults/2017-12/msg00672.html The regression hasn't been noticed anywhere else only because all the other targets apparently hav

Re: Add support for masked load/store_lanes

2017-12-11 Thread Jeff Law
On 11/17/2017 02:36 AM, Richard Sandiford wrote: > Richard Sandiford writes: >> This patch adds support for vectorising groups of IFN_MASK_LOADs >> and IFN_MASK_STOREs using conditional load/store-lanes instructions. >> This requires new internal functions to represent the result >> (IFN_MASK_{LOA

Re: [PATCH] have -Wnonnull print inlining stack (PR 83369)

2017-12-11 Thread David Malcolm
On Mon, 2017-12-11 at 15:18 -0700, Martin Sebor wrote: > On 12/11/2017 02:08 PM, David Malcolm wrote: > > On Mon, 2017-12-11 at 09:51 -0700, Martin Sebor wrote: > > > Bug 83369 - Missing diagnostics during inlining, notes that when > > > -Wnonnull is issued for an inlined call to a built-in functio

Re: [PATCH 03/14] C++: add location_t wrapper nodes during parsing (minimal impl)

2017-12-11 Thread Jason Merrill
On 11/10/2017 04:45 PM, David Malcolm wrote: The initial version of the patch kit added location wrapper nodes around constants and uses-of-declarations, along with some other places in the parser (typeid, alignof, sizeof, offsetof). This version takes a much more minimal approach: it only adds

Re: [SFN+LVU+IEPM v4 3/9] [SFN] not-quite-boilerplate changes in preparation to introduce nonbind markers

2017-12-11 Thread Alexandre Oliva
On Dec 7, 2017, Jeff Law wrote: > On 11/09/2017 07:34 PM, Alexandre Oliva wrote: >> This patch adjusts numerous parts of the compiler that would > OK. > I'll note you may need minor tweaks due to the Cilk+ removal. THose > changes are pre-approved. Thanks, here's what I've just installed: >

Re: [SFN+LVU+IEPM v4 4/9] [SFN] stabilize find_bb_boundaries

2017-12-11 Thread Alexandre Oliva
On Dec 7, 2017, Jeff Law wrote: > On 11/09/2017 07:34 PM, Alexandre Oliva wrote: >> * cfgbuild.c (find_bb_boundaries): Don't purge dead edges if, >> without debug insns, we wouldn't, but clean up debug insns >> after a control flow insn nevertheless. > OK. Seems to me like it's independent of t

  1   2   >