Re: [PING] C/C++ OpenACC routine directive, undeclared name error: try to help the user, once

2016-06-07 Thread Jakub Jelinek
On Tue, Jun 07, 2016 at 08:44:16AM +0200, Thomas Schwinge wrote: > On Tue, 31 May 2016 17:49:49 +0200, I wrote: > > OK for trunk, as follows? > > > > commit 3289032bf7fd7e4a0cce37e7acd71e3330729d83 > > Author: Thomas Schwinge > > Date: Tue May 31 17:46:26 2016 +0200 > > > > C/C++ OpenACC r

Re: loop-ch tweek

2016-06-07 Thread Richard Biener
On Mon, 6 Jun 2016, Jan Hubicka wrote: > Hi, > does this look better? Can you make the argument of gimple_inexpensive_call_p a gcall * please? Ok with that change. Thanks, Richard. > Honza > > * gimple.c: Include builtins.h > (gimple_inexpensive_call_p): New function. > * gi

Re: [PATCH] Fix SLP wrong-code with VECTOR_BOOLEAN_TYPE_P (PR tree-optimization/71259)

2016-06-07 Thread Richard Biener
On Mon, 6 Jun 2016, Jakub Jelinek wrote: > On Mon, Jun 06, 2016 at 10:05:57AM +0200, Richard Biener wrote: > > So this ends up generating { a ? -1 : 0, b ? -1 : 0, ... }. That > > Yes, that is already what we do now for loop vectorization. > > > might be less optimal than doing { a, b, ... } ?

[PATCH] Fix PR71423

2016-06-07 Thread Richard Biener
This fixes an omission when moving tree-ssa-forwprop.c code to match.pd in GCC 5 times. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk. Richard. 2016-06-07 Richard Biener PR middle-end/71423 * match.pd ((X | ~Y) -> Y <= X): Properly invert the comparis

[PATCH] Fix PR71428

