Re: [PATCH] Fix return type detection in visit()

2017-02-14 Thread Tim Shen via gcc-patches
On Tue, Feb 14, 2017 at 2:49 PM, Jonathan Wakely wrote: > On 14/02/17 13:59 -0800, Tim Shen via libstdc++ wrote: >> >> This is an obvious missing std::forward. :) > > > I was about to look into it, I assumed it would be something simple! > >> diff --git

Re: [v3 PATCH] Implement C++17 GB50 resolution

2017-02-14 Thread Ville Voutilainen
On 14 February 2017 at 23:22, Dinka Ranns wrote: > C++17 GB50 resolution > * libstdc++-v3/include/std/chrono: Pardon me for not noticing this while looking at the earlier versions of this patch, but these should not include the libstdc++-v3 prefix, so

Backports to 6.x

2017-02-14 Thread Jakub Jelinek
Hi! I've bootstrapped/regtested following patches on x86_64-linux and i686-linux on gcc-6-branch and committed them to 6.x. Jakub 2017-02-15 Jakub Jelinek Backported from mainline 2017-01-17 Kito Cheng

Re: [RFC PATCH] Improve switchconv optimization (PR tree-optimization/79472)

2017-02-14 Thread Jakub Jelinek
On Wed, Feb 15, 2017 at 08:06:16AM +0100, Richard Biener wrote: > On February 14, 2017 9:04:45 PM GMT+01:00, Jakub Jelinek > wrote: > >Hi! > > > >The following patch is an attempt to fix a regression where we no > >longer > >switch convert one switch because earlier

Re: [RFC PATCH] Improve switchconv optimization (PR tree-optimization/79472)

2017-02-14 Thread Richard Biener
On February 14, 2017 9:04:45 PM GMT+01:00, Jakub Jelinek wrote: >Hi! > >The following patch is an attempt to fix a regression where we no >longer >switch convert one switch because earlier optimizations turn it into >unsupported shape. Is that because of early threading? >The

[PATCH] Fix DFP conversion from INTEGER_CST to REAL_CST (PR target/79487)

2017-02-14 Thread Jakub Jelinek
Hi! As the following testcase shows, we store decimal REAL_CSTs always in _Decimal128 internal form and perform all the arithmetics on that, but while for arithmetics we then ensure rounding to the actual type (_Decimal{32,64} or for _Decimal128 no further rounding), e.g. const_binop calls

Re: [PATCH] Fix return type detection in visit()

2017-02-14 Thread Jonathan Wakely
On 14/02/17 13:59 -0800, Tim Shen via libstdc++ wrote: This is an obvious missing std::forward. :) I was about to look into it, I assumed it would be something simple! diff --git a/libstdc++-v3/testsuite/20_util/variant/compile.cc b/libstdc++-v3/testsuite/20_util/variant/compile.cc index

patch to fix PR79282

2017-02-14 Thread Vladimir Makarov
The following patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79282 The patch was bootstrapped and tested on x86-64 and tested on ARM. Committed as rev. 245459 Index: ChangeLog === --- ChangeLog (revision 245458)

Re: [PATCH] use zero as the lower bound for a signed-unsigned range (PR 79327)

2017-02-14 Thread Martin Sebor
On 02/14/2017 01:32 PM, Jakub Jelinek wrote: On Tue, Feb 14, 2017 at 12:15:59PM -0700, Martin Sebor wrote: That comment explains how the likely_adjust variable ("the adjustment") is being used, or more precisely, how it was being used in the first version of the patch. The comment became

[PATCH] Fix return type detection in visit()

2017-02-14 Thread Tim Shen via gcc-patches
This is an obvious missing std::forward. :) Testing on x86_64-linux-gnu, but I expect it to pass. -- Regards, Tim Shen commit 08235141a7e06db2b604b5869c9d8e4aaf8fa29b Author: Tim Shen Date: Tue Feb 14 13:55:18 2017 -0800 2017-02-14 Tim Shen

Re: [PATCH, rs6000] Fix RTL definitions of the xvcvsxdsp and xvcvuxdsp instructions

2017-02-14 Thread Segher Boessenkool
On Tue, Feb 14, 2017 at 12:59:27PM -0800, Carl E. Love wrote: > The following patch addresses errors in the RTL define_insn statements > for the xvcvsxdsp and xvcvuxdsp instructions. The RTL defined the > instructions with a V2DF argument and returning V4SI. They should take > a V2DI argument

Re: [RFA][PR tree-optimization/79095] [PATCH 1/4] Improve ranges for MINUS_EXPR and EXACT_DIV_EXPR

2017-02-14 Thread Jeff Law
On 02/14/2017 01:58 AM, Richard Biener wrote: I spoke with Andrew a bit today, he's consistently seeing cases where the union of 3 ranges is necessary to resolve the kinds of queries we're interested in. He's made a design decision not to use anti-ranges in his work, so y'all are in sync on

