Re: [PATCH] Fix a typo in range_entry_cmp (PR tree-optimization/61686)

2014-12-09 Thread Jakub Jelinek
On Wed, Dec 10, 2014 at 07:57:46AM +0100, Marek Polacek wrote: > I don't really know this code, but this typo looks obvious enough. > Using if (p->high != NULL_TREE) ... else if (p->high != NULL_TREE) > couldn't be possibly desired, so use Q in the else branch, as in > the code slightly above. > >

[PATCH] Fix a typo in range_entry_cmp (PR tree-optimization/61686)

2014-12-09 Thread Marek Polacek
I don't really know this code, but this typo looks obvious enough. Using if (p->high != NULL_TREE) ... else if (p->high != NULL_TREE) couldn't be possibly desired, so use Q in the else branch, as in the code slightly above. Bootstrapped/regtested on x86_64-linux and ppc64-linux, ok for trunk? 201

RE: [PATCH][MIPS] Fix P5600 memory cost

2014-12-09 Thread Prachi Godbole
Sorry for all the trouble. I messed up with the Changelog by mistake. I'll be careful now onwards. Prachi -Original Message- From: Jeff Law [mailto:l...@redhat.com] Sent: Wednesday, December 10, 2014 4:05 AM To: Matthew Fortune; Prachi Godbole Cc: gcc-patches@gcc.gnu.org Subject: Re: [P

Re: [PATCH PR62178]Improve candidate selecting in IVOPT, 2nd try.

2014-12-09 Thread Bin.Cheng
On Wed, Dec 10, 2014 at 6:58 AM, Jeff Law wrote: > On 12/05/14 05:15, Bin Cheng wrote: >> >> Hi, >> Though PR62178 is hidden by recent cost change in aarch64 backend, the >> ivopt >> issue still exists. >> >> Current candidate selecting algorithm tends to select fewer candidates >> given >> below

Re: [PATCH] Update libgcc.texi to match implementation in libgcc/libgcc2.c

2014-12-09 Thread Chung-Ju Wu
2014-12-09 23:08 GMT+08:00 Ian Lance Taylor : > On Mon, Oct 27, 2014 at 8:19 PM, Kito Cheng wrote: >> >> This patch update `Bit operations` section in libgcc.text, most bit >> operation function is take an unsigned integer instead of signed >> integer in libgcc/libgcc2.c [1], and it seem more make

Re: [PATCH/AARCH64] Disable load/store pair peephole for volatile mem

2014-12-09 Thread Bin.Cheng
On Wed, Dec 10, 2014 at 10:18 AM, Andrew Pinski wrote: > Hi, > As mentioned in > https://gcc.gnu.org/ml/gcc-patches/2014-12/msg00609.html, the > load/store pair peepholes currently accept volatile mem which can > cause wrong code as the architecture does not define which part of the > pair happe

Re: [PATCH] Do not download packages for graphite loop optimizations by default when using ./contrib/download_prerequisites

2014-12-09 Thread Chung-Ju Wu
2014-12-09 21:16 GMT+08:00 Richard Biener : > On Tue, Dec 9, 2014 at 6:36 AM, Chung-Ju Wu wrote: >> Hi, all, >> >> In the discussion thread last year: >> https://gcc.gnu.org/ml/gcc-patches/2013-05/msg01334.html >> >> I extended the script ./contrib/download_prerequisites so that it can >> downlo

C++ PATCH for c++/64222 (ICE with __FUNCTION__)

2014-12-09 Thread Jason Merrill
In this testcase, while we're tentatively parsing a function declarator we came across __FUNCTION__, tried to predeclare it, and failed because we were in function parameter scope; then when we try again later it fails again because we cached the error_mark_node. So don't try the first time.

C++ PATCH for c++/64129 (ICE on ill-formed template)

2014-12-09 Thread Jason Merrill
We should check whether the template we're trying to specialize is the right kind of template. Tested x86_64-pc-linux-gnu, applying to trunk. commit af5860b1a4bac653093a74d97a00b162c2b1add7 Author: Jason Merrill Date: Tue Dec 9 12:53:26 2014 -0500 PR c++/64129 * decl.c (grokdeclara

[PATCH/AARCH64] Disable load/store pair peephole for volatile mem

2014-12-09 Thread Andrew Pinski
Hi, As mentioned in https://gcc.gnu.org/ml/gcc-patches/2014-12/msg00609.html, the load/store pair peepholes currently accept volatile mem which can cause wrong code as the architecture does not define which part of the pair happens first. This patch disables the peephole for volatile mem and add

[patch] std::regex: Implement LWG DR 2329 and DR 2332

2014-12-09 Thread Jonathan Wakely
Two defect reports that protect against dangerous uses of std::regex involving dangling references to temporaries: http://cplusplus.github.io/LWG/lwg-defects.html#2329 http://cplusplus.github.io/LWG/lwg-defects.html#2332 Tested x86_64-linux & powerpc64-linux, committed to trunk. commit 616ac2600b

Go patch committed: Don't crash when using field tracking

2014-12-09 Thread Ian Lance Taylor
This patch to the Go compiler fixes a crash when using field tracking. The code was failing to lower a function call added by the field tracking code. When called in a type equality function for a type that was not otherwise used, this could cause a crash as the type was never lowered. This patch

Re: [Ping] [PATCH, ifcvt] Fix PR63917