2016-06-07 Thread Richard Biener
This fixes BIT_FIELD_REF handling in bswap pass where we need to distinguish an "operation" vs. a load properly. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk. Richard. 2016-06-07 Richard Biener PR tree-optimization/71428 * tree-ssa-math-opts.c (perf

Re: [PATCH,rs6000] Add built-in function support for new Power9 vector absolute difference unsigned instructions

2016-06-07 Thread Richard Biener
On Tue, Jun 7, 2016 at 1:58 AM, Kelvin Nilsen wrote: > > This patch adds built-in function support for the ISA 3.0 vabsub, > vabsduh, and vabsduw instructions. > > I have bootstrapped and tested on powerpc64le-unkonwn-linux-gnu with no > regressions. Is this ok for the trunk? > > I have also test

Re: [PATCH][3/3][RTL ifcvt] PR middle-end/37780: Conditional expression with __builtin_clz() should be optimized out

2016-06-07 Thread Andreas Schwab
Kyrill Tkachov writes: > +static rtx > +simplify_cond_clz_ctz (rtx x, rtx_code cmp_code, rtx true_val, rtx false_val) > +{ > + if (cmp_code != EQ && cmp_code != NE) > +return NULL_RTX; > + > + /* Result on X == 0 and X !=0 respectively. */ > + rtx on_zero, on_nonzero; > + if (cmp_code ==

PING: [PATCH] PR33661 Fix problem with register asm in templates

2016-06-07 Thread Andreas Krebbel
Hi Jason, could you please have a look? https://gcc.gnu.org/ml/gcc-patches/2015-06/msg00904.html Thanks! -Andreas-

[PATCH] Fix PR61564 - optimize attribute/pragma accepting any option

2016-06-07 Thread Richard Biener
This fixes PR61564 by diagnosing (and ignoring) options not marked with 'Optimization' being applied to #pragma GCC optimize or via the optimize attribute. The reason is that while we save/restore option state for 'Optimize' marked options we don't do that for other options. Thus while such opti

Re: [PATCH][ARM] Add initial support for Cortex-A73

2016-06-07 Thread Ramana Radhakrishnan
On 06/06/16 17:18, Kyrill Tkachov wrote: > Hi all, > > This patch adds initial support for the Cortex-A73 processor through the > cortex-a73, cortex-a73.cortex-a35 and cortex-a73.cortex-a53 arguments to > -mcpu and -mtune. > > The Cortex-A73 is an ARMv8-A processor. > > Bootstrapped and teste

Re: [PATCH][AArch64] Model CSEL instruction in Cortex-A57 scheduling model

2016-06-07 Thread Ramana Radhakrishnan
On 06/06/16 17:10, Kyrill Tkachov wrote: > Hi all, > > This small patch adds handling of the CSEL-type instructions to the > Cortex-A57 scheduling model. > It is treated the same as simple ALU instructions. > > With this patch I didn't see any overall differences in SPEC2006. > > Bootstrapped

Re: [PATCH] Fix PR61564 - optimize attribute/pragma accepting any option

2016-06-07 Thread Jakub Jelinek
On Tue, Jun 07, 2016 at 10:15:39AM +0200, Richard Biener wrote: > > This fixes PR61564 by diagnosing (and ignoring) options not marked with > 'Optimization' being applied to #pragma GCC optimize or via the > optimize attribute. > > The reason is that while we save/restore option state for 'Optimi

Re: [PATCH] Fix PR61564 - optimize attribute/pragma accepting any option

2016-06-07 Thread Richard Biener
On Tue, 7 Jun 2016, Jakub Jelinek wrote: > On Tue, Jun 07, 2016 at 10:15:39AM +0200, Richard Biener wrote: > > > > This fixes PR61564 by diagnosing (and ignoring) options not marked with > > 'Optimization' being applied to #pragma GCC optimize or via the > > optimize attribute. > > > > The reaso

Re: [ARM] implement division using vrecpe/vrecps with -funsafe-math-optimizations

2016-06-07 Thread Prathamesh Kulkarni
On 30 May 2016 at 13:52, Prathamesh Kulkarni wrote: > On 23 May 2016 at 14:59, Prathamesh Kulkarni > wrote: >> On 5 February 2016 at 18:40, Prathamesh Kulkarni >> wrote: >>> On 4 February 2016 at 16:31, Ramana Radhakrishnan >>> wrote: On Sun, Jan 17, 2016 at 9:06 AM, Prathamesh Kulkarni >>

Re: [RFC] [2/2] divmod transform: override expand_divmod_libfunc for ARM and add test-cases

2016-06-07 Thread Prathamesh Kulkarni
ping https://gcc.gnu.org/ml/gcc-patches/2016-05/msg02008.html Thanks, Prathamesh On 25 May 2016 at 18:19, Prathamesh Kulkarni wrote: > On 23 May 2016 at 14:28, Prathamesh Kulkarni > wrote: >> Hi, >> This patch overrides expand_divmod_libfunc for ARM port and adds test-cases. >> I separated the

Re: [PATCH][AArch64] Model CSEL instruction in Cortex-A57 scheduling model

2016-06-07 Thread James Greenhalgh
On Tue, Jun 07, 2016 at 09:22:05AM +0100, Ramana Radhakrishnan wrote: > > > On 06/06/16 17:10, Kyrill Tkachov wrote: > > Hi all, > > > > This small patch adds handling of the CSEL-type instructions to the > > Cortex-A57 scheduling model. > > It is treated the same as simple ALU instructions. >

Re: move increase_alignment from simple to regular ipa pass

2016-06-07 Thread Prathamesh Kulkarni
On 3 June 2016 at 13:35, Jan Hubicka wrote: >> > fsection-anchors >> > Common Report Var(flag_section_anchors) >> > Access data in the same section from shared anchor points. >> >> Funny. I see the following on trunk: >> >> fsection-anchors >> Common Report Var(flag_section_anchors) Optimization

Re: [ARM] implement division using vrecpe/vrecps with -funsafe-math-optimizations

2016-06-07 Thread Ramana Radhakrishnan
>> Please find the updated patch attached. >> It passes testsuite for arm-none-linux-gnueabi, arm-none-linux-gnueabihf and >> arm-none-eabi. >> However the test-case added in the patch (neon-vect-div-1.c) fails to >> get vectorized at -O2 >> for armeb-none-linux-gnueabihf. >> Charles suggested me t

[AArch64] ARMv8.2 command line and feature macros support

2016-06-07 Thread Jiong Wang
ARMv8.2-A extends the ARMv8.1-A architecture, adding features that include an optional extension to support FP16 in floating-point and Adv.SIMD instructions. This patch adds the command line and feature flags for ARMv8.2-A and the FP16 support. The new command option -march=armv8.2-a will enable

Re: [PATCH][2/3] Vectorize inductions that are live after the loop

2016-06-07 Thread Alan Hayward
On 05/06/2016 12:00, "Andreas Schwab" wrote: >Alan Hayward writes: > >> * gcc.dg/vect/vect-live-2.c: New test. > >This test fails on powerpc64 (with -m64, but not with -m32): > >$ grep 'vectorized.*loops' ./vect-live-2.c.149t.vect >../gcc/testsuite/gcc.dg/vect/vect-live-2.c:10:1: note: ve

Re: Unreviewed patches

2016-06-07 Thread Rainer Orth
Hi Gerald, > On Mon, 6 Jun 2016, Rainer Orth wrote: >> The following patches have remained unreviewed for a week: >> >> [gotools, libcc1] Update copyright dates >> https://gcc.gnu.org/ml/gcc-patches/2016-05/msg02307.html >> >> Richard already approved the update-copyright.py changes

Re: [PATCH] integer overflow checking builtins in constant expressions

2016-06-07 Thread Marek Polacek
On Mon, Jun 06, 2016 at 09:44:08PM +0200, Jakub Jelinek wrote: > Hi! > > On Mon, Jun 06, 2016 at 02:36:17PM +0200, Jakub Jelinek wrote: > > 2016-06-06 Martin Sebor > > Jakub Jelinek > > > > PR c++/70507 > > PR c/68120 > > * builtins.def (BUILT_IN_ADD_OVERFLOW_P, BUILT_IN_

Re: [PATCH] Fix SLP wrong-code with VECTOR_BOOLEAN_TYPE_P (PR tree-optimization/71259)

2016-06-07 Thread Christophe Lyon
Hi Jakub, On 3 June 2016 at 19:33, Jakub Jelinek wrote: > On Tue, Jan 12, 2016 at 05:21:37PM +0300, Ilya Enkovich wrote: >> > --- gcc/tree-vect-slp.c.jj 2016-01-08 21:45:57.0 +0100 >> > +++ gcc/tree-vect-slp.c 2016-01-11 12:07:19.633366712 +0100 >> > @@ -2999,12 +2999,9 @@ vect_get_

Re: [PATCH] Fix SLP wrong-code with VECTOR_BOOLEAN_TYPE_P (PR tree-optimization/71259)

2016-06-07 Thread Jakub Jelinek
On Tue, Jun 07, 2016 at 11:23:01AM +0200, Christophe Lyon wrote: > > --- gcc/testsuite/gcc.dg/vect/pr71259.c.jj 2016-06-03 > > 17:05:37.693475438 +0200 > > +++ gcc/testsuite/gcc.dg/vect/pr71259.c 2016-06-03 17:05:32.418544731 +0200 > > @@ -0,0 +1,28 @@ > > +/* PR tree-optimization/71259 */ >

Re: [PATCH][2/3] Vectorize inductions that are live after the loop

2016-06-07 Thread Rainer Orth
Alan Hayward writes: > On 05/06/2016 12:00, "Andreas Schwab" wrote: > >>Alan Hayward writes: >> >>> * gcc.dg/vect/vect-live-2.c: New test. >> >>This test fails on powerpc64 (with -m64, but not with -m32): >> >>$ grep 'vectorized.*loops' ./vect-live-2.c.149t.vect >>../gcc/testsuite/gcc.dg/ve

Re: [PATCH] Fix SLP wrong-code with VECTOR_BOOLEAN_TYPE_P (PR tree-optimization/71259)

2016-06-07 Thread Ramana Radhakrishnan
On Tue, Jun 7, 2016 at 10:28 AM, Jakub Jelinek wrote: > On Tue, Jun 07, 2016 at 11:23:01AM +0200, Christophe Lyon wrote: >> > --- gcc/testsuite/gcc.dg/vect/pr71259.c.jj 2016-06-03 >> > 17:05:37.693475438 +0200 >> > +++ gcc/testsuite/gcc.dg/vect/pr71259.c 2016-06-03 17:05:32.418544731 +0200 >

Re: [PATCH] Fix SLP wrong-code with VECTOR_BOOLEAN_TYPE_P (PR tree-optimization/71259)

2016-06-07 Thread Jakub Jelinek
On Tue, Jun 07, 2016 at 10:36:25AM +0100, Ramana Radhakrishnan wrote: > On Tue, Jun 7, 2016 at 10:28 AM, Jakub Jelinek wrote: > > On Tue, Jun 07, 2016 at 11:23:01AM +0200, Christophe Lyon wrote: > >> > --- gcc/testsuite/gcc.dg/vect/pr71259.c.jj 2016-06-03 > >> > 17:05:37.693475438 +0200 > >>

Re: [PATCH] Add selftest for pretty-print.c

2016-06-07 Thread Bernd Schmidt
On 06/06/2016 11:28 PM, David Malcolm wrote: + assert_pp_format ("0xcafebabe", "%wx", (HOST_WIDE_INT)0xcafebabe); More interesting tests would be to have multiple arguments to test that we really used the right size for the varargs. Maybe append a single %d arg with a unique bit pattern to a

Re: [PATCH] spellcheck.c: add test_find_closest_string

2016-06-07 Thread Bernd Schmidt
On 06/06/2016 11:03 PM, David Malcolm wrote: This adds another test case to -fself-test. Ok. Bernd

Re: [PATCH, aarch64] Fix 70048

2016-06-07 Thread Renlin Li
Hi Richard, On 16/03/16 21:25, Richard Henderson wrote: This fixes only the regression described in the PR. There was quite a bit of follow-up that points to new work that ought to be done during the gcc7 cycle, but isn't really appropriate now. Tested on aarch64-linux; committed as reviewed i

Re: [PATCH 1/2][AArch64] Implement AAPCS64 updates for alignment attribute

2016-06-07 Thread James Greenhalgh
On Fri, Jan 22, 2016 at 05:16:00PM +, Alan Lawrence wrote: > > On 21/01/16 17:23, Alan Lawrence wrote: > > On 18/01/16 17:10, Eric Botcazou wrote: > >> > >> Could you post the list of files that differ? How do they differ exactly? > > > > Hmmm. Well, I definitely had this failing to bootstrap

Re: [PATCH 2/2][AArch64] Tests of AAPCS64 updates for alignment attribute

2016-06-07 Thread James Greenhalgh
On Fri, Jan 15, 2016 at 02:17:43PM +, Alan Lawrence wrote: > Here I've added both tests using the abitest.h framework(which verifies values > are passed in the correct registers as specified by the AAPCS64), and separate > tests which verify that called functions read arguments from the same >

OpenACC wait clause

2016-06-07 Thread Jakub Jelinek
Hi! I've noticed if ((mask & OMP_CLAUSE_WAIT) && !c->wait && gfc_match ("wait") == MATCH_YES) { c->wait = true; match_oacc_expr_list (" (", &c->wait_list, false); continue; } which looks just w

Re: [PATCH, i386, AVX-512] Add vectorizer support builtins

2016-06-07 Thread Kirill Yukhin
On 02 Jun 17:17, Ilya Verbin wrote: > On Mon, May 23, 2016 at 19:11:53 +0300, Ilya Verbin wrote: > > This patch adds missed 512-bit rounding builtins for vectorization. > > Regtested on x86_64-linux and i686-linux. OK for trunk? > > > > gcc/ > > * config/i386/i386-builtin-types.def: Add V16SI

Re: [Patch, avr] Fix PR 71151

2016-06-07 Thread Senthil Kumar Selvaraj
Georg-Johann Lay writes: > Senthil Kumar Selvaraj schrieb: >> Hi, >> >> This patch fixes PR 71151 by eliminating the >> TARGET_ASM_FUNCTION_RODATA_SECTION hook and setting >> JUMP_TABLES_IN_TEXT_SECTION to 1. >> >> As described in the bugzilla entry, this hook assumed it will get >> c

RE: [PATCH][MIPS] P5600 scheduler fix

2016-06-07 Thread Robert Suchanek
Hi, > > gcc/ > > * config/mips/p5600.md (p5600_fpu_fadd): Remove checking for > > `fabs' and `fneg' type attributes. > > (p5600_fpu_fabs): Add `fmove' to the comment. > > OK. > > Thanks, > Matthew Committed as r237173. Regards, Robert

Re: [PATCH] Improve avx_vec_concat

2016-06-07 Thread Kirill Yukhin
Hi Jakub, On 23 May 19:26, Jakub Jelinek wrote: > Hi! > > Not sure how to easily test these. > In any case, for the vinsert* case, we don't have vinserti128 nor > vinsertf128 in evex, so need to use vinsert[if]{64x4,32x4} or > for DQ {64x2,32x8}. For the case with zero in the other half, > we nee

Re: [PATCH, Fortran, OpenACC] Fix PR70598, Fortran host_data ICE

2016-06-07 Thread Chung-Lin Tang
Ping. On 2016/5/11 02:57 AM, Bernhard Reutner-Fischer wrote: > On May 9, 2016 4:26:50 PM GMT+02:00, Chung-Lin Tang > wrote: >> Hi, this patch resolves an ICE for Fortran when using the OpenACC >> host_data directive. Actually, rather than say resolve, it's more like >> adjusting the front-end t

Re: [PATCH] Fix PR61564 - optimize attribute/pragma accepting any option

2016-06-07 Thread Richard Biener
On Tue, 7 Jun 2016, Jakub Jelinek wrote: > On Tue, Jun 07, 2016 at 10:15:39AM +0200, Richard Biener wrote: > > > > This fixes PR61564 by diagnosing (and ignoring) options not marked with > > 'Optimization' being applied to #pragma GCC optimize or via the > > optimize attribute. > > > > The reaso

Re: [PATCH][vectorizer] Remove blank debug lines after dump_gimple_stmt

2016-06-07 Thread Alan Hayward
On 06/06/2016 18:56, "Jeff Law" wrote: >On 06/06/2016 06:46 AM, Alan Hayward wrote: >> Lots of code calls dump_gimple_stmt then print a newline, however >> dump_gimple_stmt will print a newline itself. This makes the vectorizer >> debug >> file messy. I think the confusion is because dump_generi

Re: [PATCH] Fix SLP wrong-code with VECTOR_BOOLEAN_TYPE_P (PR tree-optimization/71259)

2016-06-07 Thread Christophe Lyon
On 7 June 2016 at 11:42, Jakub Jelinek wrote: > On Tue, Jun 07, 2016 at 10:36:25AM +0100, Ramana Radhakrishnan wrote: >> On Tue, Jun 7, 2016 at 10:28 AM, Jakub Jelinek wrote: >> > On Tue, Jun 07, 2016 at 11:23:01AM +0200, Christophe Lyon wrote: >> >> > --- gcc/testsuite/gcc.dg/vect/pr71259.c.jj

C PATCH for c/71426 (ICE with bogus parameter)

2016-06-07 Thread Marek Polacek
cc1 crashed on the following invalid code, because it tripped this assert. The reason why b->nested was false for the FUNCTION_DECL 'x' was that when doing pushdecl, we found an incompatible duplicate, so pushdecl just bound 'x' to FUNCTION_DECL 'x', replacing the old binding, without the TREE_PUBL

Re: [PATCH] Fix SLP wrong-code with VECTOR_BOOLEAN_TYPE_P (PR tree-optimization/71259)

2016-06-07 Thread Jakub Jelinek
On Tue, Jun 07, 2016 at 02:43:37PM +0200, Christophe Lyon wrote: > > No, why? This test doesn't test whether the function has been vectorized. > > It only tests whether it works. > > And the check_vect () is supposed to exit early if some extra flags were > > passed by vect.exp (like e.g. on i?86-

[PATCH] Use __USER_LABEL_PREFIX__ in asm statement

2016-06-07 Thread H.J. Lu
A target may have a prefix in function symbol. Update interrrupt tests to use __USER_LABEL_PREFIX__ for function symbol in asm statement. Tested on Linux and Darwin. OK for trunk? Thanks. H.J. * gcc.dg/guality/pr68037-1.c (ASMNAME): New. (ASMNAME2): Likewise. (main

Re: [PATCH] Selftest framework (v7)

2016-06-07 Thread David Malcolm
On Mon, 2016-06-06 at 22:14 -0400, Trevor Saunders wrote: > On Mon, Jun 06, 2016 at 11:57:49PM +0200, Jakub Jelinek wrote: > > On Mon, Jun 06, 2016 at 05:53:50PM -0400, Trevor Saunders wrote: > > > > > As far as I can > > > > > tell this just involves moving the start of namespace > > > > > selfte

Re: [PATCH,rs6000] Add built-in function support for new Power9 vector absolute difference unsigned instructions

2016-06-07 Thread Segher Boessenkool
Hi Kelvin, On Mon, Jun 06, 2016 at 05:58:00PM -0600, Kelvin Nilsen wrote: > Index: gcc/config/rs6000/altivec.h > === > --- gcc/config/rs6000/altivec.h (revision 237045) > +++ gcc/config/rs6000/altivec.h (working copy) > @@

Re: [PATCH] integer overflow checking builtins in constant expressions

2016-06-07 Thread Jason Merrill
On 06/06/2016 08:36 AM, Jakub Jelinek wrote: @@ -352,6 +352,35 @@ builtin_valid_in_constant_expr_p (const_ case BUILT_IN_FUNCTION: case BUILT_IN_LINE: + /* The following built-ins are valid in constant expressions +when their arguments are. */ +case BUILT_IN_ADD_OVERF

Re: [PATCH][2/3] Vectorize inductions that are live after the loop

2016-06-07 Thread Alan Hayward
On 07/06/2016 10:28, "Rainer Orth" wrote: >Alan Hayward writes: > >> On 05/06/2016 12:00, "Andreas Schwab" wrote: >> >>>Alan Hayward writes: >>> * gcc.dg/vect/vect-live-2.c: New test. >>> >>>This test fails on powerpc64 (with -m64, but not with -m32): >>> >>>$ grep 'vectorized.*loops

Re: OpenACC wait clause

2016-06-07 Thread Cesar Philippidis
On 06/07/2016 04:13 AM, Jakub Jelinek wrote: > I've noticed > if ((mask & OMP_CLAUSE_WAIT) > && !c->wait > && gfc_match ("wait") == MATCH_YES) > { > c->wait = true; > match_oacc_expr_list (" (", &c->wait_list, false); >

Re: OpenACC wait clause

2016-06-07 Thread Jakub Jelinek
On Tue, Jun 07, 2016 at 08:01:10AM -0700, Cesar Philippidis wrote: > On 06/07/2016 04:13 AM, Jakub Jelinek wrote: > > > I've noticed > > if ((mask & OMP_CLAUSE_WAIT) > > && !c->wait > > && gfc_match ("wait") == MATCH_YES) > > { > > c-

C PATCH for c/71418 (ICE with bogus array dimension and _Alignas)

2016-06-07 Thread Marek Polacek
Another error-recovery bug. This time TYPE was error_mark_node but min_align_of_type accessed it via TYPE_ALIGN. So we better check that we're operating on a type. Bootstrapped/regtested on x86_64-linux, ok for trunk? 2016-06-07 Marek Polacek PR c/71418 * c-decl.c (grokdecla

Ignore debug insns in memcmp optimization

2016-06-07 Thread Bernd Schmidt
This fixes a few PRs from the last few days. Fully tested on x86_64-linux. Ok? Bernd PR debug/71432 PR ada/71413 * tree-ssa-strlen.c (handle_builtin_memcmp): Ignore debug insns. PR debug/71432 PR ada/71413 * g++.dg/debug/pr71432.C: New test. Index: gcc/testsuite/g++.dg/debug/pr71432.C =

[C++ PATCH] Fix -Wunused-* regression (PR c++/71442)

2016-06-07 Thread Jakub Jelinek
Hi! Marek has recently added code to set TREE_USED bits on the elements of TREE_VEC referenced in SIZEOF_EXPR. But, as the testcase shows, it can be used on various parameter/argument packs, some of them have types as elements, others decls. And IMHO we want to set TREE_USED only on the decls list

Re: [PATCH] integer overflow checking builtins in constant expressions

2016-06-07 Thread Martin Sebor
On 06/07/2016 08:32 AM, Jason Merrill wrote: On 06/06/2016 08:36 AM, Jakub Jelinek wrote: @@ -352,6 +352,35 @@ builtin_valid_in_constant_expr_p (const_ case BUILT_IN_FUNCTION: case BUILT_IN_LINE: + /* The following built-ins are valid in constant expressions + when their argu

PING^5: [PATCH] PR target/70454: Build x86 libgomp with -march=i486 or better

2016-06-07 Thread H.J. Lu
On Sun, May 29, 2016 at 3:14 PM, H.J. Lu wrote: > On Fri, May 20, 2016 at 8:04 AM, H.J. Lu wrote: >> On Mon, May 9, 2016 at 5:52 AM, H.J. Lu wrote: >>> On Mon, May 2, 2016 at 6:46 AM, H.J. Lu wrote: On Mon, Apr 25, 2016 at 1:36 PM, H.J. Lu wrote: > If x86 libgomp isn't compiled with -

[C++ Patch] Fix some simple location issues

2016-06-07 Thread Paolo Carlini
Hi, in parallel with other work, I'm auditing the front-end for simple location issues which can be fixed immediately. These I noticed in decl.c over the last couple of days. Slightly more interesting, for some error messages we didn't seem to have testcases, certainly not in g++.dg, thus I a

PING^2: [PATCH] Load external function address via GOT slot

2016-06-07 Thread H.J. Lu
On Sun, May 29, 2016 at 3:13 PM, H.J. Lu wrote: > On Mon, May 9, 2016 at 10:37 AM, H.J. Lu wrote: >> On Fri, Apr 22, 2016 at 6:03 AM, Uros Bizjak wrote: >>> On Fri, Apr 22, 2016 at 2:54 PM, H.J. Lu wrote: For -fno-plt, we load the external function address via the GOT slot so that lin

Re: [PATCH] integer overflow checking builtins in constant expressions

2016-06-07 Thread Jakub Jelinek
On Tue, Jun 07, 2016 at 09:51:05AM -0600, Martin Sebor wrote: > On 06/07/2016 08:32 AM, Jason Merrill wrote: > >On 06/06/2016 08:36 AM, Jakub Jelinek wrote: > >>@@ -352,6 +352,35 @@ builtin_valid_in_constant_expr_p (const_ > >> case BUILT_IN_FUNCTION: > >> case BUILT_IN_LINE: > >> > >>+

Re: [PATCH][3/3][RTL ifcvt] PR middle-end/37780: Conditional expression with __builtin_clz() should be optimized out

2016-06-07 Thread Kyrill Tkachov
On 07/06/16 08:37, Andreas Schwab wrote: Kyrill Tkachov writes: +static rtx +simplify_cond_clz_ctz (rtx x, rtx_code cmp_code, rtx true_val, rtx false_val) +{ + if (cmp_code != EQ && cmp_code != NE) +return NULL_RTX; + + /* Result on X == 0 and X !=0 respectively. */ + rtx on_zero, on_

Re: [PATCH][3/3][RTL ifcvt] PR middle-end/37780: Conditional expression with __builtin_clz() should be optimized out

2016-06-07 Thread Kyrill Tkachov
On 07/06/16 17:47, Kyrill Tkachov wrote: On 07/06/16 08:37, Andreas Schwab wrote: Kyrill Tkachov writes: +static rtx +simplify_cond_clz_ctz (rtx x, rtx_code cmp_code, rtx true_val, rtx false_val) +{ + if (cmp_code != EQ && cmp_code != NE) +return NULL_RTX; + + /* Result on X == 0 and

[PATCH][AArch64][1/2] Add support INS (element) instruction to copy lanes between vectors

2016-06-07 Thread Kyrill Tkachov
Hi all, This patch addresses an deficiency we have in handling vector lane-to-lane moves in the AArch64 backend. Generally we can use the INS (element) instruction but, as a user complains in https://gcc.gnu.org/ml/gcc-help/2016-05/msg00069.html we don't. James had a patch adding an appropriate

[PATCH][AArch64][2/2] (Re)Implement vcopy_lane intrinsics

2016-06-07 Thread Kyrill Tkachov
Hi all, This is the second part of James's patch from: https://gcc.gnu.org/ml/gcc-patches/2013-09/msg01068.html separated out. It reimplements the vcopyq_lane* intrinsics in C and adds implementations of the other missing vcopy_lane_ intrinsics. The differences from that patch are in the use of

[PATCH] Document POWER's -mhtm and -mno-htm options.

2016-06-07 Thread Peter Bergner
It seems we (ok, me) forgot to document the -mhtm option for POWER. This bootstrapped fine and the generated docs looked good. Is this ok for trunk and the open release branches? Peter * doc/invoke.texi (RS/6000 and PowerPC Options): Document -mhtm and -mno-htm. Index: gcc/doc/i

[PATCH, rs6000] Add support for char, short, and int versions of vec_mul

2016-06-07 Thread Bill Seurer
This patch adds support for the missing versions of the vec_mul altivec builtins from the Power Architecture 64-Bit ELF V2 ABI OpenPOWER ABI for Linux Supplement (16 July 2015 Version 1.1). There are many of the builtins that are missing and this is part of a series of patches to add them. There a

Re: [PATCH] Document POWER's -mhtm and -mno-htm options.

2016-06-07 Thread David Edelsohn
On Tue, Jun 7, 2016 at 1:18 PM, Peter Bergner wrote: > It seems we (ok, me) forgot to document the -mhtm option for POWER. > This bootstrapped fine and the generated docs looked good. > Is this ok for trunk and the open release branches? > > Peter > > > * doc/invoke.texi (RS/6000 and Power

Re: [PING] [PATCH] Fix asm X constraint (PR inline-asm/59155)

2016-06-07 Thread Bernd Edlinger
On 06/06/16 20:08, Jakub Jelinek wrote: > On Mon, Jun 06, 2016 at 12:04:04PM -0600, Jeff Law wrote: >> On 06/06/2016 12:01 PM, Jakub Jelinek wrote: >>> On Mon, Jun 06, 2016 at 11:54:04AM -0600, Jeff Law wrote: > As for recog.c, I can not approve this as I am not a maintainer of it. > I only

Re: JIT patch: add gcc_jit_magic_int

2016-06-07 Thread David Malcolm
On Mon, 2016-05-23 at 14:26 +0200, Basile Starynkevitch wrote: > Hello All, > > As I explained in https://gcc.gnu.org/ml/jit/2016-q2/msg00042.html it > is > difficult (or tricky without using dirty tricks involving the GCC > plugin > headers) to use GCCJIT to emit code equivalent to the followin

Re: JIT patch: add gcc_jit_magic_int

2016-06-07 Thread Andrew Pinski
On Mon, May 23, 2016 at 5:26 AM, Basile Starynkevitch wrote: > Hello All, > > As I explained in https://gcc.gnu.org/ml/jit/2016-q2/msg00042.html it is > difficult (or tricky without using dirty tricks involving the GCC plugin > headers) to use GCCJIT to emit code equivalent to the following C file

Re: JIT patch: add gcc_jit_magic_int

2016-06-07 Thread Andrew Pinski
On Tue, Jun 7, 2016 at 12:19 PM, Andrew Pinski wrote: > On Mon, May 23, 2016 at 5:26 AM, Basile Starynkevitch > wrote: >> Hello All, >> >> As I explained in https://gcc.gnu.org/ml/jit/2016-q2/msg00042.html it is >> difficult (or tricky without using dirty tricks involving the GCC plugin >> header

Update probabilities in predict.def to match reality

2016-06-07 Thread Jan Hubicka
Hello, Maritn Liska measured branch predictor hitrates on current tree and SPEC2006. CPU2006 HEURISTICS BRANCHES (REL) HITRATE COVERAGE COVERAGE (REL) loop iv compare33 0.1% 20.27% / 86.24% 30630826 30.63M 0.0%

Re: [PATCH, rs6000] Add support for char, short, and int versions of vec_mul

2016-06-07 Thread Segher Boessenkool
On Tue, Jun 07, 2016 at 12:47:52PM -0500, Bill Seurer wrote: > Bootstrapped and tested on powerpc64le-unknown-linux-gnu and > powerpc64-unknown-linux-gnu with no regressions. Is this ok for trunk? Okay, thanks! Segher

Re: [PATCH] integer overflow checking builtins in constant expressions

2016-06-07 Thread Jason Merrill
On 06/07/2016 12:34 PM, Jakub Jelinek wrote: On Tue, Jun 07, 2016 at 09:51:05AM -0600, Martin Sebor wrote: On 06/07/2016 08:32 AM, Jason Merrill wrote: On 06/06/2016 08:36 AM, Jakub Jelinek wrote: @@ -352,6 +352,35 @@ builtin_valid_in_constant_expr_p (const_ case BUILT_IN_FUNCTION: cas

Re: [PATCH][3/3][RTL ifcvt] PR middle-end/37780: Conditional expression with __builtin_clz() should be optimized out

2016-06-07 Thread Christophe Lyon
On 26 May 2016 at 11:53, Kyrill Tkachov wrote: > Hi all, > > In this PR we want to optimise: > int foo (int i) > { > return (i == 0) ? N : __builtin_clz (i); > } > > on targets where CLZ is defined at zero to the constant 'N'. > This is determined at the RTL level through the CLZ_DEFINED_VALUE_A

Re: [PATCH] integer overflow checking builtins in constant expressions

2016-06-07 Thread Jason Merrill
On 06/07/2016 11:51 AM, Martin Sebor wrote: Unless I hear otherwise I'll submit a separate patch removing the BUILTIN_FILE, FUNCTION, and LINE labels (and adjust the comment to more closely reflect the function's purpose). Since Jakub pointed out that this function is used by the parser for C+

Re: [C++ Patch] Fix some simple location issues

2016-06-07 Thread Jason Merrill
For diagnostics about an initializer, I think it would be better to give the location of the initializer rather than the declaration. Maybe use location_t loc = EXPR_LOC_OR_LOC (init, DECL_SOURCE_LOCATION (decl)); ? Jason

Re: [PATCH] integer overflow checking builtins in constant expressions

2016-06-07 Thread Jakub Jelinek
On Tue, Jun 07, 2016 at 03:35:28PM -0400, Jason Merrill wrote: > >Indeed, confirming removal of the cp/tree.c hunk doesn't affect anything in > >the testsuite, nor e.g. > >enum A { > > B = 1, > > C = 2, > > D = __builtin_add_overflow_p (B, C, C) > >}; > >int e[__builtin_add_overflow_p (B, C, C)

Re: JIT patch: add gcc_jit_magic_int

2016-06-07 Thread Andrew Pinski
On Tue, Jun 7, 2016 at 12:22 PM, Andrew Pinski wrote: > On Tue, Jun 7, 2016 at 12:19 PM, Andrew Pinski wrote: >> On Mon, May 23, 2016 at 5:26 AM, Basile Starynkevitch >> wrote: >>> Hello All, >>> >>> As I explained in https://gcc.gnu.org/ml/jit/2016-q2/msg00042.html it is >>> difficult (or trick

Re: tuple code simplification patch

2016-06-07 Thread François Dumont
Fully tested and committed to trunk. François On 06/06/2016 12:17, Jonathan Wakely wrote: On 02/06/16 23:00 +0200, François Dumont wrote: Hi I was trying to play with tuple implementation and was annoyed by repetition of _Head type when instantiating _Head_base so I thought about this p

Re: [PATCH] integer overflow checking builtins in constant expressions

2016-06-07 Thread Martin Sebor
On 06/07/2016 01:42 PM, Jakub Jelinek wrote: On Tue, Jun 07, 2016 at 03:35:28PM -0400, Jason Merrill wrote: Indeed, confirming removal of the cp/tree.c hunk doesn't affect anything in the testsuite, nor e.g. enum A { B = 1, C = 2, D = __builtin_add_overflow_p (B, C, C) }; int e[__builtin_a

Re: [PATCH] integer overflow checking builtins in constant expressions

2016-06-07 Thread Jakub Jelinek
On Tue, Jun 07, 2016 at 02:30:06PM -0600, Martin Sebor wrote: > I've also since discovered that the handling of (at least) > BUILTIN_LINE is important in C++ 98 mode and if I had run > the c-c++-common tests instead of just the strict C++ subset > I would have seen the c-c++-common/builtin_location

Re: C PATCH for c/71426 (ICE with bogus parameter)

2016-06-07 Thread Joseph Myers
On Tue, 7 Jun 2016, Marek Polacek wrote: > cc1 crashed on the following invalid code, because it tripped this assert. > The reason why b->nested was false for the FUNCTION_DECL 'x' was that when > doing pushdecl, we found an incompatible duplicate, so pushdecl just bound > 'x' to FUNCTION_DECL 'x'

Re: C PATCH for c/71418 (ICE with bogus array dimension and _Alignas)

2016-06-07 Thread Joseph Myers
On Tue, 7 Jun 2016, Marek Polacek wrote: > Another error-recovery bug. This time TYPE was error_mark_node but > min_align_of_type accessed it via TYPE_ALIGN. So we better check that we're > operating on a type. > > Bootstrapped/regtested on x86_64-linux, ok for trunk? OK. -- Joseph S. Myers

Re: [PATCH] Document POWER's -mhtm and -mno-htm options.

2016-06-07 Thread Peter Bergner
On 6/7/16 12:49 PM, David Edelsohn wrote: On Tue, Jun 7, 2016 at 1:18 PM, Peter Bergner wrote: It seems we (ok, me) forgot to document the -mhtm option for POWER. This bootstrapped fine and the generated docs looked good. Is this ok for trunk and the open release branches? Peter * do

Re: [PATCH] integer overflow checking builtins in constant expressions

2016-06-07 Thread Martin Sebor
+The built-in functions promote the first two operands into infinite precision signed type +and perform addition on those promoted operands. The result is then +cast to the type the third argument. The above is missing an "of" (it should read "type of the third argument".) Martin

Re: [PATCH][2/3] Vectorize inductions that are live after the loop

2016-06-07 Thread Gerald Pfeifer
On Tue, 7 Jun 2016, Alan Hayward wrote: > testsuite/ > * gcc.dg/vect/vect-live-2.c : Likewise > * gcc.dg/vect/vect-live-slp-3.c : Update effective target > * lib/target-supports.exp : Add aarch64 to vect_long "Likewise" entries usually follow those they refer to (i.e., while Cha

Re: [C++ Patch] Fix some simple location issues

2016-06-07 Thread Paolo Carlini
Hi, On 07/06/2016 21:40, Jason Merrill wrote: For diagnostics about an initializer, I think it would be better to give the location of the initializer rather than the declaration. Maybe use location_t loc = EXPR_LOC_OR_LOC (init, DECL_SOURCE_LOCATION (decl)); Now that you are telling me this

Re: [PATCH] Selftest framework (v7)

2016-06-07 Thread Trevor Saunders
On Tue, Jun 07, 2016 at 10:18:32AM -0400, David Malcolm wrote: > On Mon, 2016-06-06 at 22:14 -0400, Trevor Saunders wrote: > > On Mon, Jun 06, 2016 at 11:57:49PM +0200, Jakub Jelinek wrote: > > > On Mon, Jun 06, 2016 at 05:53:50PM -0400, Trevor Saunders wrote: > > > > > > As far as I can > > > > >

[PATCH] Add selftest for pretty-print.c (v2)

2016-06-07 Thread David Malcolm
On Tue, 2016-06-07 at 12:02 +0200, Bernd Schmidt wrote: > On 06/06/2016 11:28 PM, David Malcolm wrote: > > + assert_pp_format ("0xcafebabe", "%wx", > > (HOST_WIDE_INT)0xcafebabe); > > More interesting tests would be to have multiple arguments to test > that > we really used the right size for the

[PATCH 0/9] separate shrink-wrapping

2016-06-07 Thread Segher Boessenkool
This patch series introduces separate shrink-wrapping. There are many things the prologue/epilogue of a function do, and most of those things can be done independently. For example, most of the time, for many targets, the save of callee-saved registers can be done later than the "main" prologue.

[PATCH 2/9] cfgcleanup: Don't confuse CFI when -fshrink-wrap-separate

2016-06-07 Thread Segher Boessenkool
cfgcleanup would try to join noreturn paths with different concerns handled. This then fails in dwarf2cfi. 2016-06-07 Segher Boessenkool * cfgcleanup.c (outgoing_edges_match): Don't join noreturn calls if shrink_wrapped_separate. --- gcc/cfgcleanup.c | 5 + 1 file change

[PATCH 1/9] separate shrink-wrap: New command-line flag, status flag, hooks, and doc

2016-06-07 Thread Segher Boessenkool
This patch adds a new command-line flag "-fshrink-wrap-separate", a status flag "shrink_wrapped_separate", hooks for abstracting the target concerns, and documentation for all those. 2016-06-07 Segher Boessenkool * common.opt (-fshrink-wrap-separate): New flag. * doc/invoke.te

[PATCH 3/9] dce: Don't dead-code delete separately wrapped restores

2016-06-07 Thread Segher Boessenkool
Deleting restores (before a noreturn) that are dead confuses dwarf2cfi. 2016-06-07 Segher Boessenkool * dce.c (delete_unmarked_insns): Don't delete instructions with a REG_CFA_RESTORE note. --- gcc/dce.c | 9 + 1 file changed, 9 insertions(+) diff --git a/gcc/dce.c

[PATCH 7/9] cprop: Leave RTX_FRAME_RELATED_P instructions alone

2016-06-07 Thread Segher Boessenkool
Doing cprop on frame-related instructions blows up spectacularly. So don't. 2016-06-07 Segher Boessenkool * regcprop.c (copyprop_hardreg_forward_1): Don't change RTX_FRAME_RELATED_P instructions. --- gcc/regcprop.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gcc/r

[PATCH 4/9] regrename: Don't rename restores

2016-06-07 Thread Segher Boessenkool
A restore is supposed to restore some certain register. Restoring it into some other register will not work. Don't. 2016-06-07 Segher Boessenkool * regrename.c (build_def_use): Invalidate chains that have a REG_CFA_RESTORE on some instruction. --- gcc/regrename.c | 6 +

[PATCH 6/9] sel-sched: Don't mess with register restores

2016-06-07 Thread Segher Boessenkool
If selective scheduling copies register restores it confuses dwarf2cfi. 2016-06-07 Segher Boessenkool * sel-sched-ir.c (init_global_and_expr_for_insn): Don't copy instructions with a REG_CFA_RESTORE note. --- gcc/sel-sched-ir.c | 1 + 1 file changed, 1 insertion(+) diff --g

[PATCH 5/9] regrename: Don't run if function was separately shrink-wrapped

2016-06-07 Thread Segher Boessenkool
Unfortunately even after the previous patch there are still a few cases where regrename creates invalid code when used together with separate shrink-wrapping. I haven't found the cause of those. This patch disables regrename for functions that were separately shrink-wrapped. 2016-06-07 Segher

[PATCH 8/9] shrink-wrap: shrink-wrapping for separate concerns

2016-06-07 Thread Segher Boessenkool
This is the main substance of this patch series. The big comment before the new code says: /* Separate shrink-wrapping Instead of putting all of the prologue and epilogue in one spot, we can put parts of it in places that are executed less frequently. The following code does this, for

[PATCH 9/9] rs6000: Separate shrink-wrapping

2016-06-07 Thread Segher Boessenkool
This implements the hooks for separate shrink-wrapping for rs6000. It handles GPRs and LR. The GPRs get a concern number corresponding to their register number; LR gets concern number 0. This improves specint by 0.9%, specfp by 0.8%, some separate benchmarks much more (on POWER8). It improves th

Re: [PATCH] c/70883 - inconsistent error message for calls to __builtin_add_overflow with too few arguments

2016-06-07 Thread Martin Sebor
Ping: This is a trivial patch to make the text of an error message for an insufficient number of arguments to a built-in consistent across different built-ins. Rather that sometimes saying "not enough arguments" and others "too few arguments" the patch makes GCC print "too few" in all cases. h

Re: [PATCH/AARCH64] Add vulcan -mcpu support

2016-06-07 Thread Virendra Pathak
Hi gcc-patches group, ping, updated the ChangeLog with author's entry. ChangeLog: Virendra Pathak (virendra.pat...@broadcom.com) * config/aarch64/aarch64-cores.def (vulcan): New core * config/aarch64/aarch64-tune.md: Regenerate * doc/invoke.texi (AARCH64/mtune): Document vulcan as an available o

  1   2   >