[PATCH] Fix PR72488

2017-01-19 Thread Richard Biener
The following fixes PR72488, we forgot to restore SSA info when we aborted VN due to too large SCC size. I've added a verifier that checks that we do not share SSA_NAME_{PTR,RANGE}_INFO. The issue is latent on the GCC 6 branch as well where I will not install the new verifier. Bootstrap and reg

Re: [PATCH 9e] Update "startwith" logic for pass-skipping to handle __RTL functions

2017-01-19 Thread Richard Biener
On Wed, Jan 18, 2017 at 5:36 PM, Jeff Law wrote: > On 01/17/2017 02:28 AM, Richard Biener wrote: >>> >>> >>> This feels somewhat different, but still a hack. >>> >>> I don't have strong suggestions on how to approach this, but what we've >>> got >>> here feels like a hack and one prone to bitrot.

Re: [PATCH 0/5] OpenMP/PTX: improve correctness in SIMD regions

2017-01-19 Thread Richard Biener
On Wed, Jan 18, 2017 at 5:22 PM, Jakub Jelinek wrote: > On Wed, Jan 18, 2017 at 07:15:34PM +0300, Alexander Monakov wrote: >> On Wed, 18 Jan 2017, Jakub Jelinek wrote: >> > We are talking here about addressable vars, right (so if we turn it into >> > non-addressable, in the SIMT region we just use

Re: [committed] Implement LANG_HOOKS_TYPE_FOR_SIZE for jit

2017-01-19 Thread Richard Biener
On Wed, Jan 18, 2017 at 10:45 PM, David Malcolm wrote: > The jit testcase test-nested-loops.c was crashing. > > Root cause is that deep inside loop optimization we're now exposing > this call within fold-const.c which wasn't being hit before: > > 4082 /* Compute the mask to access the bitfiel

Re: [PATCH 0/5] OpenMP/PTX: improve correctness in SIMD regions

2017-01-19 Thread Jakub Jelinek
On Thu, Jan 19, 2017 at 10:31:38AM +0100, Richard Biener wrote: > On Wed, Jan 18, 2017 at 5:22 PM, Jakub Jelinek wrote: > > On Wed, Jan 18, 2017 at 07:15:34PM +0300, Alexander Monakov wrote: > >> On Wed, 18 Jan 2017, Jakub Jelinek wrote: > >> > We are talking here about addressable vars, right (so

Re: [PATCH][GCC][Aarch64] Add vectorize patten for copysign.

2017-01-19 Thread Tamar Christina
Hi All, This is a slight modification of the earlier patch (Using a different constant in the mask creation.) < + HOST_WIDE_INT_M1 << bits)); --- > + HOST_WIDE_INT_M1U << > bits)); Kind Regards, T

Re: [PATCH] Be careful about combined chain with length == 0 (PR, tree-optimization/70754).

2017-01-19 Thread Richard Biener
On Wed, Jan 18, 2017 at 4:32 PM, Bin.Cheng wrote: > On Wed, Jan 18, 2017 at 2:54 PM, Richard Biener > wrote: >> On Wed, Jan 18, 2017 at 11:10 AM, Martin Liška wrote: >>> Hello. >>> >>> >>> Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. >>> >>> Ready to be installed? >

Re: [PATCH 0/5] OpenMP/PTX: improve correctness in SIMD regions

2017-01-19 Thread Alexander Monakov
On Thu, 19 Jan 2017, Richard Biener wrote: > >> What about motion in the other direction, upwards across SIMT_ENTER()? > > > > I think this is a question for Richard, whether it can be done in the alias > > oracle. If yes, it supposedly can be done for both SIMT_ENTER and > > SIMT_EXIT. > > Code

Re: [PATCH 0/5] OpenMP/PTX: improve correctness in SIMD regions

2017-01-19 Thread Richard Biener
On Thu, Jan 19, 2017 at 10:37 AM, Jakub Jelinek wrote: > On Thu, Jan 19, 2017 at 10:31:38AM +0100, Richard Biener wrote: >> On Wed, Jan 18, 2017 at 5:22 PM, Jakub Jelinek wrote: >> > On Wed, Jan 18, 2017 at 07:15:34PM +0300, Alexander Monakov wrote: >> >> On Wed, 18 Jan 2017, Jakub Jelinek wrote:

Re: [PATCH 0/5] OpenMP/PTX: improve correctness in SIMD regions

2017-01-19 Thread Richard Biener
On Thu, Jan 19, 2017 at 10:44 AM, Alexander Monakov wrote: > On Thu, 19 Jan 2017, Richard Biener wrote: >> >> What about motion in the other direction, upwards across SIMT_ENTER()? >> > >> > I think this is a question for Richard, whether it can be done in the alias >> > oracle. If yes, it suppos

Re: [PATCH 0/5] OpenMP/PTX: improve correctness in SIMD regions

2017-01-19 Thread Jakub Jelinek
On Thu, Jan 19, 2017 at 10:45:08AM +0100, Richard Biener wrote: > > But in the escape analysis we could consider all the specially marked > > "omp simt private" addressable vars to escape and thus confine them into the > > SIMT region that way, right? > > We could. But that doesn't prevent vars f

Fix false positive of symtab_node::equal_address_to

2017-01-19 Thread Jan Hubicka
Hi, this patch fixes false positive of symtab_node::equal_address_to when comparing non-interposable alias with interposable definition. Honza Index: ChangeLog === --- ChangeLog (revision 244611) +++ ChangeLog (working copy) @@ -

Re: [PATCH] Be careful about combined chain with length == 0 (PR, tree-optimization/70754).

2017-01-19 Thread Bin.Cheng
On Thu, Jan 19, 2017 at 9:42 AM, Richard Biener wrote: > On Wed, Jan 18, 2017 at 4:32 PM, Bin.Cheng wrote: >> On Wed, Jan 18, 2017 at 2:54 PM, Richard Biener >> wrote: >>> On Wed, Jan 18, 2017 at 11:10 AM, Martin Liška wrote: Hello. Patch can bootstrap on ppc64le-redhat-linu

Re: [PATCH 0/5] OpenMP/PTX: improve correctness in SIMD regions

2017-01-19 Thread Alexander Monakov
On Thu, 19 Jan 2017, Jakub Jelinek wrote: > On Thu, Jan 19, 2017 at 10:45:08AM +0100, Richard Biener wrote: > > > But in the escape analysis we could consider all the specially marked > > > "omp simt private" addressable vars to escape and thus confine them into > > > the > > > SIMT region that wa

Re: [expand] Fix for PR rtl-optimization/79121 incorrect expansion of extend plus left shift

2017-01-19 Thread Richard Earnshaw (lists)
On 18/01/17 21:07, Jeff Law wrote: > On 01/18/2017 11:08 AM, Richard Earnshaw (lists) wrote: >> PR 79121 is a silent wrong code regression where, when generating a >> shift from an extended value moving from one to two machine registers, >> the type of the right shift is for the most significant wo

Re: [PATCH] Add AVX512 k-mask intrinsics

2017-01-19 Thread Kirill Yukhin
Hi Andrew, On 18 Jan 15:45, Andrew Senkevich wrote: > 2017-01-17 16:51 GMT+03:00 Jakub Jelinek : > > On Tue, Jan 17, 2017 at 04:03:08PM +0300, Andrew Senkevich wrote: > >> > I've played a bit w/ SDE. And looks like operands are not early clobber: > >> > TID0: INS 0x004003ee AVX5

coretypes.h: change class rtx_def to struct

2017-01-19 Thread Gerald Pfeifer
This innocent looking patch shaves 1749 warnings in stage 1 when building with clang (such as on newer versions of FreeBSD). Richi, at one point you indicated such changes would be fine (though usually they go from struct to class)? Gerald 2016-09-28 Gerald Pfeifer * coretypes.h (cla

[PATCH] Fix libgfortran bootstrap error on x86_64-mingw32 (PR target/79127)

2017-01-19 Thread Jakub Jelinek
Hi! Apparently the Windows SEH has problems with the [xyz]mm16 and later registers that were added with AVX512F (usable in 64-bit code only), if any of the zmm16 to zmm31 registers are used in some function compiled with avx512f or later, GCC emits .seh_savexmm %xmm16, ... directive or similar and

Re: [PATCH] Be careful about combined chain with length == 0 (PR, tree-optimization/70754).

2017-01-19 Thread Richard Biener
On Thu, Jan 19, 2017 at 11:25 AM, Bin.Cheng wrote: > On Thu, Jan 19, 2017 at 9:42 AM, Richard Biener > wrote: >> On Wed, Jan 18, 2017 at 4:32 PM, Bin.Cheng wrote: >>> On Wed, Jan 18, 2017 at 2:54 PM, Richard Biener >>> wrote: On Wed, Jan 18, 2017 at 11:10 AM, Martin Liška wrote: > Hel

Re: coretypes.h: change class rtx_def to struct

2017-01-19 Thread Richard Biener
On Thu, 19 Jan 2017, Gerald Pfeifer wrote: > This innocent looking patch shaves 1749 warnings in stage 1 > when building with clang (such as on newer versions of FreeBSD). > > Richi, at one point you indicated such changes would be fine > (though usually they go from struct to class)? In this ca

Re: coretypes.h: change class rtx_def to struct

2017-01-19 Thread Jakub Jelinek
On Thu, Jan 19, 2017 at 12:23:34PM +0100, Richard Biener wrote: > On Thu, 19 Jan 2017, Gerald Pfeifer wrote: > > > This innocent looking patch shaves 1749 warnings in stage 1 > > when building with clang (such as on newer versions of FreeBSD). > > > > Richi, at one point you indicated such change

Re: [PATCH 0/5] OpenMP/PTX: improve correctness in SIMD regions

2017-01-19 Thread Richard Biener
On Thu, Jan 19, 2017 at 11:00 AM, Jakub Jelinek wrote: > On Thu, Jan 19, 2017 at 10:45:08AM +0100, Richard Biener wrote: >> > But in the escape analysis we could consider all the specially marked >> > "omp simt private" addressable vars to escape and thus confine them into >> > the >> > SIMT regi

Re: coretypes.h: change class rtx_def to struct

2017-01-19 Thread Richard Biener
On Thu, 19 Jan 2017, Jakub Jelinek wrote: > On Thu, Jan 19, 2017 at 12:23:34PM +0100, Richard Biener wrote: > > On Thu, 19 Jan 2017, Gerald Pfeifer wrote: > > > > > This innocent looking patch shaves 1749 warnings in stage 1 > > > when building with clang (such as on newer versions of FreeBSD). >

[Ada] Spurious dimensionality errors in inlined bodies.

2017-01-19 Thread Arnaud Charlet
This patch removes spurious dimensionality errors in programs that are compiled with front-end inlining (as in SPARK mode). The original model of dimensionality checking analyzes only nodes coming from source because the correctness of the dimensioned program only depends on source user code. Howev

[Ada] Memory leak on function returning a limited view result

2017-01-19 Thread Arnaud Charlet
This patch modifies the processing of subprograms to properly frag a function as returning by reference when the return type is a limited view and the full view of the type requires the secondary stack. -- Source -- -- pack_1.ads with Pack_2; with Ada.Finalization; us

[Ada] Better error message on illegal selected component with overloaded prefix.

2017-01-19 Thread Arnaud Charlet
This patch inproves the error report produced on a selected component Nam.Comp which appears in an object declaration, when Nam has seeveral interpretations as a function, and there is non-visible package with the same name. Compiling pqi.adb must yield: pqi.adb:15:07: no legal interpretation

[PATCH] Fix false positive for -Walloc-size-larger-than (PR, bootstrap/79132).

2017-01-19 Thread Martin Liška
Hello. Following patch fixes asan bootstrap, as mentioned in the PR. Ready to be installed? Thanks, Martin >From 6a3d1b85e124751fdb804ae86596d30ea98b54af Mon Sep 17 00:00:00 2001 From: marxin Date: Thu, 19 Jan 2017 10:25:55 +0100 Subject: [PATCH] Fix false positive for -Walloc-size-larger-than (

[Ada] Missing invariant procedure body in SPARK mode

2017-01-19 Thread Arnaud Charlet
This patch modifies the generation of the invariant procedure body as follows: * The body of the "partial" invariant procedure is still generated at the end of the visible declarations. * The body of the "full" invariant procedure is generated when the related type is frozen or at the

Re: transaction_safe exceptions prevent libstdc++ building for some targets

2017-01-19 Thread Joe Seymour
On 18/01/2017 19:24, DJ Delorie wrote: > Joe Seymour writes: >>> the msp430 -mlarge multilib failing to build with... configure: error: Unknown underlying type for size_t make[1]: *** [configure-target-libstdc++-v3] Error 1 >> >> This is still reproducible. > > FYI the underlying type i

Re: [PATCH] Be careful about combined chain with length == 0 (PR, tree-optimization/70754).

2017-01-19 Thread Bin.Cheng
On Thu, Jan 19, 2017 at 11:22 AM, Richard Biener wrote: > On Thu, Jan 19, 2017 at 11:25 AM, Bin.Cheng wrote: >> On Thu, Jan 19, 2017 at 9:42 AM, Richard Biener >> wrote: >>> On Wed, Jan 18, 2017 at 4:32 PM, Bin.Cheng wrote: On Wed, Jan 18, 2017 at 2:54 PM, Richard Biener wrote: >

Re: [PATCH, Fortran, pr70696, v2] [Coarray] ICE on EVENT POST of host-associated EVENT_TYPE coarray

2017-01-19 Thread Andre Vehreschild
Hi all, unfortunately triggered this patch a regression in the opencoarray's testsuite, which also occurs outside of opencoarray, when a caf-function is used in a block in the main-program. This patch fixes the error and adds a testcase. Bootstrapped and regtested ok on x86_64-linux/f25. Ok for t

Re: [PATCH] Introduce --with-gcc-major-version-only configure option (take 2)

2017-01-19 Thread Franz Sirl
Am 2017-01-12 um 21:16 schrieb Jakub Jelinek: libmpx/ * configure.ac: Add GCC_BASE_VER. * Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to get version from BASE-VER file. * configure: Regenerated. Hi, it seems libmpx/configure.ac is missing th

[RS6000] PR79144, cmpstrnsi optimization breaks glibc

2017-01-19 Thread Alan Modra
glibc compiled with current gcc-7 fails one test due to strcmp and strncmp appearing in the PLT. This is because the inline expansion of those functions falls back to a function call, but not using the asm name for the call. Fixed by retrieving the asm name from the builtin decl. I used the buil

[RS6000] Don't expand strcmp and strncmp inline when -Os

2017-01-19 Thread Alan Modra
The inline expansions are non-trivial, so aren't really appropriate for -Os. Bootstrapped and regression tested powerpc64le-linux. OK to apply? * config/rs6000/rs6000.md (cmpstrnsi, cmpstrsi): Fail if optimizing for size. diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6

[PR middle-end/79123] cast false positive in -Walloca-larger-than=

2017-01-19 Thread Aldy Hernandez
In the attached testcase, we have a clearly bounded case of alloca which is being incorrectly reported: void g (int *p, int *q) { size_t n = (size_t)(p - q); if (n < 10) f (__builtin_alloca (n)); } The problem is that VRP gives us an anti-range for `n' which may be out of range:

[PATCH][AArch64] Purge leftover occurrences of aarch64_nopcrelative_literal_loads

2017-01-19 Thread Kyrill Tkachov
Hi all, The patch that renamed all uses of aarch64_nopcrelative_literal_loads into aarch64_pcrelative_literal_loads missed out its extern declaration in aarch64-protos.h and a couple of its uses in aarch64.md. The aarch64_nopcrelative_literal_loads doesn't get initialised anywhere (since it's

Re: [PATCH] Introduce --with-gcc-major-version-only configure option (take 2)

2017-01-19 Thread Jakub Jelinek
On Thu, Jan 19, 2017 at 01:13:14PM +0100, Franz Sirl wrote: > Am 2017-01-12 um 21:16 schrieb Jakub Jelinek: > > libmpx/ > > * configure.ac: Add GCC_BASE_VER. > > * Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to > > get version from BASE-VER file. > > * configure

Re: [PR middle-end/79123] cast false positive in -Walloca-larger-than=

2017-01-19 Thread Richard Biener
On Thu, Jan 19, 2017 at 1:17 PM, Aldy Hernandez wrote: > In the attached testcase, we have a clearly bounded case of alloca which is > being incorrectly reported: > > void g (int *p, int *q) > { >size_t n = (size_t)(p - q); > >if (n < 10) > f (__builtin_alloca (n)); > } > > The proble

Re: Fortran, committed: Forall-with-temporary problems(pr 50069 and pr 55086).

2017-01-19 Thread Christophe Lyon
Hi, On 18 January 2017 at 22:45, Louis Krupp wrote: > Fixed in revision 244601. > I've noticed a new failure on arm/aarch64: compiler driver --help=fortran option(s): "^ +-.*[^:.]$" absent from output: " -ftest-forall-temp Force creation of temporary to test infrequently-executed fo

Re: [PR middle-end/79123] cast false positive in -Walloca-larger-than=

2017-01-19 Thread Aldy Hernandez
On 01/19/2017 07:45 AM, Richard Biener wrote: On Thu, Jan 19, 2017 at 1:17 PM, Aldy Hernandez wrote: In the attached testcase, we have a clearly bounded case of alloca which is being incorrectly reported: void g (int *p, int *q) { size_t n = (size_t)(p - q); if (n < 10) f (__builti

Re: [PATCH] Fix libgfortran bootstrap error on x86_64-mingw32 (PR target/79127)

2017-01-19 Thread FX
> 2017-01-19 Jakub Jelinek > > PR target/79127 > * acinclude.m4 (LIBGFOR_CHECK_AVX512F): Ensure the test clobbers > some zmm16+ registers to verify they are handled by unwind info > properly if needed. > * configure: Regenerated. OK to commit, with an additional c

Re: [PATCH 0/5] OpenMP/PTX: improve correctness in SIMD regions

2017-01-19 Thread Alexander Monakov
On Wed, 18 Jan 2017, Jakub Jelinek wrote: > > Inlining needs to do just like omp-low; if we take the current framework, it > > would need to collect addressable locals into one struct, replace > > references to > > those locals by field references in the inlined body. Then it needs to > > appropr

Re: [PR middle-end/79123] cast false positive in -Walloca-larger-than=

2017-01-19 Thread Richard Biener
On Thu, Jan 19, 2017 at 2:02 PM, Aldy Hernandez wrote: > On 01/19/2017 07:45 AM, Richard Biener wrote: >> >> On Thu, Jan 19, 2017 at 1:17 PM, Aldy Hernandez wrote: >>> >>> In the attached testcase, we have a clearly bounded case of alloca which >>> is >>> being incorrectly reported: >>> >>> void

Re: [2/5][DWARF] Generate dwarf information for -msign-return-address by introducing new DWARF mapping hook

2017-01-19 Thread Richard Earnshaw (lists)
On 17/01/17 15:11, Jiong Wang wrote: > > > On 17/01/17 13:57, Richard Earnshaw (lists) wrote: >> On 16/01/17 14:29, Jiong Wang wrote: >>> I can see the reason for doing this is if you want to seperate the interpretion of GCC CFA reg-note and the final DWARF CFA operation. My

Re: [Ping~]Re: [5/5][libgcc] Runtime support for AArch64 return address signing (needs new target macros)

2017-01-19 Thread Richard Earnshaw (lists)
On 18/01/17 17:07, Jiong Wang wrote: > On 12/01/17 18:10, Jiong Wang wrote: >> On 06/01/17 11:47, Jiong Wang wrote: >>> This is the update on libgcc unwinder support according to new DWARF >>> proposal. >>> >>> As Joseph commented, duplication of unwind-dw2.c is not encouraged in >>> libgcc, >>> Bu

Re: [PATCH 0/5] OpenMP/PTX: improve correctness in SIMD regions

2017-01-19 Thread Jakub Jelinek
On Thu, Jan 19, 2017 at 04:36:25PM +0300, Alexander Monakov wrote: > On Wed, 18 Jan 2017, Jakub Jelinek wrote: > > > Inlining needs to do just like omp-low; if we take the current framework, > > > it > > > would need to collect addressable locals into one struct, replace > > > references to > > >

Re: [PATCH][GCC][PATCHv3] Improve fpclassify w.r.t IEEE like numbers in GIMPLE.

2017-01-19 Thread Tamar Christina
Hi Joseph & Jeff, Thanks for the feedback! > > Generally, I don't see tests added that these new functions are correct > > for float, double and long double, which would detect such issues if run > > for a target with IBM long double. > > Specifically, I think gcc.dg/tg-tests.h should have tests

C++ PATCH for c++/79130 (direct-initialization of arrays with decomposition)

2017-01-19 Thread Jason Merrill
Jakub pointed out that parenthesized decomposition of an array wasn't properly using direct-initialization. Rather than pass the flags down into build_vec_init at this point in GCC 7 development, let's turn the initializer into something that build_vec_init recognizes as direct-initialization. Te

Re: [expand] Fix for PR rtl-optimization/79121 incorrect expansion of extend plus left shift

2017-01-19 Thread Jeff Law
On 01/19/2017 03:37 AM, Richard Earnshaw (lists) wrote: On 18/01/17 21:07, Jeff Law wrote: On 01/18/2017 11:08 AM, Richard Earnshaw (lists) wrote: PR 79121 is a silent wrong code regression where, when generating a shift from an extended value moving from one to two machine registers, the type

Re: [PATCH][GCC][PATCHv3] Improve fpclassify w.r.t IEEE like numbers in GIMPLE.

2017-01-19 Thread Joseph Myers
On Thu, 19 Jan 2017, Tamar Christina wrote: > > Also, I don't think the call to perform_ibm_extended_fixups in > > is_subnormal is correct. Subnormal for IBM long double is *not* the same > > as subnormal double high part. Likewise it's incorrect in is_normal as > > well. > > The calls to is_ze

Re: [Ping~]Re: [5/5][libgcc] Runtime support for AArch64 return address signing (needs new target macros)

2017-01-19 Thread Jiong Wang
Thanks for the review. On 19/01/17 14:18, Richard Earnshaw (lists) wrote: diff --git a/libgcc/unwind-dw2.c b/libgcc/unwind-dw2.c index 8085a42ace15d53f4cb0c6681717012d906a6d47..cf640135275deb76b820f8209fa51eacfd64c4a2 100644 --- a/libgcc/unwind-dw2.c +++ b/libgcc/unwind-dw2.c @@ -136,6 +13

Re: [PATCH, Fortran, pr70696, v2] [Coarray] ICE on EVENT POST of host-associated EVENT_TYPE coarray

2017-01-19 Thread Steve Kargl
On Thu, Jan 19, 2017 at 01:07:50PM +0100, Andre Vehreschild wrote: > Hi all, > > unfortunately triggered this patch a regression in the opencoarray's > testsuite, > which also occurs outside of opencoarray, when a caf-function is used in a > block in the main-program. This patch fixes the error a

Re: [PATCH] Fix IPA CP where it forgot to add a reference in cgraph

2017-01-19 Thread Martin Liška
On 01/18/2017 11:18 PM, Jan Hubicka wrote: >> >> 2016-12-19 Martin Liska >> >> * cgraphclones.c (cgraph_node::create_virtual_clone): >> Create either IPA_REF_LOAD of IPA_REF_READ depending on >> whether new_tree is a VAR_DECL or an ADDR_EXPR. >> * ipa-cp.c (create_specialized

Re: [PATCH] Allow building GCC with PTX offloading even without CUDA being installed (gcc and nvptx-tools patches)

2017-01-19 Thread Alexander Monakov
On Wed, 18 Jan 2017, Jakub Jelinek wrote: > On Wed, Jan 18, 2017 at 10:52:32PM +0300, Alexander Monakov wrote: > > Sorry for not noticing this earlier, but ... > > > > > +#ifdef __LP64__ > > > +typedef unsigned long long CUdeviceptr; > > > +#else > > > +typedef unsigned CUdeviceptr; > > > +#endif

Re: [PATCH] Fix IPA CP where it forgot to add a reference in cgraph

2017-01-19 Thread Jan Hubicka
> >> 2016-12-19 Martin Liska > >> > >>* cgraphclones.c (cgraph_node::create_virtual_clone): > >>Create either IPA_REF_LOAD of IPA_REF_READ depending on > >>whether new_tree is a VAR_DECL or an ADDR_EXPR. > >>* ipa-cp.c (create_specialized_node): Add reference just for > >>ADD

Re: Re: [PATCH 0/5] OpenMP/PTX: improve correctness in SIMD regions

2017-01-19 Thread Cesar Philippidis
On 01/18/2017 06:22 AM, Richard Biener wrote: > On Wed, Jan 18, 2017 at 3:11 PM, Alexander Monakov wrote: >> On Wed, 18 Jan 2017, Richard Biener wrote: After OpenMP lowering, inlining might break this by inlining functions with address-taken locals into SIMD regions. For now, such inlin

Re: [PATCH][GCC][PATCHv3] Improve fpclassify w.r.t IEEE like numbers in GIMPLE.

2017-01-19 Thread Tamar Christina
> > The calls to is_zero and is_subnormal were incorrect indeed. I've > > corrected them by not calling the fixup code and to instead make sure it > > falls through into the old fp based code which did normal floating point > > operations on the number. This is the same code as was before in > > f

[PATCH] Fix further -fdebug-types-section bugs (PR debug/79129)

2017-01-19 Thread Jakub Jelinek
Hi! This is on top of the PR78835 patch I've posted yesterday. We ICE on the following testcase reduced from libstdc++ ios_failure.cc. If there are nested comdat types, as B (outer type) and A (inner type) in the testcase, we first move A to a type unit and add there copies of its children, and pr

Re: [WPA PATCH] Comdat group splitting

2017-01-19 Thread Jan Hubicka
> honza, > this is the fix for the partitioned WPA bug I was tracking down. > > We have base and complete dtors sharing a comdat group (one's an alias for > the other). The linker tells us the complete dtor is PREVAILING_DEF, as > it's referenced from some other library. The base dtor is UNKNOWN

Re: [PATCH][GCC][Aarch64] Add vectorize patten for copysign.

2017-01-19 Thread Tamar Christina
Hi All, It seems the entry in config/aarch64/aarch64-builtins.c isn't needed, as such I've simplified the patch and the changelog. Ok for trunk? Tamar gcc/ 2017-01-19 Tamar Christina * config/aarch64/aarch64.c (aarch64_simd_gen_const_vector_dup): Changed int to HOST_WIDE_I

Re: libgo patch committed: Update to Go1.8rc1

2017-01-19 Thread Rainer Orth
Hi Ian, > On Mon, Jan 16, 2017 at 7:21 AM, Rainer Orth > wrote: >> >> I'm getting further on Solaris now, but the build still fails: > > I committed this patch to fix the remaining build problems on Solaris. > Bootstrapped and ran some of the Go tests on i386-sun-solaris11 and > x86_64-pc-linux-g

Re: [PATCH, Fortran, pr70696, v2] [Coarray] ICE on EVENT POST of host-associated EVENT_TYPE coarray

2017-01-19 Thread Andre Vehreschild
Hi Steve, thanks for the review. Committed as r244637. Regards, Andre On Thu, 19 Jan 2017 06:51:19 -0800 Steve Kargl wrote: > On Thu, Jan 19, 2017 at 01:07:50PM +0100, Andre Vehreschild wrote: > > Hi all, > > > > unfortunately triggered this patch a regression in the opencoarray's > >

Re: [PATCH] Allow building GCC with PTX offloading even without CUDA being installed (gcc and nvptx-tools patches)

2017-01-19 Thread Jakub Jelinek
On Thu, Jan 19, 2017 at 06:09:35PM +0300, Alexander Monakov wrote: > > -#ifdef __LP64__ > > +#if defined(__LP64__) || defined(_WIN64) > > > > (is that the right define for 64-bit MingW, right?). > > Yes, _WIN64; libsanitizer has a similar test. Alternatively, I guess, > > #if __SIZEOF_POINTER

Re: [PATCH][GCC][Aarch64] Add vectorize patten for copysign.

2017-01-19 Thread Tamar Christina
It seems I can drop even more: gcc/ 2017-01-19 Tamar Christina * config/aarch64/aarch64.c (aarch64_simd_gen_const_vector_dup): Changed int to HOST_WIDE_INT. * config/aarch64/aarch64-protos.h (aarch64_simd_gen_const_vector_dup): Likewise. * config/aarch6

Re: C++ PATCH for c++/79130 (direct-initialization of arrays with decomposition)

2017-01-19 Thread Jason Merrill
On Thu, Jan 19, 2017 at 9:43 AM, Jason Merrill wrote: > Jakub pointed out that parenthesized decomposition of an array wasn't > properly using direct-initialization. Rather than pass the flags down > into build_vec_init at this point in GCC 7 development, let's turn the > initializer into somethi

[PATCH] Make LTO's implementation of LANG_HOOKS_TYPE_FOR_SIZE the default

2017-01-19 Thread David Malcolm
On Thu, 2017-01-19 at 10:36 +0100, Richard Biener wrote: > On Wed, Jan 18, 2017 at 10:45 PM, David Malcolm > wrote: > > The jit testcase test-nested-loops.c was crashing. > > > > Root cause is that deep inside loop optimization we're now exposing > > this call within fold-const.c which wasn't bei

Re: [PATCH 0/5] OpenMP/PTX: improve correctness in SIMD regions

2017-01-19 Thread Alexander Monakov
On Thu, 19 Jan 2017, Jakub Jelinek wrote: > On Thu, Jan 19, 2017 at 04:36:25PM +0300, Alexander Monakov wrote: > > > One of the problems with that is that it means that you can't easily turn > > > addressable private variables into non-addressable ones once you force > > > them > > > into such str

RE: [PATCH, MIPS] Target flag and build option to disable indexed memory OPs.

2017-01-19 Thread Matthew Fortune
Hi Doug, I've committed this on your behalf to get the testcases in and also add the description of when this feature is required. Thanks for the patch. Committed code inline below. r244640 gcc/ PR target/78176 * config.gcc (supported_defaults): Add lxc1-sxc1. (with_lx

RE: [PATCH,gcc/MIPS] Make loongson3a use fused madd.d

2017-01-19 Thread Matthew Fortune
Hi Paul, Your latest version of the patch is now committed. I have been doing some work on the recursive build failure but the issue is complex and involves LRA so I went ahead with committing your change independently. It also turns out that (at least when targeting loongson3a) there are stage2

Re: [PATCH][GCC][PATCHv3] Improve fpclassify w.r.t IEEE like numbers in GIMPLE.

2017-01-19 Thread Joseph Myers
On Thu, 19 Jan 2017, Tamar Christina wrote: > > The old code set orig_arg before converting IBM long double to double. > > Your code sets it after the conversion. The old code set min_exp based on > > a string set from REAL_MODE_FORMAT (orig_mode)->emin - 1; your code uses > > the adjusted mode.

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

2017-01-19 Thread Jakub Jelinek
On Wed, Jan 18, 2017 at 04:34:48PM +0100, Martin Liška wrote: > Hello. > > During bootstrap, I came to following test-case: > > struct A > { > int regno; > }; > struct > { > A base; > } typedef *df_ref; > int *a; > void > fn1 (int N) > { > for (int i = 0; i < N; i++) > { > df_ref

Re: [PATCH][AArch64] Purge leftover occurrences of aarch64_nopcrelative_literal_loads

2017-01-19 Thread James Greenhalgh
On Thu, Jan 19, 2017 at 12:17:40PM +, Kyrill Tkachov wrote: > Hi all, > > The patch that renamed all uses of aarch64_nopcrelative_literal_loads into > aarch64_pcrelative_literal_loads missed out its extern declaration in > aarch64-protos.h and a couple of its uses in aarch64.md. > The aarch64_

[PATCH, v2] (9e) Update "startwith" logic for pass-skipping to handle __RTL functions

2017-01-19 Thread David Malcolm
On Mon, 2017-01-16 at 14:42 -0700, Jeff Law wrote: > On 01/09/2017 07:38 PM, David Malcolm wrote: > > gcc/ChangeLog: > > * passes.c: Include "insn-addr.h". > > (should_skip_pass_p): Add logging. Update logic for running > > "expand" to be compatible with both __GIMPLE and __RTL. Guard

Re: [PATCH] Add AVX512 k-mask intrinsics

2017-01-19 Thread Andrew Senkevich
2017-01-19 13:39 GMT+03:00 Kirill Yukhin : > Hi Andrew, > On 18 Jan 15:45, Andrew Senkevich wrote: >> 2017-01-17 16:51 GMT+03:00 Jakub Jelinek : >> > On Tue, Jan 17, 2017 at 04:03:08PM +0300, Andrew Senkevich wrote: >> >> > I've played a bit w/ SDE. And looks like operands are not early clobber: >>

Re: Implement -Wduplicated-branches (PR c/64279) (v3)

2017-01-19 Thread Marek Polacek
On Mon, Jan 09, 2017 at 02:39:30PM +0100, Marek Polacek wrote: > On Mon, Jan 09, 2017 at 12:18:01PM +0100, Jakub Jelinek wrote: > > On Mon, Jan 09, 2017 at 10:21:47AM +0100, Marek Polacek wrote: > > > +/* Callback function to determine whether an expression TP or one of its > > > + subexpressions

Re: [PR middle-end/79123] cast false positive in -Walloca-larger-than=

2017-01-19 Thread Martin Sebor
On 01/19/2017 05:45 AM, Richard Biener wrote: On Thu, Jan 19, 2017 at 1:17 PM, Aldy Hernandez wrote: In the attached testcase, we have a clearly bounded case of alloca which is being incorrectly reported: void g (int *p, int *q) { size_t n = (size_t)(p - q); if (n < 10) f (__builti

Re: Implement -Wduplicated-branches (PR c/64279) (v3)

2017-01-19 Thread Jakub Jelinek
On Thu, Jan 19, 2017 at 05:52:14PM +0100, Marek Polacek wrote: > > I agree that not warning for > > if (foo) > > return NULL; > > else > > return NULL; > > is bad. But how can I compare those expressions side-by-side? I'm not > > finding > > anything. :( > > Seems like ENOTIME to a

Re: [PATCH][GCC][Aarch64] Add vectorize patten for copysign.

2017-01-19 Thread James Greenhalgh
On Thu, Jan 19, 2017 at 03:55:36PM +, Tamar Christina wrote: > > It seems I can drop even more: The AArch64 parts of this look fine to me, and based on benchmarking of the patch they are low risk for high reward (and other targets have had a vectorized copysign for a while without issue). Ho

Re: [committed] libitm: Disable TSX on processors on which it may be broken.

2017-01-19 Thread Uros Bizjak
On Wed, Jan 18, 2017 at 11:08 PM, Uros Bizjak wrote: > On Wed, Jan 18, 2017 at 10:48 PM, Uros Bizjak wrote: >> Hello! >> >>> This fix follows the same approach that glibc uses to disable TSX on >>> processors on which it is broken. TSX can also be disabled through a >>> microcode update on these

Re: [PATCH] Make LTO's implementation of LANG_HOOKS_TYPE_FOR_SIZE the default

2017-01-19 Thread Richard Biener
On January 19, 2017 5:37:09 PM GMT+01:00, David Malcolm wrote: >On Thu, 2017-01-19 at 10:36 +0100, Richard Biener wrote: >> On Wed, Jan 18, 2017 at 10:45 PM, David Malcolm >> wrote: >> > The jit testcase test-nested-loops.c was crashing. >> > >> > Root cause is that deep inside loop optimizatio

RE: [patch mips/gcc] add build-time and runtime options to disable or set madd.fmt type

2017-01-19 Thread Matthew Fortune
Hi, I've rewritten/simplified this patch as it provides far too much control to end users who will undoubtedly shoot themselves in the foot so to speak. The option I intend to support is simply --with-madd4 --without-madd4 and -mmadd4 -mno-madd4. This is a simple enable/disable on top of architect

Re: [PATCH] BRIG frontend: request for a global review

2017-01-19 Thread Pekka Jääskeläinen
Hi Jakub and Richard, Attached is an updated BRIG FE patch which adds the HSAIL related builtins only internally in the BRIG FE. I didn't add LTO support as I believe it's not useful for BRIG FE due to it always inputting fully linked BRIGs and not mixing with other frontends. BR, Pekka On Mon

[testsuite] Fix gcc.dg/attr-alloc_size-4.c on i?86 (PR testsuite/79051)

2017-01-19 Thread Rainer Orth
As described in the PR, gcc.dg/attr-alloc_size-4.c was FAILing on 32-bit x86 targets. Fixed as follows by removing the mismatch between #if conditions and target selectors. Tested with the appropriate runtest invocations on i386-pc-solaris2.12 and amd64-pc-solaris2.12, installed on mainline.

Re: [PATCH] Add AVX512 k-mask intrinsics

2017-01-19 Thread Kirill Yukhin
On 19 Jan 19:42, Andrew Senkevich wrote: > 2017-01-19 13:39 GMT+03:00 Kirill Yukhin : > > Hi Andrew, > > On 18 Jan 15:45, Andrew Senkevich wrote: > >> 2017-01-17 16:51 GMT+03:00 Jakub Jelinek : > >> > On Tue, Jan 17, 2017 at 04:03:08PM +0300, Andrew Senkevich wrote: > >> >> > I've played a bit w/ S

Re: [PATCH][GCC][PATCHv3] Improve fpclassify w.r.t IEEE like numbers in GIMPLE.

2017-01-19 Thread Tamar Christina
Hi Joseph, I made the requested changes and did a quick pass over the rest of the fp cases. Regards, Tamar From: Joseph Myers Sent: Thursday, January 19, 2017 4:33:13 PM To: Tamar Christina Cc: Jeff Law; GCC Patches; Wilco Dijkstra; rguent...@suse.de; Mi

Re: [PATCH][GCC][Aarch64] Add vectorize patten for copysign.

2017-01-19 Thread Tamar Christina
Hi James, I have corrected the testsuite changes and attached is the new file and changelog. Ok for trunk? Tamar Hi All, This patch vectorizes the copysign builtin for Aarch64 similar to how it is done for Arm. AArch64 now generates: ... .L4: ldr q1, [x6, x3] add w4,

Re: [PATCH] C++: fix fix-it hints for misspellings within explicit namespaces (v2)

2017-01-19 Thread Jason Merrill
On Wed, Jan 18, 2017 at 5:29 PM, David Malcolm wrote: > Here's a version of the patch which simply tweaks > cp_parser_primary_expression's call to finish_id_expression so that > it passes the location of the id_expression, rather than that of > id_expr_token. > > The id_expression in question came

Re: [PATCH][GCC][Aarch64] Add vectorize patten for copysign.

2017-01-19 Thread James Greenhalgh
On Thu, Jan 19, 2017 at 06:05:52PM +, Tamar Christina wrote: > Hi James, > > I have corrected the testsuite changes and attached is the new file and > changelog. > > Ok for trunk? > > Tamar > > Hi All, > > This patch vectorizes the copysign builtin for Aarch64 > similar to how it is done

Re: [PATCH][GCC][PATCHv3] Improve fpclassify w.r.t IEEE like numbers in GIMPLE.

2017-01-19 Thread Joseph Myers
On Thu, 19 Jan 2017, Tamar Christina wrote: > Hi Joseph, > > I made the requested changes and did a quick pass over the rest > of the fp cases. I've no further comments, but watch out for any related test failures being reported. -- Joseph S. Myers jos...@codesourcery.com

[PATCH] PR67085 move comparison functions in heap operations

2017-01-19 Thread Jonathan Wakely
This turns lots and lots of copies into moves, which can make a huge difference to performance (consider a std::function which has to allocate on every copy). PR libstdc++/67085 * include/bits/stl_heap.h (push_heap, __adjust_heap, __pop_heap) (pop_heap, __make_heap, make_h

Re: [PATCH] PR67085 move comparison functions in heap operations

2017-01-19 Thread Jonathan Wakely
On 19/01/17 18:28 +, Jonathan Wakely wrote: @@ -397,7 +401,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION while (__last - __first > 1) { --__last; - std::__pop_heap(__first, __last, __last, __comp); + std::__pop_heap(__first, __last, __last, _GLIBCXX_MOVE(__comp

Re: [Ping~]Re: [5/5][libgcc] Runtime support for AArch64 return address signing (needs new target macros)

2017-01-19 Thread Richard Earnshaw (lists)
On 19/01/17 14:46, Jiong Wang wrote: > Thanks for the review. > > On 19/01/17 14:18, Richard Earnshaw (lists) wrote: >> >>> >>> >>> diff --git a/libgcc/unwind-dw2.c b/libgcc/unwind-dw2.c >>> index >>> 8085a42ace15d53f4cb0c6681717012d906a6d47..cf640135275deb76b820f8209fa51eacfd64c4a2 >>> 100644 >>>

Re: [PATCH] PR67085 move comparison functions in heap operations

2017-01-19 Thread Jonathan Wakely
On 19/01/17 18:50 +, Jonathan Wakely wrote: On 19/01/17 18:28 +, Jonathan Wakely wrote: @@ -397,7 +401,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION while (__last - __first > 1) { --__last; - std::__pop_heap(__first, __last, __last, __comp); + std::__pop_he

[PATCH, configure, libgfortran]: PR78478: Use fpu-generic for x86 when _SOFT_FLOAT is defined

2017-01-19 Thread Uros Bizjak
Hello! Attached patch avoids bootstrap error when building libgfortran for soft-float x86 targets. Configure detects when _SOFT_FLOAT is defined and uses fpu-generic.h instead of fpu-387.h header. The patch also imports ax_check_define.m4 from autoconf archive [1] - the macro is really handy, an

Re: [PATCH] C++: fix fix-it hints for misspellings within explicit namespaces (v2)

2017-01-19 Thread David Malcolm
On Thu, 2017-01-19 at 13:15 -0500, Jason Merrill wrote: > On Wed, Jan 18, 2017 at 5:29 PM, David Malcolm > wrote: > > Here's a version of the patch which simply tweaks > > cp_parser_primary_expression's call to finish_id_expression so that > > it passes the location of the id_expression, rather th

Re: [PATCH, configure, libgfortran]: PR78478: Use fpu-generic for x86 when _SOFT_FLOAT is defined

2017-01-19 Thread Janne Blomqvist
On Thu, Jan 19, 2017 at 10:43 PM, Uros Bizjak wrote: > Hello! > > Attached patch avoids bootstrap error when building libgfortran for > soft-float x86 targets. Configure detects when _SOFT_FLOAT is defined > and uses fpu-generic.h instead of fpu-387.h header. > > The patch also imports ax_check_d

Re: Pretty printers for versioned namespace

2017-01-19 Thread François Dumont
On 10/01/2017 13:39, Jonathan Wakely wrote: I've committed the attached patch, which passes the tests for the default configuration and the versioned namespace configuration. I added another helper function, strip_versioned_namespace, which is more expressive than doing typename.replace(vers_nsp

Re: Pretty printers for versioned namespace

2017-01-19 Thread Jonathan Wakely
On 19/01/17 22:01 +0100, François Dumont wrote: On 10/01/2017 13:39, Jonathan Wakely wrote: I've committed the attached patch, which passes the tests for the default configuration and the versioned namespace configuration. I added another helper function, strip_versioned_namespace, which is mor

[PATCH, i386] Fix PR78478, Compile Error for i386-rtems

2017-01-19 Thread Uros Bizjak
Hello! This patch (partially) reverts my change from 2013-11-05. Apparently, LONG_DOUBLE_TYPE_SIZE interferes with soft-float handling. 2017-01-19 Uros Bizjak PR target/78478 Revert: 2013-11-05 Uros Bizjak * config/i386/rtemself.h (LONG_DOUBLE_TYPE_SIZE): New define. Test

[PATCH, i386]: Remove config/i386/rtems-64.h

2017-01-19 Thread Uros Bizjak
Hello! This file is now the same as config/i386/rtemself.h. Remove one copy. 2017-01-19 Uros Bizjak * config.gcc (x86_64-*-rtems*): Use i386/rtemself.h instead of i386/rtems-64.h. * config/i386/rtems-64.h: Remove. Committed as obvious. Uros. Index: config/i386/rtems-64.h ===

  1   2   >