2014-12-09 Thread Richard Henderson
On 12/04/2014 05:16 PM, Zhenqiang Chen wrote: > +static rtx > +cc_in_cond (rtx cond) > +{ > + if ((HAVE_cbranchcc4) && cond Silly parens around the HAVE_cbranchcc4. > + && (GET_MODE_CLASS (GET_MODE (XEXP (cond, 0))) == MODE_CC)) More silly parens around the ==. > + /* Skip it if the inst

[patch] Add 'const' to helper functors for std::promise etc.

2014-12-09 Thread Jonathan Wakely
Thanks to Geoff Romer for suggesting this change, which might be needed if we change std::function to only be able to call const operator() overloads for C++17. Tested x86_64-linux and powerpc64-linux, committed to trunk. commit d4eb711ad60cf2925d8f8f6c622918c648a51e13 Author: Jonathan Wakely D

[wwwdocs][committed] SH changes update

2014-12-09 Thread Oleg Endo
Hi, This mentions the SH changes for GCC 5 that have happened so far. Committed. Cheers, Oleg Index: htdocs/gcc-5/changes.html === RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-5/changes.html,v retrieving revision 1.49 diff -u -r1.49 changes

[SH][committed] Document FPSCR built-in functions

2014-12-09 Thread Oleg Endo
Hi, This documents the new SH FPSCR built-in functions. Tested with 'make info dvi pdf', committed as r218551. Cheers, Oleg gcc/ChangeLog: PR target/53513 * doc/extend.texi (__builtin_sh_get_fpscr, __builtin_sh_get_fpscr): Document it. Index: gcc/doc/extend.texi =

Re: [patch] Some std::locale improvements

2014-12-09 Thread Jonathan Wakely
On 30/11/14 20:48 +, Jonathan Wakely wrote: I think we also need this to make __numpunct_cache and __moneypunct_cache exception-safe. If we set _M_allocated=true at the start of the _M_cache functions and then an allocation throws we will delete[] the memory allocated in _M_cache, but then th

Re: [PATCH, x86] Fix pblendv expand.

2014-12-09 Thread Evgeny Stupachenko
On Wed, Dec 10, 2014 at 12:54 AM, Jakub Jelinek wrote: > On Wed, Dec 10, 2014 at 12:33:52AM +0300, Evgeny Stupachenko wrote: >> --- /dev/null >> +++ b/gcc/testsuite/gcc.target/i386/blend.c >> @@ -0,0 +1,61 @@ >> +/* Test correctness of size 3 store groups permutation. */ >> +/* { dg-do run } */ >

Re: locales fixes

2014-12-09 Thread Jonathan Wakely
On 09/12/14 20:34 +0100, Marc Glisse wrote: On Tue, 9 Dec 2014, Jonathan Wakely wrote: On 08/12/14 23:53 +0100, François Dumont wrote: After having installed all necessary locales on my system I end up with 4 failures. Here is a patch to fix them all. Did you discover why only you are seei

Re: [PATCH] Fix IRA register preferencing

2014-12-09 Thread Jeff Law
On 12/09/14 12:21, Wilco Dijkstra wrote: This fixes a bug in register preferencing. When live range splitting creates a new register from another, it copies most fields except for the register preferences. The preference GENERAL_REGS is used as reg_pref[i].prefclass is initialized with GENERAL_

Re: RFC: PATCH to genericize C++ loops to LOOP_EXPR instead of gotos

2014-12-09 Thread Bernd Edlinger
Hi Jason, > I ran the tramp3d benchmark over 500 iterations before and after the change and couldn't see any measurable difference in runtime. The binary with my > change was 0.4% smaller. I'm going to go ahead and check it in; if a performance hit shows up on the automated testing we can revi

Re: [patch] gdb python pretty printer for DIEs

2014-12-09 Thread Jeff Law
On 12/09/14 14:10, Aldy Hernandez wrote: I am tired of dumping entire DIEs just to see what type they are. With this patch, we get: (gdb) print context_die $5 = > I know it's past the end of stage1, but this debugging aid can help in fixing bugs in stage >= 3. I am committing this to the [deb

Re: [PATCH PR62178]Improve candidate selecting in IVOPT, 2nd try.

2014-12-09 Thread Jeff Law
On 12/05/14 05:15, Bin Cheng wrote: Hi, Though PR62178 is hidden by recent cost change in aarch64 backend, the ivopt issue still exists. Current candidate selecting algorithm tends to select fewer candidates given below reasons: 1) to better handle loops with many induction uses but the best

Re: [SH][committed] Fix usage of __SHMEDIA__ in libgcc

2014-12-09 Thread Oleg Endo
On Sun, 2014-11-30 at 20:08 +0100, Oleg Endo wrote: > Hi, > > In libgcc/lib1funcs.S the usage of the __SHMEDIA__ macro seems to > mismatch the setup in sh/sh-c.c (sh_cpu_cpp_builtins). __SHMEDIA__ is > always defined when building for SH5 / SH64, even when the subtarget is > SHcompact. Thus, whe

Re: [PATCH 6/n] OpenMP 4.0 offloading infrastructure: option handling

2014-12-09 Thread Ilya Verbin
On 09 Dec 14:59, Richard Biener wrote: > On Mon, 8 Dec 2014, Ilya Verbin wrote: > > Unfortunately, this fix was not general enough. > > There might be cases when mixed object files get into lto-wrapper, ie some > > of > > them contain only LTO sections, some contain only offload sections, and some

Re: [PATCH][MIPS] Fix P5600 memory cost