Re: [PATCH PR79347]Maintain profile counter information in vect_do_peeling

2017-02-14 Thread Pat Haugen
On 02/14/2017 07:57 AM, Jan Hubicka wrote: > So it seems that the frequency of the loop itself is unrealistically scaled > down. > Before vetorizing the frequency is 8500 and predicted number of iterations is > 6.6. Now the loop is intereed via BB 8 with frequency 1148, so the loop, by > exit

[v3 PATCH] Implement C++17 GB50 resolution

2017-02-14 Thread Dinka Ranns
Tested on Linux-x64 Implementation of resolution for C++17 GB50 2017-02-12 Dinka Ranns C++17 GB50 resolution * libstdc++-v3/include/std/chrono: (duration::operator++()): Add constexpr. (duration::operator++(int)): Likewise

[PATCH, rs6000] Fix RTL definitions of the xvcvsxdsp and xvcvuxdsp instructions

2017-02-14 Thread Carl E. Love
GCC Maintainers: The following patch addresses errors in the RTL define_insn statements for the xvcvsxdsp and xvcvuxdsp instructions. The RTL defined the instructions with a V2DF argument and returning V4SI. They should take a V2DI argument and return a V4SF based on the Power ISA document.

Re: [PATCH] use zero as the lower bound for a signed-unsigned range (PR 79327)

2017-02-14 Thread Jakub Jelinek
On Tue, Feb 14, 2017 at 12:15:59PM -0700, Martin Sebor wrote: > That comment explains how the likely_adjust variable ("the adjustment") > is being used, or more precisely, how it was being used in the first > version of the patch. The comment became somewhat out of date with > the committed

[PATCH] rs6000: Fix the vec-adde* testcases once more

2017-02-14 Thread Segher Boessenkool
David found the vec-adde{,c}-int128.c testcases fail on AIX. Those tests should only run on targets that have int128. This also changes the non-int128 testcases to check for the hardware they require. Tested on powerpc64-linux {-m32,-m64} and powerpc64le-linux; committing to trunk. Segher

[C++ RFC] Fix up attribute handling in templates (PR c++/79502)

2017-02-14 Thread Jakub Jelinek
Hi! The following testcase fails, because while we have the nodiscard attribute on the template, we actually never propagate it to the instantiation, which is where it is checked (I'm really surprised about this). Unfortunately, this patch regresses FAIL: g++.dg/ext/visibility/template8.C

Re: [PATCH] suppress unhelpful -Wformat-truncation=2 INT_MAX warning (PR 79448)

2017-02-14 Thread Martin Sebor
On 02/13/2017 04:33 PM, Jeff Law wrote: On 02/10/2017 10:55 AM, Martin Sebor wrote: The recent Fedora mass rebuild revealed that the Wformat-truncation=2 checker is still a bit too aggressive and complains about potentially unbounded strings causing subsequent directives t exceed the INT_MAX

Re: [PATCH] portability fix for gcc.dg/strncmp-2.c testcase

2017-02-14 Thread David Edelsohn
On Tue, Feb 14, 2017 at 2:24 PM, Aaron Sawdey wrote: > On Tue, 2017-02-14 at 13:09 -0600, Segher Boessenkool wrote: >> On Tue, Feb 14, 2017 at 11:56:50AM -0600, Aaron Sawdey wrote: >> > This testcase I added failed to compile on AIX or older linux due >> > to >> > the

[RFC PATCH] Improve switchconv optimization (PR tree-optimization/79472)

2017-02-14 Thread Jakub Jelinek
Hi! The following patch is an attempt to fix a regression where we no longer switch convert one switch because earlier optimizations turn it into unsupported shape. The patch contains two important changes (that can perhaps be split off separately): 1) handle virtual PHIs; while because we

[committed] Fix memory leak in oacc code (PR middle-end/79505)