2014-12-09 Thread Jeff Law
On 12/09/14 15:33, Matthew Fortune wrote: Hi Prachi, I'm afraid you updated the wrong Changelog with this commit. GCC changes are recorded in gcc/ChangeLog. I'm not sure what the correct procedure is for fixing this. Jeff: Should a mistake like this be fixed by removing the entry from the top

RE: [PATCH][MIPS] Fix P5600 memory cost

2014-12-09 Thread Matthew Fortune
Hi Prachi, I'm afraid you updated the wrong Changelog with this commit. GCC changes are recorded in gcc/ChangeLog. I'm not sure what the correct procedure is for fixing this. Jeff: Should a mistake like this be fixed by removing the entry from the top level and adding one at the appropriate loca

Re: [PATCH, libcpp]: Check the result of vasprintf

2014-12-09 Thread Joseph Myers
On Tue, 9 Dec 2014, Uros Bizjak wrote: > Attached patch checks the return value and sets ptr to NULL in this case. > > 2014-12-09 Uros Bizjak > > * directives.c (cpp_define_formatted): Check return value of > vasprintf and in case of error set ptr to NULL. > > Bootstrapped on x86_64-

Re: [PATCH, x86] Fix pblendv expand.

2014-12-09 Thread Jakub Jelinek
On Wed, Dec 10, 2014 at 12:33:52AM +0300, Evgeny Stupachenko wrote: > --- /dev/null > +++ b/gcc/testsuite/gcc.target/i386/blend.c > @@ -0,0 +1,61 @@ > +/* Test correctness of size 3 store groups permutation. */ > +/* { dg-do run } */ > +/* { dg-options "-O3" } */ > + > +#define N 50 > + > +enum nu

Re: [PATCH 01/10] rs6000: Clobber XER[CA] in all user asm statements

2014-12-09 Thread Richard Henderson
On 12/08/2014 06:25 AM, David Edelsohn wrote: > Okay. I don't know of another option that preserves backward > compatibility. If RTH looks at this series of patches, he may have a > better suggestion. No, this looks like what I'd do. Indeed, I added this hook back when the i386 port gained dire

[PATCH, committed] jit: toyvm.c: use correct path in debuginfo

2014-12-09 Thread David Malcolm
I noticed while debugging another issue that at some point I'd broken the source locations that toyvm.c sets up into the .toy source files, by using the filename, rather than the filesystem path. Also fix a segfault due to fclose (NULL) when the .toy file is not found. Committed to trunk as r2185

Re: [PATCH, x86] Fix pblendv expand.

2014-12-09 Thread Evgeny Stupachenko
I've added the reproducer to the patch. is it ok? ChangeLog: 2014-12-10 Evgeny Stupachenko gcc/testsuite * gcc.target/i386/blend.c: New. gcc/ * config/i386/i386.c (expand_vec_perm_pblendv): Gen new rtx for expand_vec_perm_1 target. diff --git a/gcc/config/i386/i386.

[patch] gdb python pretty printer for DIEs

2014-12-09 Thread Aldy Hernandez
I am tired of dumping entire DIEs just to see what type they are. With this patch, we get: (gdb) print context_die $5 = DW_TAG_compile_unit>> I know it's past the end of stage1, but this debugging aid can help in fixing bugs in stage >= 3. I am committing this to the [debug-early] branch,

Re: [PATCH] Set stores_off_frame_dead_at_return to false if sibling call

2014-12-09 Thread John David Anglin
On 12/9/2014 3:00 PM, Jeff Law wrote: Thoughts on using both patches to ensure the we don't have extraneous entries in the GEN set and that we're adding more stuff to the KILL set for sibcalls? Maybe we should add all stores to the KILL set for a sibling call and not worry about whether they ar

Re: [PATCH, MPX runtime 1/2] Integrate MPX runtime library

2014-12-09 Thread Ilya Enkovich
2014-12-09 22:57 GMT+03:00 Jeff Law : > On 12/09/14 01:24, Ilya Enkovich wrote: >> >> On 24 Nov 17:02, Ilya Enkovich wrote: >>> >>> >>> Right. This works for both top level and multilib checks because failing >>> test is used and CC is usually not set when it's called by the top level >>> configur

[PATCH, commmited] PR jit/63854: Document how to run the jit testsuite under valgrind

2014-12-09 Thread David Malcolm
Committed to trunk as r218538. Index: gcc/jit/ChangeLog === --- gcc/jit/ChangeLog (revision 218537) +++ gcc/jit/ChangeLog (revision 218538) @@ -1,5 +1,12 @@ 2014-12-09 David Malcolm + PR jit/63854 + * docs/internals/index.rst (Ru

Re: [PATCH, MPX runtime 1/2] Integrate MPX runtime library

2014-12-09 Thread Jeff Law
On 12/09/14 01:24, Ilya Enkovich wrote: On 24 Nov 17:02, Ilya Enkovich wrote: Right. This works for both top level and multilib checks because failing test is used and CC is usually not set when it's called by the top level configure. If we configure with CC=... then it may go wrong. I lef

Re: [Patch] Improving jump-thread pass for PR 54742

2014-12-09 Thread Mike Stump
On Dec 9, 2014, at 10:39 AM, Jeff Law wrote: > Also, a test for the GCC testsuite would be good. I have no idea what > license covers the LLVM testsuite. But given a good analysis of the problem > we may be able to write a suitable test independent of the LLVM test. So, the usual engineerings

Re: [PATCH][libstdc++][testsuite] Mark as UNSUPPORTED tests that don't fit into tiny memory model

2014-12-09 Thread Mike Stump
On Dec 9, 2014, at 3:17 AM, Kyrill Tkachov wrote: > In the gcc and g++ testsuite we already catch such cases and mark them as > UNSUPPORTED. In libstdc++.exp there is no such functionality. > I'm not very happy that it had to be copied, but I couldn't find a way to > include the gcc definition

[PATCH, committed] Add jit-tempdir.{c|h}

2014-12-09 Thread David Malcolm
Move tempdir handling out from jit-playback.c into new jit-tempdir.{c|h} files. This simplifies jit-playback.c, and may help fix PR jit/64206. Committed to trunk as r218533. gcc/jit/ChangeLog: PR jit/64206 * Make-lang.in (jit_OBJS): Add jit/jit-tempdir.o. * jit-common.h (

Re: [PATCH] Set stores_off_frame_dead_at_return to false if sibling call

2014-12-09 Thread Jeff Law
On 12/08/14 14:50, John David Anglin wrote: On 12/8/2014 3:49 PM, Jeff Law wrote: I think the terminology and variable names certainly makes this tougher to follow than it should. I certainly agree. When I first looked at the code, I thought it was completely backwards. Me too. Thoughts on us

Re: [Patch] Improving jump-thread pass for PR 54742

2014-12-09 Thread Jeff Law
On 12/09/14 12:43, Richard Biener wrote: This seems to be indicating that we have with no edge from the latch block to the header block. I'd like to know better how we got into that state. It Also returns null for loops with multiple latches. So the patch looks OK for me. Ah, OK. Jeff

Re: [PATCH, MPX wrappers 1/3] Add MPX wrappers library

2014-12-09 Thread Jeff Law
On 12/09/14 01:27, Ilya Enkovich wrote: 2014-12-09 Ilya Enkovich * config/i386/linux-common.h (LIBMPX_WRAPPERSSPEC): New. (CHKP_SPEC): Add wrappers library. * c-family/c.opt (static-libmpxwrappers): New. libmpx/ 2014-12-09 Ilya Enkovich * Makefile.am (SU

Re: [Patch] Improving jump-thread pass for PR 54742

2014-12-09 Thread Richard Biener
On December 9, 2014 7:39:48 PM CET, Jeff Law wrote: >On 12/09/14 10:38, Sebastian Pop wrote: >> Richard Biener wrote: >>> On Mon, Dec 8, 2014 at 10:49 PM, Steve Ellcey >wrote: expected? Should this test also check flag_thread_jumps? Or >should that be getting checked somewhere else? >

Re: locales fixes

2014-12-09 Thread Marc Glisse
On Tue, 9 Dec 2014, Jonathan Wakely wrote: On 08/12/14 23:53 +0100, François Dumont wrote: After having installed all necessary locales on my system I end up with 4 failures. Here is a patch to fix them all. Did you discover why only you are seeing failures? Not just him, anyone with a d

Re: [PATCH] TYPE_OVERFLOW_* cleanup

2014-12-09 Thread Marc Glisse
On Tue, 9 Dec 2014, Marek Polacek wrote: The issue here is that TYPE_OVERFLOW_TRAPS, TYPE_OVERFLOW_UNDEFINED, and TYPE_OVERFLOW_WRAPS macros work on integral types only, yet we pass e.g. pointer_type/real_type to them. This patch adds proper checking for these macros and adds missing guards to

[PATCH] Fix IRA register preferencing

2014-12-09 Thread Wilco Dijkstra
This fixes a bug in register preferencing. When live range splitting creates a new register from another, it copies most fields except for the register preferences. The preference GENERAL_REGS is used as reg_pref[i].prefclass is initialized with GENERAL_REGS in allocate_reg_info () and resize_re

Re: Running cc1 etc under valgrind (was Re: [PATCH 13/21] PR jit/63854: Add support for running "make check-jit" under valgrind)

2014-12-09 Thread David Malcolm
On Wed, 2014-11-19 at 13:38 -0500, David Malcolm wrote: > On Wed, 2014-11-19 at 09:57 -0700, Jeff Law wrote: > > On 11/19/14 03:46, David Malcolm wrote: > > > This commit updates jit.exp so that if RUN_UNDER_VALGRIND is present > > > in the environment, all of the built client code using libgccjit.

Re: [PATCH] Fix PR 61225

2014-12-09 Thread Jeff Law
On 12/09/14 12:07, Segher Boessenkool wrote: On Tue, Dec 09, 2014 at 05:49:18PM +0800, Zhenqiang Chen wrote: Do you need to verify SETA and SETB satisfy single_set? Or has that already been done elsewhere? A is NEXT_INSN (insn) B is prev_nonnote_nondebug_insn (insn), For I1 -> I2 -> B; I2 ->

Re: [PATCH] Fix PR 61225

2014-12-09 Thread Segher Boessenkool
On Tue, Dec 09, 2014 at 05:49:18PM +0800, Zhenqiang Chen wrote: > > Do you need to verify SETA and SETB satisfy single_set? Or has that > > already been done elsewhere? > > A is NEXT_INSN (insn) > B is prev_nonnote_nondebug_insn (insn), > > For I1 -> I2 -> B; I2 -> A; > LOG_LINK can make sure I1

Re: [PATCH 10/10] rs6000: Get rid of the weird decimal thing in add

2014-12-09 Thread David Edelsohn
On Mon, Dec 8, 2014 at 9:18 AM, Segher Boessenkool wrote: > Peter tells me it was an artifact of old versions of the DFP code. The > condition can never be false; delete it. > > > 2014-12-08 Segher Boessenkool > > gcc/ > * config/rs6000/rs6000.md (*add3): Remove condition. Okay. Than

Re: [PATCH 09/10] rs6000: Remove the (now unused) insn type "compare"

2014-12-09 Thread David Edelsohn
On Mon, Dec 8, 2014 at 9:18 AM, Segher Boessenkool wrote: > > 2014-12-08 Segher Boessenkool > > gcc/ > * config/rs6000/40x.md (ppc403-compare): Remove "compare". > config/rs6000/440.md (ppc440-compare): Remove "compare". > config/rs6000/476.md (ppc476-compare): Remove "c

Re: [PATCH 08/10] rs6000: compare->two for rld*;rld*.

2014-12-09 Thread David Edelsohn
On Mon, Dec 8, 2014 at 9:18 AM, Segher Boessenkool wrote: > These now are the only remaining patterns that have type "compare". > And they shouldn't: "two" is a better type for them. > > > 2014-12-08 Segher Boessenkool > > gcc/ > * config/rs6000/rs6000.md (*anddi3_2rld_dot, *anddi3_rld_

Re: [PATCH 07/10] rs6000: The big carry insns addition

2014-12-09 Thread David Edelsohn
On Mon, Dec 8, 2014 at 9:18 AM, Segher Boessenkool wrote: > Now that everything is in place for letting GCC use the carry-using and > carry-producing machine insns as separate RTL insns, switch over all > remaining patterns that clobber CA without telling the compiler. This > are the multiple-pre

[PATCH, committed] Guard less code with the JIT mutex

2014-12-09 Thread David Malcolm
Move acquisition/release of the JIT mutex from jit-recording.c:gcc::jit::recording::context::compile into jit-playback.c: gcc::jit::playback::context::compile and reduce the amount of code guarded by the mutex somewhat. For acquisition, we didn't need the mutex when building the tempdir and bu

[PATCH, fixincludes]: Check return value of getcwd

2014-12-09 Thread Uros Bizjak
Hello! The compilation with gentoo glibc 2.20 emits following warning: ../../../gcc-svn/trunk/fixincludes/server.c:195:10: warning: ignoring return value of ‘getcwd’, declared with attribute warn_unused_result [-Wunused-result] The manpage says: On failure, these functions return NULL, and errn

Re: [PATCH] Fix PR 61225

2014-12-09 Thread Jeff Law
On 12/09/14 02:49, Zhenqiang Chen wrote: Do you need to verify SETA and SETB satisfy single_set? Or has that already been done elsewhere? A is NEXT_INSN (insn) B is prev_nonnote_nondebug_insn (insn), For I1 -> I2 -> B; I2 -> A; LOG_LINK can make sure I1 and I2 are single_set, but not A and B.

[PATCH, committed] jit-playback.c: Move dlopen code into a new function

2014-12-09 Thread David Malcolm
Another simplification of playback::context::compile. Committed to trunk as r218527. Index: gcc/jit/ChangeLog === --- gcc/jit/ChangeLog (revision 218526) +++ gcc/jit/ChangeLog (revision 218527) @@ -1,3 +1,12 @@ +2014-12-09 David Mal

Re: [Android] Stop unconditional disabling of ifuncs for Bionic #2

2014-12-09 Thread Jeff Law
On 12/09/14 05:39, Alexander Ivchenko wrote: Hi, Whether the *linux* target supports ifuncs or not is defined here: linux_has_ifunc_p (void) { return OPTION_BIONIC ? false : HAVE_GNU_INDIRECT_FUNCTION; } Bionic right now supports indirect functions, but there is no way to notify the compile

Re: [Patch] Improving jump-thread pass for PR 54742

2014-12-09 Thread Jeff Law
On 12/09/14 10:38, Sebastian Pop wrote: Richard Biener wrote: On Mon, Dec 8, 2014 at 10:49 PM, Steve Ellcey wrote: expected? Should this test also check flag_thread_jumps? Or should that be getting checked somewhere else? -fthread-jumps is an RTL optimization flag and ignored on GIMPLE.

[PATCH] TYPE_OVERFLOW_* cleanup

2014-12-09 Thread Marek Polacek
The issue here is that TYPE_OVERFLOW_TRAPS, TYPE_OVERFLOW_UNDEFINED, and TYPE_OVERFLOW_WRAPS macros work on integral types only, yet we pass e.g. pointer_type/real_type to them. This patch adds proper checking for these macros and adds missing guards to various places. This looks pretty straightfo

[PATCH, libcpp]: Check the result of vasprintf

2014-12-09 Thread Uros Bizjak
Hello! The compilation with gentoo glibc 2.20 emits following warning: ../../../gcc-svn/trunk/libcpp/directives.c:2411:28: warning: ignoring return value of ‘int vasprintf(char**, const char*, __gnuc_va_list)’, declared with attribute warn_unused_result [-Wunused-result] The manpage says: If me

Re: [Patch] Improving jump-thread pass for PR 54742

2014-12-09 Thread Sebastian Pop
Richard Biener wrote: > On Mon, Dec 8, 2014 at 10:49 PM, Steve Ellcey wrote: > > expected? Should this test also check flag_thread_jumps? Or should > > that be getting checked somewhere else? > > -fthread-jumps is an RTL optimization flag and ignored on GIMPLE. Does it make sense to add a -f[n

Re: [PATCH 04/10] rs6000: Remove addic from the normal add pattern

2014-12-09 Thread Segher Boessenkool
On Mon, Dec 08, 2014 at 09:01:39AM -0600, Segher Boessenkool wrote: > > Why are you removing the alternative instead of clobbering XER[CA]? > > I should have mentioned, sorry. > > We don't want to clobber CA on *every* add, and reload can generate more > adds out of thin air. And CA is a fixed r

RE: [PATCH] AArch64: Add TARGET_SCHED_REASSOCIATION_WIDTH

2014-12-09 Thread Wilco Dijkstra
> Marcus Shawcroft wrote: > > OK for commit? > > > > ChangeLog: > > 2014-11-24 Wilco Dijkstra > > > > * gcc/config/aarch64/aarch64-protos.h (tune-params): > > Add reasociation tuning parameters. > > * gcc/config/aarch64/aarch64.c (TARGET_SCHED_REASSOCIATION_WIDTH): > >

Re: [patch, build] Restore bootstrap in building libcc1 on darwin

2014-12-09 Thread Dominique d'Humières
This was for x86_64-apple-darwin14. The patch also works for x86_64-apple-darwin10. Dominique > Le 6 déc. 2014 à 01:49, Dominique d'Humières a écrit : > > Bootstrap just finished with the patch. > > Thanks, > > Dominique

Re: [PATCH 04/10] rs6000: Remove addic from the normal add pattern

2014-12-09 Thread Segher Boessenkool
On Tue, Dec 09, 2014 at 11:48:44AM -0500, David Edelsohn wrote: > We definitely will have to define addptrM3 and restore addM3 when > rs6000 switches to LRA. Can LRA deal with adding a clobber of a hard register? How would you express that in the patterns, anyway? Segher

Re: [PATCH 04/10] rs6000: Remove addic from the normal add pattern

2014-12-09 Thread David Edelsohn
On Tue, Dec 9, 2014 at 11:24 AM, Eric Botcazou wrote: >> It's unfortunate that GCC does not have separate patterns for a safe >> ADD used by reload. > > It does, the addptrM3 pattern, but it works only with LRA at the moment. Hi, Eric Segher and I previously discussed addptrM3, but I thought tha

Re: [PATCH, x86] Fix pblendv expand.

2014-12-09 Thread Evgeny Stupachenko
I mean that there are a lot of people tracking spec2006 stability and therefore the issue should be on track in future. And that I can create the test case, but it would be as big as several GCC functions. Will work on reducing the test case. On Tue, Dec 9, 2014 at 7:20 PM, Richard Henderson wro

Re: Fix libgomp crash without TLS (PR42616)

2014-12-09 Thread Richard Henderson
On 12/09/2014 06:53 AM, Varvara Rainchik wrote: > 2014-12-09 Varvara Rainchik > > * config.h.in: Regenerate. > * configure: Regenerate. > * configure.ac: Add GCC_CHECK_EMUTLS. > * libgomp.h: Add check for USE_EMUTLS: this case > is equal to HAVE_TLS. >

Re: [PATCH 04/10] rs6000: Remove addic from the normal add pattern

2014-12-09 Thread Eric Botcazou
> It's unfortunate that GCC does not have separate patterns for a safe > ADD used by reload. It does, the addptrM3 pattern, but it works only with LRA at the moment. -- Eric Botcazou

Re: [PATCH, x86] Fix pblendv expand.

2014-12-09 Thread Jakub Jelinek
On Tue, Dec 09, 2014 at 06:59:27PM +0300, Evgeny Stupachenko wrote: > I've tried to get smaller reproducer, however currently it is > complicated as several functions in GCC. Just add a gcc_assert where you are changing the code, testing for what you want to avoid. Then just delta reduce it or cre

Re: [PATCH][AARCH64][5/5] Add macro fusion support for cmp/b.X for ThunderX

2014-12-09 Thread Marcus Shawcroft
On 5 December 2014 at 14:36, Kyrill Tkachov wrote: > Hi all, > > Andrew posted this patch sometime ago (before stage1 closed) and I had > rebased it on top of the > other macro fusion patches in that series. > This is a respin of that patch with the comment about not calling > get_attr_type > repe

Re: [PATCH, x86] Fix pblendv expand.

2014-12-09 Thread Richard Henderson
On 12/09/2014 07:59 AM, Evgeny Stupachenko wrote: > However patch is fixing spec2006 benchmark. Shouldn't that be enough > for regression testing? > No. Spec is not free. r~

Re: [PATCH] PR other/63613: Add fixincludes for dejagnu.h

2014-12-09 Thread David Malcolm
On Mon, 2014-12-08 at 14:13 +0100, Rainer Orth wrote: > Jeff Law writes: > > > On 12/04/14 15:42, Rainer Orth wrote: > >> David Malcolm writes: > >> > >>> assumed -fgnu89-inline until a recent upstream fix; > >>> see http://lists.gnu.org/archive/html/dejagnu/2014-10/msg00011.html > >>> > >>> Re

Re: [PATCH] AArch64: Add TARGET_SCHED_REASSOCIATION_WIDTH

2014-12-09 Thread Marcus Shawcroft
On 24 November 2014 at 13:46, Wilco Dijkstra wrote: >> Richard Earnshaw wrote: >> If all cores seem to benefit from FP reassociation set to 4, then it >> seems odd that 4 is not also the default for generic. >> >> Andrew, you may need to pick a target-specific value for ThunderX; I >> think Wilco

Re: [PATCH, x86] Fix pblendv expand.

2014-12-09 Thread Evgeny Stupachenko
I've tried to get smaller reproducer, however currently it is complicated as several functions in GCC. However patch is fixing spec2006 benchmark. Shouldn't that be enough for regression testing? Thanks, Evgeny On Tue, Dec 9, 2014 at 4:29 PM, Evgeny Stupachenko wrote: > The case comes from spec2

Re: [PATCH] PR ipa/63909 ICE: SIGSEGV in ipa_icf_gimple::func_checker::compare_bb()

2014-12-09 Thread Martin Liška
On 11/21/2014 01:23 PM, Richard Biener wrote: On Fri, Nov 21, 2014 at 12:52 PM, Martin Liška wrote: On 11/20/2014 05:41 PM, Richard Biener wrote: On Thu, Nov 20, 2014 at 5:30 PM, Martin Liška wrote: Hello. Following patch fixes ICE in IPA ICF. Problem was that number of non-debug statemen

[PATCH 3/4] vstN_lane error message enhancements (Q register)

2014-12-09 Thread charles . baylis
From: Charles Baylis gcc/ChangeLog: Charles Baylis * config/aarch64/aarch64-builtins.c (aarch64_types_storestruct_lane_qualifiers): Mark last argument with qualifier_struct_load_store_lane_index. gcc/testsuite/ChangeLog: Charles Baylis * gcc.target/aar

[PATCH 4/4] vstN_lane error message enhancements (D registers)

2014-12-09 Thread charles . baylis
From: Charles Baylis gcc/ChangeLog: Charles Baylis * config/aarch64/arm_neon.h (__ST2_LANE_FUNC): Add explicit lane bounds check. (__ST3_LANE_FUNC): Likewise. (__ST4_LANE_FUNC): Likewise. gcc/testsuite/ChangeLog: Charles Baylis * gcc.target/aar

[PATCH 2/4] vldN_lane error message enhancements (D registers)

2014-12-09 Thread charles . baylis
From: Charles Baylis gcc/ChangeLog Charles Baylis * config/aarch64/arm_neon.h (__LD2_LANE_FUNC): Add explicit lane bounds check. (__LD3_LANE_FUNC): Likewise. (__LD4_LANE_FUNC): Likewise gcc/testsuite/ChangeLog: Charles Baylis * gcc.target/aarch

[PATCH 1/4] vldN_lane error message enhancements (Q registers)

2014-12-09 Thread charles . baylis
From: Charles Baylis gcc/ChangeLog: Charles Baylis PR target/63870 * config/aarch64/aarch64-builtins.c (enum aarch64_type_qualifiers): Add qualifier_struct_load_store_lane_index. (aarch64_types_loadstruct_lane_qualifiers): Use qualifier_struct_load_st

[PATCH 0/4] [AARCH64,SIMD] PR63870 Improve error messages for single lane load/store

2014-12-09 Thread charles . baylis
From: Charles Baylis This patch series moves the checking of lane indices for vld[234](q?)_lane and vst[234](q?)_lane intrinsics so that it occurs during builtin expansion. The q register variants are checked directly, but since the d register variants use the same intrinsics, these are checked

Re: [PATCH 2/3] Extended if-conversion

2014-12-09 Thread Richard Biener
On Tue, Dec 9, 2014 at 2:11 PM, Yuri Rumyantsev wrote: > Richard, > > Here is updated patch2 with the following changes: > 1. Delete functions phi_has_two_different_args and find_insertion_point. > 2. Use only one function for extended predication - > predicate_extended_scalar_phi. > 3. Save gsi

Re: [PATCH] Update libgcc.texi to match implementation in libgcc/libgcc2.c

2014-12-09 Thread Ian Lance Taylor
On Mon, Oct 27, 2014 at 8:19 PM, Kito Cheng wrote: > > This patch update `Bit operations` section in libgcc.text, most bit > operation function is take an unsigned integer instead of signed > integer in libgcc/libgcc2.c [1], and it seem more make sense :) > > ChangeLog > 2014-10-28 Kito Cheng >

Re: Fix libgomp crash without TLS (PR42616)

2014-12-09 Thread Varvara Rainchik
Ok, the following patch works for Android: 2014-12-09 Varvara Rainchik * config.h.in: Regenerate. * configure: Regenerate. * configure.ac: Add GCC_CHECK_EMUTLS. * libgomp.h: Add check for USE_EMUTLS: this case is equal to HAVE_TLS. * team.c: Like

Re: [PING ^ 3][PATCH, AArch64] Add doloop_end pattern for -fmodulo-sched

2014-12-09 Thread Tejas Belagod
On 18/11/14 11:28, Yangfei (Felix) wrote: On 11/18/2014 11:48 AM, Yangfei (Felix) wrote: +(define_expand "doloop_end" + [(use (match_operand 0 "" "")) ; loop pseudo + (use (match_operand 1 "" ""))] ; label + "" +{ + /* Currently SMS relies on the do-loop pattern to recognize loops

[PATCH, rtl-optimization]: Fix PR64213 by reverting fix for PR64037

2014-12-09 Thread Uros Bizjak
Hello! The fix for PR64037 [1] introduced severe problems, including bootstrap failure on alphaev6-linux-gnu. Non-bootstrapped testsuite results [2] can be compared with bootstrapped gcc with a revert [3]. As discussed in the PR, the problem was in a missed SI-DI zero_extend. [1] https://gcc.gnu.

Re: [PATCH 8/9] Negative numbers added for sreal class.

2014-12-09 Thread Richard Biener
On Mon, Dec 8, 2014 at 5:52 PM, Martin Liška wrote: > On 11/28/2014 10:32 AM, Richard Biener wrote: >> >> On Thu, Nov 27, 2014 at 6:08 PM, Martin Liška wrote: >>> >>> On 11/21/2014 04:21 PM, Martin Liška wrote: On 11/21/2014 04:02 PM, Richard Biener wrote: > > > On Fri,

Re: [PATCH 6/n] OpenMP 4.0 offloading infrastructure: option handling

2014-12-09 Thread Richard Biener
On Mon, 8 Dec 2014, Ilya Verbin wrote: > Hi, > > On 28 Nov 09:36, Richard Biener wrote: > > On Fri, 28 Nov 2014, Ilya Verbin wrote: > > > I found a bug here, have_{lto,offload} must be set if at least one file > > > contains > > > lto/offload sections, but currently they are overwritten by the l

[PATCH] Fix PR42108

2014-12-09 Thread Richard Biener
The following finally fixes PR42108 (well, hopefully...) by using range-information on SSA names to allow the integer divisions introduced by Fortran array lowering being hoisted out of loops, thus detecting them as not trapping. I chose to enhance tree_single_nonzero_warnv_p for this and adjuste

[PATCH] Fix PR64193

2014-12-09 Thread Richard Biener
The following patch restores proper CSE by FRE/PRE when doing optimistic value-numbering of stores/loads. In that case we may end up value-numbering a virtual operand to the only executable edge value of a PHI - but as the alias walker doesn't know this it fails to handle the PHI which results in

Re: [AArch64, NEON] Improve vmulX intrinsics

2014-12-09 Thread Christophe Lyon
On 9 December 2014 at 13:52, Jiangjiji wrote: > Hi, > This patch converts more intrinsics to use builtin functions instead of > the > previous inline assembly syntax. > Passed the glorious testsuite of Christophe Lyon. > > Three testcases are added for the testing of intriniscs whic

Re: [PATCH, x86] Fix pblendv expand.

2014-12-09 Thread Evgeny Stupachenko
The case comes from spec2006 403.gcc (or old GCC itself). for (i = 0; i < FIRST_PSEUDO_REGISTER; ++i) { vd->e[i].mode = VOIDmode; vd->e[i].oldest_regno = i; vd->e[i].next_regno = INVALID_REGNUM; } It is vectorized and only then completely peeled. Only after peeling all

Re: [PATCH] Do not download packages for graphite loop optimizations by default when using ./contrib/download_prerequisites

2014-12-09 Thread Richard Biener
On Tue, Dec 9, 2014 at 6:36 AM, Chung-Ju Wu wrote: > Hi, all, > > In the discussion thread last year: > https://gcc.gnu.org/ml/gcc-patches/2013-05/msg01334.html > > I extended the script ./contrib/download_prerequisites so that it can > download isl and cloog packages for graphite loop optimizat

Re: [RFC, PATCH, fortran] PR fortran/60255 Deferred character length

2014-12-09 Thread Dominique d'Humières
Dear Andre, The patch causes an ICE for the test gfortran.dg/unlimited_polymorphic_1.f03: f951: internal compiler error: in gfc_add_component_ref, at fortran/class.c:236 f951: internal compiler error: Abort trap: 6 gfc: internal compiler error: Abort trap: 6 (program f951) Abort Reduced test fo

Re: [Patch] Improving jump-thread pass for PR 54742

2014-12-09 Thread Richard Biener
On Mon, Dec 8, 2014 at 10:49 PM, Steve Ellcey wrote: > On Sat, 2014-12-06 at 19:21 +, Sebastian Pop wrote: > >> > I think it does not make sense to duplicate paths at -Os: I disabled the >> > FSM >> > jump-threading when optimizing for size like this. >> > >> > diff --git a/gcc/tree-ssa-threa

Re: [COMMITTED] [PING] [PATCH] [AArch64, NEON] More NEON intrinsics improvement

2014-12-09 Thread Christophe Lyon
On 9 December 2014 at 03:26, Yangfei (Felix) wrote: >> On 5 December 2014 at 18:44, Tejas Belagod wrote: >> > >> >>> >> >>> +__extension__ static __inline float32x2_t __attribute__ >> >>> +((__always_inline__)) >> >>> +vfms_f32 (float32x2_t __a, float32x2_t __b, float32x2_t __c) { >> >>> + retur

Re: [PATCH 2/3] Extended if-conversion

2014-12-09 Thread Yuri Rumyantsev
Richard, Here is updated patch2 with the following changes: 1. Delete functions phi_has_two_different_args and find_insertion_point. 2. Use only one function for extended predication - predicate_extended_scalar_phi. 3. Save gsi before insertion of predicate computations for basic blocks if it has

Re: match.pd tweaks for vectors and issues with HONOR_NANS

2014-12-09 Thread Richard Biener
On Mon, Dec 8, 2014 at 3:45 PM, Marc Glisse wrote: > On Tue, 18 Nov 2014, Richard Biener wrote: > >>> I'll try to replace some more TYPE_MODE during stage3... >> >> >> Btw, a convenience would be to be able to write >> >> HONOR_NANS (type) >> >> thus effectively make HONOR_* inline functions with

  1   2   >