2017-02-14 Thread Jakub Jelinek
Hi! We leak the loop->ifns vectors, fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk. The first 2 hunks are just cleanup, loop is allocated using XCNEW and thus cleared, no need to clear anything again (especially when it isn't all but just random subset of

Re: [PATCH] portability fix for gcc.dg/strncmp-2.c testcase

2017-02-14 Thread Aaron Sawdey
On Tue, 2017-02-14 at 13:09 -0600, Segher Boessenkool wrote: > On Tue, Feb 14, 2017 at 11:56:50AM -0600, Aaron Sawdey wrote: > > This testcase I added failed to compile on AIX or older linux due > > to > > the use of aligned_alloc(). Now fixed to use posix_memalign if > > available, and valloc

Re: [PATCH] use zero as the lower bound for a signed-unsigned range (PR 79327)

2017-02-14 Thread Martin Sebor
On 02/14/2017 09:39 AM, Jakub Jelinek wrote: On Tue, Feb 14, 2017 at 09:36:44AM -0700, Martin Sebor wrote: @@ -1371,7 +1354,8 @@ format_integer (const directive , tr else { res.range.likely = res.range.min; - if (likely_adjust && maybebase && base != 10) + if (maybebase

Re: [PATCH] portability fix for gcc.dg/strncmp-2.c testcase

2017-02-14 Thread Segher Boessenkool
On Tue, Feb 14, 2017 at 11:56:50AM -0600, Aaron Sawdey wrote: > This testcase I added failed to compile on AIX or older linux due to > the use of aligned_alloc(). Now fixed to use posix_memalign if > available, and valloc otherwise. > > Now it compiles and passes on x86_64 (fedora 25), ppc64

RE: [PATCH 3/5] Support WORD_REGISTER_OPERATIONS requirements in simplify_operand_subreg

2017-02-14 Thread Matthew Fortune
Sorry for the slow reply, been away for a few days Eric Botcazou writes: > > This patch is a minimal change to prevent (subreg(mem)) from being > > simplified to use the outer mode for WORD_REGISTER_OPERATIONS. There > > is high probability of refining and/or

Re: [ARM] Enable descriptors for nested functions in Ada

2017-02-14 Thread Eric Botcazou
> Is this ABI, or private to a release of the compiler? If the latter, > then OK. Otherwise, I don't think we should presume that the reserved > bits won't get used. The latter, there is no fixed ABI for Ada. -- Eric Botcazou

Re: [Aarch64] Enable descriptors for nested functions in Ada

2017-02-14 Thread Eric Botcazou
> Doesn't this imply a minimum function alignment of 8? That's not guaranteed > on AArch64, at least -mcpu=exynos-m1 uses 4-byte alignment. Well, the initial setting was 2, which would have required 4-byte alignment only and would have been perfectly fine IMO, but it was deemed problematic,

[PATCH] portability fix for gcc.dg/strncmp-2.c testcase

2017-02-14 Thread Aaron Sawdey
This testcase I added failed to compile on AIX or older linux due to the use of aligned_alloc(). Now fixed to use posix_memalign if available, and valloc otherwise. Now it compiles and passes on x86_64 (fedora 25), ppc64 (RHEL6.8), and AIX. OK for trunk? 2017-02-14  Aaron Sawdey  

[PATCH, i386]: Fix PR61225, -fshrink-wrap interference with RMW peepholes

2017-02-14 Thread Uros Bizjak
Hello! It turned out that with gcc.target/i386/pr49095.c, the default -fshrink-wrap setting interferes with short testcases that test various read-modify-write peephole patterns. Use -fno-shrink-wrap to keep correct RTL sequences that test the transformation. 2017-02-14 Uros Bizjak

[PATCH, i386]: Fix PR79495, ICE in extract_constrain_insn with -msoft-float

2017-02-14 Thread Uros Bizjak
Attached patch adds correct alternative fo 64-bit targets. On these targets, we have to prevent alternatives that split to moves from DImode immediates outside signed 32-bit range to a memory. 2017-02-14 Uros Bizjak PR target/79495 * config/i386/i386.md

Re: C++ PATCH to fix a couple of ice-on-invalid with incomplete type (PR c++/79420, c++/79463)

2017-02-14 Thread Jason Merrill
OK. On Tue, Feb 14, 2017 at 11:40 AM, Marek Polacek wrote: > In both these PRs the problem is the same: we have a non-dependent incomplete > postfix expression in a template, and since r245223 we treat it as dependent > (with a pedwarn), and erase its type. For OVERLOADs

[PATCH] PR target/79498: Properly store 128-bit constant in large model

2017-02-14 Thread H.J. Lu
When converting TI store with CONST_INT to V1TI store with CONST_VECTOR in large model, an extra instruction may be needed to load CONST_VECTOR into a register. Insert the extra instruction to the right place. Tested on x86-64. I am checking in this pre-approved patch. Thanks. H.J. --- gcc/

C++ PATCH to fix a couple of ice-on-invalid with incomplete type (PR c++/79420, c++/79463)

2017-02-14 Thread Marek Polacek
In both these PRs the problem is the same: we have a non-dependent incomplete postfix expression in a template, and since r245223 we treat it as dependent (with a pedwarn), and erase its type. For OVERLOADs this is bad because we'll hit this in tsubst_copy: case OVERLOAD: /* An

Re: [PATCH] use zero as the lower bound for a signed-unsigned range (PR 79327)

2017-02-14 Thread Jakub Jelinek
On Tue, Feb 14, 2017 at 09:36:44AM -0700, Martin Sebor wrote: > > @@ -1371,7 +1354,8 @@ format_integer (const directive , tr > >else > > { > >res.range.likely = res.range.min; > > - if (likely_adjust && maybebase && base != 10) > > + if (maybebase && base != 10 > > +

Re: [PATCH][RFA][target/79404] Fix uninitialized reference to ira_register_move_cost[mode]

2017-02-14 Thread Vladimir Makarov
On 02/14/2017 01:30 AM, Jeff Law wrote: So imagine we have two allocnos related by a copy chain (two operand architecture). (gdb) p *cp->first $11 = {num = 9, regno = 33, mode = DImode, wmode = DImode, aclass = GENERAL_REGS, dont_reassign_p = 0, bad_spill_p = 0, assigned_p = 1,

Re: [PATCH] use zero as the lower bound for a signed-unsigned range (PR 79327)

2017-02-14 Thread Martin Sebor
On 02/14/2017 12:18 AM, Jakub Jelinek wrote: On Mon, Feb 13, 2017 at 04:53:19PM -0700, Jeff Law wrote: dirtype is one of the standard {un,}signed {char,short,int,long,long long} types, all of them have 0 in their ranges. For VR_RANGE we almost always set res.knownrange to true: /* Set

[PATCH] rs6000: Synchronize the --with-cpu list in config.gcc with reality

2017-02-14 Thread Segher Boessenkool
power, power2, rios, rios1, rios2, rsc, rsc2 support was removed. rs64a never was a supported option; it's spelled rs64. power5+ and powerpc64le are supported options but could not be set as default. Segher 2017-02-13 Segher Boessenkool * config.gcc

Re: [PATCH][GRAPHITE] Use generic isl-val interface, not gmp special one

2017-02-14 Thread Richard Biener
On February 14, 2017 4:50:32 PM GMT+01:00, Sebastian Pop wrote: >On Tue, Feb 14, 2017 at 7:09 AM, Richard Biener >wrote: >> >> This removes all GMP code from graphite and instead arranges to use >> widest_ints plus the generic ISL interface for

Re: [PATCH] Fix PR79460

2017-02-14 Thread Richard Biener
On February 14, 2017 4:19:05 PM GMT+01:00, "Bin.Cheng" wrote: >On Tue, Feb 14, 2017 at 2:48 PM, Richard Biener >wrote: >> >> The following enables final value replacement for floating point >> expressions if -funsafe-math-optimizations is set (that's

Re: [Aarch64] Enable descriptors for nested functions in Ada

2017-02-14 Thread Wilco Dijkstra
On 13/11/16 22:30, Eric Botcazou wrote: > +/* The architecture reserves bits 0 and 1 so use bit 2 for descriptors. */ > +#undef TARGET_CUSTOM_FUNCTION_DESCRIPTORS > +#define TARGET_CUSTOM_FUNCTION_DESCRIPTORS 4 Doesn't this imply a minimum function alignment of 8? That's not guaranteed on

[Committed] S/390: Cleanup: Remove builtin type flags.

2017-02-14 Thread Andreas Krebbel
With the target attribute stuff the only user of the builtin types flags value has been removed. So drop that value from the builtin types list entirely. gcc/ChangeLog: 2017-02-14 Andreas Krebbel * config/s390/s390-builtin-types.def: Remove flags

Re: [PATCH] rs6000: Mark powerpc*-*-*spe* as obsolete

2017-02-14 Thread David Edelsohn
On Tue, Feb 14, 2017 at 10:22 AM, Segher Boessenkool wrote: > As discussed in . > > Is this okay for trunk? > > > Segher > > > 2017-02-14 Segher Boessenkool > > * config.gcc

[PATCH] rs6000: Mark powerpc*-*-*spe* as obsolete

2017-02-14 Thread Segher Boessenkool
As discussed in . Is this okay for trunk? Segher 2017-02-14 Segher Boessenkool * config.gcc (Obsolete configurations): Add powerpc*-*-*spe* . --- gcc/config.gcc | 2 +- 1 file changed, 1 insertion(+),

Re: [PATCH] Fix PR79460

2017-02-14 Thread Bin.Cheng
On Tue, Feb 14, 2017 at 2:48 PM, Richard Biener wrote: > > The following enables final value replacement for floating point > expressions if -funsafe-math-optimizations is set (that's the > flag the reassoc pass controls similar transforms on). Looks to me it's kind of abusing

Re: [PATCH] Fix PR79460

2017-02-14 Thread Richard Biener
On Tue, 14 Feb 2017, Jakub Jelinek wrote: > On Tue, Feb 14, 2017 at 03:48:38PM +0100, Richard Biener wrote: > > 2017-02-14 Richard Biener > > > > PR tree-optimization/79460 > > * tree-scalar-evolution.c (final_value_replacement_loop): Also > > allow final value

Re: Patch ping^2

2017-02-14 Thread Nathan Sidwell
On 02/13/2017 10:46 AM, Jakub Jelinek wrote: Hi! I'd like to ping a couple of patches: - C++ P1 PR79288 - wrong default TLS model for __thread static data members http://gcc.gnu.org/ml/gcc-patches/2017-01/msg02349.html This is ok, but don't you think the changelog is misleading? In your

Re: [PATCH] Fix PR79460

2017-02-14 Thread Jakub Jelinek
On Tue, Feb 14, 2017 at 03:48:38PM +0100, Richard Biener wrote: > 2017-02-14 Richard Biener > > PR tree-optimization/79460 > * tree-scalar-evolution.c (final_value_replacement_loop): Also > allow final value replacement of floating point expressions. > >

[PATCH] Improve unroller size estimate

2017-02-14 Thread Richard Biener
The following patch improves the constant_after_peeling estimate of the GIMPLE unroller by not requiring a strictly "simple-iv" but an evolution w/o symbols. It also avoids computing any of this for ops defined in a subloop of the loop we unroll (that only yields garbage). So it makes

Re: [ARM] Enable descriptors for nested functions in Ada

2017-02-14 Thread Richard Earnshaw (lists)
On 13/11/16 22:31, Eric Botcazou wrote: > Similarly to x86, PowerPC and SPARC, this enables the use of custom run-time > descriptors in Ada, thus eliminating the need for trampolines and executable > stack in presence of pointers to nested functions. > > This still uses bit 1 for the run-time

Re: [Aarch64] Enable descriptors for nested functions in Ada

2017-02-14 Thread Richard Earnshaw (lists)
On 13/11/16 22:30, Eric Botcazou wrote: > Similarly to x86, PowerPC and SPARC, this enables the use of custom run-time > descriptors in Ada, thus eliminating the need for trampolines and executable > stack in presence of pointers to nested functions. > > Tested on Aarch64/Linux, OK for the

[PATCH] Fix PR79460

2017-02-14 Thread Richard Biener
The following enables final value replacement for floating point expressions if -funsafe-math-optimizations is set (that's the flag the reassoc pass controls similar transforms on). Bootstrapped / tested on x86_64-unknown-linux-gnu, queued for GCC 8. Richard. 2017-02-14 Richard Biener

Re: [PATCH][testsuite] Require shared effective target for some lto.exp tests

2017-02-14 Thread Richard Earnshaw (lists)
On 24/01/17 14:16, Kyrill Tkachov wrote: > Hi all, > > The tests in this patch fail for me on aarch64-none-elf with: > relocation R_AARCH64_ADR_PREL_PG_HI21 against external symbol > `_impure_ptr' can not be used when making a shared object; recompile > with -fPIC > > I believe since the tests

Re: [Patch AArch64] Use 128-bit vectors when autovectorizing 16-bit float types

2017-02-14 Thread Richard Earnshaw (lists)
On 23/01/17 11:23, James Greenhalgh wrote: > > Hi, > > As subject, we have an oversight in aarch64_simd_container_mode for > HFmode inputs. This results in trunk only autovectorizing to a 64-bit vector, > rather than a full 128-bit vector. > > The fix is obvious, we just need to handle HFmode,

Re: [PATCH PR79347]Maintain profile counter information in vect_do_peeling

2017-02-14 Thread Bin.Cheng
On Tue, Feb 14, 2017 at 1:57 PM, Jan Hubicka wrote: >> Thanks, >> bin >> 2017-02-13 Bin Cheng >> >> PR tree-optimization/79347 >> * tree-vect-loop-manip.c (apply_probability_for_bb): New function. >> (vect_do_peeling): Maintain profile

Re: [PATCH/AARCH64] Change -mcpu=thunderx2t99 's -mcpu=native support

2017-02-14 Thread Richard Earnshaw (lists)
On 06/02/17 06:20, Andrew Pinski wrote: > Hi, > When I implemented the -mcpu=thunderx2t99 I did not have the Cavium > partno for ThunderX CN99xx, only the original part no. This patch > adds the new part no for the future versions of the chip. > > OK? Bootstrapped and tested on

Re: [PATCH PR79347]Maintain profile counter information in vect_do_peeling

2017-02-14 Thread Jan Hubicka
> Thanks, > bin > 2017-02-13 Bin Cheng > > PR tree-optimization/79347 > * tree-vect-loop-manip.c (apply_probability_for_bb): New function. > (vect_do_peeling): Maintain profile counters during peeling. > > gcc/testsuite/ChangeLog > 2017-02-13 Bin Cheng

Re: [PATCH] use zero as the lower bound for a signed-unsigned range (PR 79327)

2017-02-14 Thread Jakub Jelinek
On Tue, Feb 14, 2017 at 08:18:13AM +0100, Jakub Jelinek wrote: > On Mon, Feb 13, 2017 at 04:53:19PM -0700, Jeff Law wrote: > > > dirtype is one of the standard {un,}signed {char,short,int,long,long long} > > > types, all of them have 0 in their ranges. > > > For VR_RANGE we almost always set

Re: [RFA][PR tree-optimization/79095] [PATCH 1/4] Improve ranges for MINUS_EXPR and EXACT_DIV_EXPR V3

2017-02-14 Thread Richard Biener
On Tue, Feb 14, 2017 at 7:53 AM, Jeff Law wrote: > > This is the first patch in the series with Richi's comments from last week > addressed. #2, #3 and #4 were unchanged. > > Richi asked for the EXACT_DIV_EXPR handling in > extract_range_from_binary_exit_1 to move out one IF

Re: [RFA][PR tree-optimization/79095][PATCH 4/4] Tests

2017-02-14 Thread Richard Biener
On Tue, Feb 7, 2017 at 7:32 PM, Jeff Law wrote: > > This is unchanged from the original posting. Reposting to make review > easier. > > > The tests in g++.dg start with a reduced test from Martin (pr79095-1.C) that > includes a size check. With the size != 0 check this testcase

Re: [RFA] [PR tree-optimization/79095][PATCH 3/4] Improve ASSERT_EXPRs and simplification of overflow tests V2

2017-02-14 Thread Richard Biener
On Tue, Feb 7, 2017 at 7:32 PM, Jeff Law wrote: > This patch addresses issues Richi raised from V1. Specifically the users of > overflow_comparison_1 don't need to worry about trying both the original > comparison and the reversed comparison. This slightly simplifies the >

Re: [RFA] [PR tree-optimization/79095][PATCH 2/4] Add infrastructure to detect overflow checks V2

2017-02-14 Thread Richard Biener
On Tue, Feb 7, 2017 at 7:32 PM, Jeff Law wrote: > > This patch addresses issues Richi raised from V1. Specifically it relieves > the callers from having to try op0 COND op1 and op1 COND' op0 separately and > adds some additional comments about motivation. There may have been

Re: [PATCH] Fix memory leak in LTO

2017-02-14 Thread Richard Biener
On Tue, Feb 14, 2017 at 12:28 PM, Martin Liška wrote: > Hi. > > The patch fixes: > > ==137424== 24 bytes in 1 blocks are definitely lost in loss record 23 of 748 > > ==137424==at 0x4C29110: malloc (in > /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) > > ==137424==

Re: Fix profile updating after outer loop unswitching

2017-02-14 Thread Richard Biener
On Tue, Feb 14, 2017 at 12:22 PM, Martin Liška wrote: > On 02/05/2017 06:28 PM, Jan Hubicka wrote: >> + /* ... finally scale everything in the loop except for guarded basic >> blocks >> + where profile does not change. */ >> + basic_block *body = get_loop_body (loop); > >

[PATCH][GRAPHITE] Use generic isl-val interface, not gmp special one

2017-02-14 Thread Richard Biener
This removes all GMP code from graphite and instead arranges to use widest_ints plus the generic ISL interface for building/creating vals by pieces. This removes one gmp allocation per conversion plus allows ISL to be built with IMath or IMath with small integer optimization (on the host or

[PATCH PR79347]Maintain profile counter information in vect_do_peeling

2017-02-14 Thread Bin Cheng
Hi, This patch fixes issue reported by PR79347 by calculating/maintaining profile counter information on the fly in vect_do_peeling. Due to the order that we first peel prologue loop, peel epilogue loop, and then add guarding edge skipping prolog+vector loop if niter is small, this patch takes

Re: [gomp4] Async related additions to OpenACC runtime library

2017-02-14 Thread Chung-Lin Tang
On 2017/2/14 07:25 PM, Thomas Schwinge wrote: > Hi Chung-Lin! > > On Mon, 13 Feb 2017 18:13:42 +0800, Chung-Lin Tang > wrote: >> Tested and committed to gomp-4_0-branch. > > Thanks! (Not yet reviewed.) Testing this, I saw a lot of regressions, > and in r245427 just

[PATCH] Fix memory leak in LTO

2017-02-14 Thread Martin Liška
Hi. The patch fixes: ==137424== 24 bytes in 1 blocks are definitely lost in loss record 23 of 748 ==137424==at 0x4C29110: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==137424==by 0x10C39D7: xmalloc (xmalloc.c:147) ==137424==by 0x10C3AE9: xstrdup

Re: [gomp4] Async related additions to OpenACC runtime library

2017-02-14 Thread Thomas Schwinge
Hi Chung-Lin! On Mon, 13 Feb 2017 18:13:42 +0800, Chung-Lin Tang wrote: > Tested and committed to gomp-4_0-branch. Thanks! (Not yet reviewed.) Testing this, I saw a lot of regressions, and in r245427 just committed the following to gomp-4_0-branch to address

Re: Fix profile updating after outer loop unswitching

2017-02-14 Thread Martin Liška
On 02/05/2017 06:28 PM, Jan Hubicka wrote: > + /* ... finally scale everything in the loop except for guarded basic blocks > + where profile does not change. */ > + basic_block *body = get_loop_body (loop); Hello. This hunk causes a new memory leak: ==24882== 64 bytes in 1 blocks are

Re: [PATCH] Fix exception handling for ILP32 aarch64

2017-02-14 Thread Richard Earnshaw (lists)
On 07/02/17 23:11, Steve Ellcey wrote: > This patch was submitted last year by Andrew Pinski, this is a > resubmit/ping of that patch. > > https://gcc.gnu.org/ml/gcc-patches/2016-04/msg01726.html > > During the initial submittal James Greenhalgh asked if this was an ABI change. > I do not

Re: [RFA][PR tree-optimization/79095] [PATCH 1/4] Improve ranges for MINUS_EXPR and EXACT_DIV_EXPR V2

2017-02-14 Thread Marc Glisse
On Mon, 13 Feb 2017, Jeff Law wrote: On 02/13/2017 09:15 AM, Marc Glisse wrote: On Mon, 13 Feb 2017, Jeff Law wrote: On 02/12/2017 12:13 AM, Marc Glisse wrote: On Tue, 7 Feb 2017, Jeff Law wrote: * tree-vrp.c (extract_range_from_binary_expr_1): For EXACT_DIV_EXPR, if the numerator has the

Re: [PATCH, GCC/x86 mingw32] Add configure option to force wildcard behavior on Windows

2017-02-14 Thread JonY
On 02/14/2017 09:32 AM, Thomas Preudhomme wrote: >> >> Looks good, be sure to emphasize this option affects mingw hosted GCC >> only, not the compiler output. > > I think that should be pretty clear in the latest version of the patch, > doc/install.texi contains: > > "Note that this option only

Re: [PATCH][ARM] PR rtl-optimization/68664 Implement TARGET_SCHED_CAN_SPECULATE_INSN hook

2017-02-14 Thread Richard Earnshaw (lists)
On 14/02/17 10:11, Kyrill Tkachov wrote: > Hi all, > > And this is the arm implementation of the hook. It is the same as the > aarch64 one since the two ports > share their instruction types for scheduling purposes. > > Bootstrapped and tested on arm-none-linux-gnueabihf. > > Ok for trunk? > >

Re: [PATCH][AArch64] PR rtl-optimization/68664 Implement TARGET_SCHED_CAN_SPECULATE_INSN hook

2017-02-14 Thread Richard Earnshaw (lists)
On 14/02/17 10:08, Kyrill Tkachov wrote: > Hi all, > > Following up from Segher's patch here is the aarch64 implementation of > the new hook. > It forbids speculation of the integer and floating-point division > instructions as well as the > square-root instructions. > > With this patch the

[PATCH][ARM] PR rtl-optimization/68664 Implement TARGET_SCHED_CAN_SPECULATE_INSN hook

2017-02-14 Thread Kyrill Tkachov
Hi all, And this is the arm implementation of the hook. It is the same as the aarch64 one since the two ports share their instruction types for scheduling purposes. Bootstrapped and tested on arm-none-linux-gnueabihf. Ok for trunk? Thanks, Kyrill 2016-02-07 Kyrylo Tkachov

[PATCH][AArch64] PR rtl-optimization/68664 Implement TARGET_SCHED_CAN_SPECULATE_INSN hook

2017-02-14 Thread Kyrill Tkachov
Hi all, Following up from Segher's patch here is the aarch64 implementation of the new hook. It forbids speculation of the integer and floating-point division instructions as well as the square-root instructions. With this patch the fsqrt is not speculated and the preformance on the code in

[PATCH PR71437/V2]Simplify cond with assertions in threading

2017-02-14 Thread Bin Cheng
Hi, This is the second try fixing PR71437. The old version patch tried to fix issue in VRP but it requires further non-trivial change in VRP, specifically, to better support variable value ranges. This is not appropriate at stage 4. Alternatively, this patch tries to fix issue by improving

Re: [PATCH] Fix PR70022

2017-02-14 Thread Richard Biener
On Tue, 14 Feb 2017, Martin Liška wrote: > Hi. > > As mentioned in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79498#c5, the > hunk in fold-const.c > was not properly applied to GCC 5 branch. I've just tested the branch with > the patch. > > Ready to install the hunk? Sure - not sure how I

Re: [PATCH] Fix PR70022

2017-02-14 Thread Martin Liška
Hi. As mentioned in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79498#c5, the hunk in fold-const.c was not properly applied to GCC 5 branch. I've just tested the branch with the patch. Ready to install the hunk? Thanks, Martin

Re: [PATCH, GCC/x86 mingw32] Add configure option to force wildcard behavior on Windows

2017-02-14 Thread Thomas Preudhomme
Hi Jonathan, Sorry for the delay answering. On 07/02/17 08:47, JonY wrote: On 01/26/2017 01:04 PM, Thomas Preudhomme wrote: Hi JonY, On 19/01/17 01:37, JonY wrote: On 01/18/2017 09:48 AM, Thomas Preudhomme wrote: By default, wildcard support on Windows for programs compiled with mingw

RE: [PATCH] [X86_64] Fix alignment for znver1 arch.

2017-02-14 Thread Kumar, Venkataramanan
Thanks Uros, I committed on Amit's behalf. https://gcc.gnu.org/viewcvs/gcc?view=revision=245423 regards, venkat. > -Original Message- > From: Uros Bizjak [mailto:ubiz...@gmail.com] > Sent: Tuesday, February 14, 2017 2:43 PM > To: Pawar, Amit > Cc:

Re: [PATCH] Add missing _mm512_prefetch_i{32,64}gather_{pd,ps} (PR target/79481)

2017-02-14 Thread Uros Bizjak
On Mon, Feb 13, 2017 at 8:35 PM, Jakub Jelinek wrote: > Hi! > > As mentioned in the PR, ICC as well as clang have these non-masked > gather prefetch intrinsics in addition to masked (and for scatter > even GCC has both masked and non-masked), but GCC does not (the > SDM actually

Re: [PATCH] [X86_64] Fix alignment for znver1 arch.

2017-02-14 Thread Uros Bizjak
On Tue, Feb 14, 2017 at 8:48 AM, Pawar, Amit wrote: > Hi maintainers, > > Please find the below patch which changes the code alignment values for > znver1. Bootstrap and regression test passed on x86_64. > OK to apply? OK. Thanks, Uros. > Thanks, > Amit Pawar > > > diff

Re: [Fortran, Patch, CAF] Failed Images patch (TS 18508)

2017-02-14 Thread Andre Vehreschild
Hi Alessandro, thanks for the patch. Some polishing is still necessary: Running in the source directory of gcc: contrib/check_GNU_style.sh resurrected_patch_and_tests_REV1.diff gives about 10 issues. Please correct them before applying. Style in gfortran helps readability. In

Re: [RFA][PR tree-optimization/79095] [PATCH 1/4] Improve ranges for MINUS_EXPR and EXACT_DIV_EXPR

2017-02-14 Thread Richard Biener
On Tue, Feb 14, 2017 at 12:19 AM, Jeff Law wrote: > On 02/07/2017 01:39 AM, Richard Biener wrote: >> >> On Mon, Feb 6, 2017 at 10:57 PM, Jeff Law wrote: >>> >>> On 02/06/2017 08:33 AM, Richard Biener wrote: >>> ah, indeed vr0type is VR_ANTI_RANGE and yes we

Re: [PATCH] Fix buffer overflow in SH expand_cbranchdi4 (PR target/79462)

2017-02-14 Thread Oleg Endo
On Tue, 2017-02-14 at 09:22 +0100, Jakub Jelinek wrote: > Hi! > > The following patch fixes a buffer overflow in the SH backend. > r235698 removed an operand (clobber of match_scratch) from the > various > cbranch pattersn that called expand_cbranchdi4 as well as all but > one references to

Re: [PATCH] Fix PR56888

2017-02-14 Thread Richard Biener
On Tue, Feb 23, 2016 at 12:32 PM, Richard Biener wrote: > On Tue, 23 Feb 2016, Jan Hubicka wrote: > >> > >> > Ok, so maybe a better question to symtab would be if there is an >> > actual definition for what __builtin_FOO will call. Not really >> > whether that definition is

[PATCH] Fix buffer overflow in SH expand_cbranchdi4 (PR target/79462)

2017-02-14 Thread Jakub Jelinek
Hi! The following patch fixes a buffer overflow in the SH backend. r235698 removed an operand (clobber of match_scratch) from the various cbranch pattersn that called expand_cbranchdi4 as well as all but one references to operands[4] in that code. Now that the insn only has 4 operands, clearing

Re: [PATCH] Improve x % y to x VRP optimization (PR tree-optimization/79408)

2017-02-14 Thread Richard Biener
On Mon, 13 Feb 2017, Jakub Jelinek wrote: > On Mon, Feb 13, 2017 at 12:24:08PM +0100, Richard Biener wrote: > > You'd of course allocate it on the stack. But yeah, sth like your patch > > works for me. > > Now bootstrapped/regtested successfully on x86_64-linux and i686-linux. > So is this ok