[PING][PATCH][AArch64] Add addr_type attribute

2017-04-24 Thread Hurugalawadi, Naveen
Hi, Please consider this as a personal reminder to review the patch at following link and let me know your comments on the same. https://gcc.gnu.org/ml/gcc-patches/2017-03/msg00222.html Thanks, Naveen

[PING] [PATCH] [AArch64] PR target/71663 Improve Vector Initializtion

2017-04-24 Thread Hurugalawadi, Naveen
Hi, Please consider this as a personal reminder to review the patch at following link and let me know your comments on the same. https://gcc.gnu.org/ml/gcc-patches/2016-12/msg00718.html Thanks, Naveen

Re: PR79697: Delete calls to strdup, strndup, realloc if there is no lhs

2017-04-24 Thread Prathamesh Kulkarni
On 25 April 2017 at 02:41, Jeff Law wrote: > On 02/25/2017 01:40 AM, Prathamesh Kulkarni wrote: >> >> Hi, >> The attached patch deletes calls to strdup, strndup if it's >> return-value is unused, >> and same for realloc if the first arg is NULL. >> Bootstrap+tested on x86_64-unknown-linux-gnu. >>

Add support for use_hazard_barrier_return function attribute

2017-04-24 Thread Prachi Godbole
This patch adds support for function attribute __attribute__ ((use_hazard_barrier_return)). The attribute will generate hazard barrier return (jr.hb) instead of a normal return instruction. Changelog: 2017-04-25 Prachi Godbole gcc/ * config/mips/mips.h (machine_function): New varia

Re: [PATCH, rs6000] pr80482 Relax vector builtin parameter checks

2017-04-24 Thread Segher Boessenkool
On Mon, Apr 24, 2017 at 05:38:58PM -0500, Bill Seurer wrote: > [PATCH, rs6000] pr80482 Relax vector builtin parameter checks > > This patch changes the parameter testing for powerpc vector builtins to relax > the existing requirement that the parameters be identical to instead that they > be compa

[PATCH] avoid assuming all integers are representable in HOST_WIDE_INT (PR #80497)

2017-04-24 Thread Martin Sebor
Bug 80497 brings to light that my fix for PR 80364 where I corrected the handling for int128_t was incomplete. I handled the non-constant case but missed the INTEGER_CST case just a few lines above. The attached patch also corrects that problem plus one more elsewhere in the pass. Both of the c

Re: [PATCH, rs6000] pr80482 Relax vector builtin parameter checks

2017-04-24 Thread Jakub Jelinek
On Mon, Apr 24, 2017 at 05:38:58PM -0500, Bill Seurer wrote: > [PATCH, rs6000] pr80482 Relax vector builtin parameter checks > > This patch changes the parameter testing for powerpc vector builtins to relax > the existing requirement that the parameters be identical to instead that they > be compa

[PATCH, rs6000] pr80482 Relax vector builtin parameter checks

2017-04-24 Thread Bill Seurer
[PATCH, rs6000] pr80482 Relax vector builtin parameter checks This patch changes the parameter testing for powerpc vector builtins to relax the existing requirement that the parameters be identical to instead that they be compatible. This allows for mixing parameters with differing qualified (con

Re: [PATCH] Fix make_compound_operation in COMPAREs (PR rtl-optimization/80501)

2017-04-24 Thread Segher Boessenkool
Hi Jakub, On Mon, Apr 24, 2017 at 11:23:42PM +0200, Jakub Jelinek wrote: > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk/7.1? Yes, okay everywhere, thank you for fixing it! Segher > 2017-04-24 Jakub Jelinek > > PR rtl-optimization/80501 > * combine.c (make

Re: RFC: seeking insight on store_data_bypass_p (recog.c)

2017-04-24 Thread Jeff Law
On 04/14/2017 09:58 AM, Richard Sandiford wrote: .md files do have the option of using a single rtl instruction to represent a sequence of several machine instructions but: (a) they're then effectively asking the target-independent code to treat the sequence "as-if" it was a single indivis

Re: [PATCH][libgcc, fuchsia]

2017-04-24 Thread Jeff Law
On 01/17/2017 11:40 AM, Josh Conner via gcc-patches wrote: The attached patch adds fuchsia support to libgcc. OK for trunk? Thanks - Josh 2017-01-17 Joshua Conner * config/arm/unwind-arm.h (_Unwind_decode_typeinfo_ptr): Use pc-relative indirect handling for fuchsia. * confi

Re: [PATCH 3/7] [D] libiberty: Recognize anonymous symbols names.

2017-04-24 Thread Jeff Law
On 04/15/2017 09:21 AM, Iain Buclaw wrote: This implements another previously undocumented part of the D ABI spec, where symbols with no name are always encoded into the mangled name. SymbolName: LName TemplateInstanceName 0 // anonymous symbols This

Re: [PATCH 2/7] [D] libiberty: Add support for demangling template constraints.

2017-04-24 Thread Jeff Law
On 04/15/2017 09:20 AM, Iain Buclaw wrote: This implements a previously an undocumented part of the D ABI spec, where symbols instantiated inside a template constraint are given a different prefix. In practise however this should never be encountered, as such instantiations are normally consider

Re: [PATCH] handle enumerated types in -Wformat-overflow (PR 80397)

2017-04-24 Thread Jeff Law
On 04/11/2017 12:57 PM, Martin Sebor wrote: In a review of my fix for bug 80364 Jakub pointed out that to determine whether an argument to an integer directive is of an integer type the gimple-ssa-sprintf pass tests the type code for equality to INTEGER_TYPE when it should instead be using INTEGR

Re: [PATCH] Fix rtl sharing issue in RTL loop unroller (PR rtl-optimization/80500)

2017-04-24 Thread Jeff Law
On 04/24/2017 03:13 PM, Jakub Jelinek wrote: Hi! The following testcase ICEs, because ve->reg is a SUBREG and thus should not be shared, but we initialize sum to ve->reg, then add to it some REGs (which can be shared always), and finally assign the addition etc. result into ve->reg. Fixed thusl

[PATCH] Fix make_compound_operation in COMPAREs (PR rtl-optimization/80501)

2017-04-24 Thread Jakub Jelinek
Hi! For SUBREGs, make_compound_operation* recurses on the SUBREG_REG. If the original in_code is EQ (i.e. equality comparison against 0) or SET, we handle it correctly, but as the following testcase shows, for COMPARE (some other comparison against 0) we in some cases don't. The problem is that t

Re: [PATCH 1/7] [D] libiberty: Add support for demangling scope attributes.

2017-04-24 Thread Jeff Law
On 04/15/2017 09:19 AM, Iain Buclaw wrote: The next version of D adds a new `scope' function attribute. This adds support for demangling them. --- 01-d-demangle-scope-postfix.patch commit 15a0592cf6403fccbf43f3c7dc44f7d22c0f3dfa Author: Iain Buclaw Date: Sat Apr 15 11:15:41 2017 +0200

Re: [PATCH GCC8][02/33]Remove code handling pseudo candidate

2017-04-24 Thread Jeff Law
On 04/18/2017 04:38 AM, Bin Cheng wrote: Hi, We don't have pseudo candidate nowadays, so remove any related code. Is it OK? Thanks, bin 2017-04-11 Bin Cheng * tree-ssa-loop-ivopts.c (get_computation_cost_at): Remove pseudo iv_cand code. (determine_group_iv_cost_cond

Re: [PATCH GCC8][01/33]Handle TRUNCATE between tieable modes in rtx_cost

2017-04-24 Thread Jeff Law
On 04/18/2017 04:37 AM, Bin Cheng wrote: Is it OK? Thanks, bin 2017-04-11 Bin Cheng * rtlanal.c (rtx_cost): Handle TRUNCATE between tieable modes. This is fine. You might consider adding tests for this kind of change, but I also realize they could end up being pretty fragile. Hmm

[PATCH] Fix rtl sharing issue in RTL loop unroller (PR rtl-optimization/80500)

2017-04-24 Thread Jakub Jelinek
Hi! The following testcase ICEs, because ve->reg is a SUBREG and thus should not be shared, but we initialize sum to ve->reg, then add to it some REGs (which can be shared always), and finally assign the addition etc. result into ve->reg. Fixed thusly, bootstrapped/regtested on x86_64-linux and i

Re: PR79697: Delete calls to strdup, strndup, realloc if there is no lhs

2017-04-24 Thread Jeff Law
On 02/25/2017 01:40 AM, Prathamesh Kulkarni wrote: Hi, The attached patch deletes calls to strdup, strndup if it's return-value is unused, and same for realloc if the first arg is NULL. Bootstrap+tested on x86_64-unknown-linux-gnu. OK for GCC 8 ? Thanks, Prathamesh pr79697-1.txt 2017-02-25

Re: [PATCH] squash spurious warnings in dominance.c

2017-04-24 Thread Martin Sebor
On 04/24/2017 01:32 AM, Richard Biener wrote: On Sat, Apr 22, 2017 at 2:51 AM, Martin Sebor wrote: Bug 80486 - spurious -Walloc-size-larger-than and -Wstringop-overflow in dominance.c during profiledbootstrap points out a number of warnings that show up in dominance.c during a profiledbootstrap

Re: [Patch, Fortran] PR 80121: Memory leak with derived-type intent(out) argument

2017-04-24 Thread Janus Weil
2017-04-24 14:29 GMT+02:00 Bernhard Reutner-Fischer : >>> >>> This patch causes an error message from DejaGnu: >>> (DejaGnu) proc "cleanup-tree-dump original" does not exist. >> >>thanks for letting me know. I didn't notice that ... >> >> >>> I'm not familiar with fortran, so I'm not sure it is

Re: [PATCH] Add gcc_jit_type_get_aligned

2017-04-24 Thread David Malcolm
On Fri, 2017-03-31 at 17:13 -0400, David Malcolm wrote: > On Thu, 2017-03-30 at 22:28 +0200, Florian Weimer wrote: > > * David Malcolm: > > > > > Here's a work-in-progress implementation of the idea, adding this > > > entrypoint to the API: > > > > > > extern gcc_jit_type * > > > gcc_jit_type

Re: std::vector move assign patch

2017-04-24 Thread Marc Glisse
On Thu, 9 Jan 2014, Jonathan Wakely wrote: On 9 January 2014 12:22, H.J. Lu wrote: On Fri, Dec 27, 2013 at 10:27 AM, François Dumont wrote: Hi Here is a patch to fix an issue in normal mode during the move assignment. The destination vector allocator instance is moved too during the assi

Re: [RFC, testsuite] Add dg-save-linenr

2017-04-24 Thread David Malcolm
On Mon, 2017-04-24 at 11:20 -0400, David Malcolm wrote: > On Sat, 2017-04-22 at 19:49 +0200, Tom de Vries wrote: > > Hi, > > > > there are currently two types of line number supported in > > dg-{error,warning,message,bogus} directives: absolute and relative. > > With an absolute line number, it's

[PATCH] C++: fix-it hints suggesting accessors for private fields

2017-04-24 Thread David Malcolm
Given e.g. class foo { public: int get_field () const { return m_field; } private: int m_field; }; ...if the user attempts to access the private field from the wrong place we emit: test.cc: In function ‘int test(foo*)’: test.cc:12:13: error: ‘int foo::m_field’ is private

[PATCH] C++: fix-it hint for removing stray semicolons

2017-04-24 Thread David Malcolm
Patch adds a fix-it hint to a pre-existing pedwarn to make it easier for IDEs to assist in fixing the mistake. Successfully bootstrapped®rtested on x86_64-pc-linux-gnu. OK for trunk? gcc/cp/ChangeLog: * parser.c (cp_parser_member_declaration): Add fix-it hint for removing stray s

[PATCH] C: fix-it hint for removing stray semicolons

2017-04-24 Thread David Malcolm
Patch adds a fix-it hint to a pre-existing pedwarn to make it easier for IDEs to assist in fixing the mistake. Successfully bootstrapped®rtested on x86_64-pc-linux-gnu. OK for trunk? gcc/c/ChangeLog: * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it hint for removing

[PATCH, gcc 8] C++: hints for missing std:: headers

2017-04-24 Thread David Malcolm
If the user forgets to include an STL header, then an attempt to use a class in an explicitly scoped "std::" currently leads to this error: test.cc:3:8: error: 'string' is not a member of 'std' std::string s ("hello world"); ^~ This patch attempts to make this error a bit more user

Re: [wwwdocs] powerpc: Another update for gcc-7/changes.html

2017-04-24 Thread Gerald Pfeifer
On Fri, 21 Apr 2017, Segher Boessenkool wrote: >>> + There are new options -mstack-protector-guard=global, >>> +-mstack-protector-guard=tls, >>> +-mstack-protector-guard-reg=, and >>> +-mstack-protector-guard-offset=, to change how the stack >>> +protector gets the value to use as

[PING for gcc 8] Re: [PATCH] Fix spelling suggestions for reserved words (PR c++/80177)

2017-04-24 Thread David Malcolm
Ping for gcc 8. On Fri, 2017-03-31 at 12:41 -0400, David Malcolm wrote: > As noted in the PR, the C++ frontend currently offers a poor > suggestion for this misspelling: > > a.C: In function ‘void f()’: > a.C:3:3: error: ‘static_assertion’ was not declared in this scope >static_assertion (1 =

Re: Let tree_single_nonzero_warnv_p use VRP

2017-04-24 Thread Marc Glisse
On Mon, 24 Apr 2017, Martin Sebor wrote: On 04/23/2017 03:38 PM, Marc Glisse wrote: Hello, this patches teaches tree_expr_nonzero_warnv_p to handle SSA_NAME using range information and known (non-)zero bits, by delegating to expr_not_equal_to which already knows how to handle all that. This m

Re: [PATCH 0/7] [ARC] Fix constraint letters and allow extra registers

2017-04-24 Thread Andrew Burgess
* Claudiu Zissulescu [2017-04-14 14:14:37 +0200]: > From: claziss > > Hi, > > There is an issue with 'h'- register class for ARCv2, which accepts > only the first 32 general purposes registers as oposite to the ARCv1 > which accepts all 64 GPRs. Fix this issue in two patches for CMP and > ADD

Re: Let tree_single_nonzero_warnv_p use VRP

2017-04-24 Thread Martin Sebor
On 04/23/2017 03:38 PM, Marc Glisse wrote: Hello, this patches teaches tree_expr_nonzero_warnv_p to handle SSA_NAME using range information and known (non-)zero bits, by delegating to expr_not_equal_to which already knows how to handle all that. This makes one strict overflow warning disappear.

Re: [PATCH] Remove dead code from c_common_get_alias_set

2017-04-24 Thread Bernd Edlinger
On 04/24/17 09:00, Richard Biener wrote: > On Fri, 21 Apr 2017, Bernd Edlinger wrote: > >> Hi! >> >> >> This removes some dead and unreachable code in c_common_get_alias_set: >> Because cc1 was recently changed to be only called with one file at a >> time, the code after "if (num_in_fnames == 1) re

Re: Let tree_single_nonzero_warnv_p use VRP

2017-04-24 Thread Richard Biener
On April 24, 2017 2:49:04 PM GMT+02:00, Marc Glisse wrote: >On Mon, 24 Apr 2017, Jakub Jelinek wrote: > >> On Mon, Apr 24, 2017 at 09:41:01AM +0200, Richard Biener wrote: >>> On Sun, Apr 23, 2017 at 11:38 PM, Marc Glisse >wrote: Hello, this patches teaches tree_expr_nonzero_warnv_

[PATCH] S/390: PR80464: Split MEM->GPR vector moves

2017-04-24 Thread Andreas Krebbel
We do this already for TImode values but it was missing for vector modes. Bootstrapped and regression tested on s390x. Bye, -Andreas- gcc/ChangeLog: 2017-04-24 Andreas Krebbel * config/s390/vector.md: Split MEM->GPR vector moves for non-s_operand addresses. gcc/testsuite/C

[PATCH] S/390: PR79895: Fix TImode constant handling

2017-04-24 Thread Andreas Krebbel
The P constraint letter is supposed to match every constant which is acceptable during reload. However, constraints do not appear to be able to handle const_wide_int yet. It works with predicates so the alternative is modelled with a new predicate now. Bootstrapped and regression tested on s390x

Re: X /[ex] 4 < Y /[ex] 4

2017-04-24 Thread Jeff Law
On 04/24/2017 12:24 AM, Marc Glisse wrote: Hello, we were missing this simplification on comparisons. Note that the testcase still does not simplify as much as one might like, we don't turn x+zI'm all for improving our ability to analyze and generate good code for std::vector. So any steps you

Re: [C++ PATCH] Fix-it info for duplicate tokens

2017-04-24 Thread David Malcolm
On Fri, 2017-04-21 at 18:01 +0200, Volker Reichelt wrote: > Hi, > > the following patch adds fix-it info to error messages in 4 places > where the C++ parser complains about duplicate tokens. > The fix-it infos suggest to remove the duplicates. > > Bootstrapped and regtested on x86_64-pc-linux-gn

Re: [PATCH] Simplify quoting in diagnostics of C++ frontend

2017-04-24 Thread Nathan Sidwell
On 04/23/2017 02:53 PM, Volker Reichelt wrote: Hi, the following patch simplifies quoting in diagnostics by using %qD instead of %<%D%> etc. Bootstrapped and regtested on x86_64-pc-linux-gnu. Btw, line 14563 in pt.c error ("enumerator value %E is outside the range of underlying " contains a

Re: [C++ PATCH] Fix-it info for duplicate tokens

2017-04-24 Thread Nathan Sidwell
On 04/21/2017 12:01 PM, Volker Reichelt wrote: Hi, the following patch adds fix-it info to error messages in 4 places where the C++ parser complains about duplicate tokens. The fix-it infos suggest to remove the duplicates. Bootstrapped and regtested on x86_64-pc-linux-gnu. OK for trunk? ok

Re: [RFC, testsuite] Add dg-save-linenr

2017-04-24 Thread David Malcolm
On Sat, 2017-04-22 at 19:49 +0200, Tom de Vries wrote: > Hi, > > there are currently two types of line number supported in > dg-{error,warning,message,bogus} directives: absolute and relative. > With an absolute line number, it's immediately clear what line number > is > meant, but when a line i

[PATCH] Fix test-case on ppc64le (PR testsuite/79455).

2017-04-24 Thread Martin Liška
Hi. Test-case mentioned in the PR looks as follows on ppc64le: WARNING: ThreadSanitizer: data race (pid=45910) Atomic read of size 1 at 0x10020200 by thread T2: #0 pthread_mutex_lock ../../../../libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:3608 (libtsan.so.0+0x0

Re: [PATCH v5] S/390: Optimize atomic_compare_exchange and atomic_compare builtins.

2017-04-24 Thread Ulrich Weigand
Dominik Vogt wrote: > On Mon, Mar 27, 2017 at 09:27:35PM +0100, Dominik Vogt wrote: > > The attached patch optimizes the atomic_exchange and > > atomic_compare patterns on s390 and s390x (mostly limited to > > SImode and DImode). Among general optimizaation, the changes fix > > most of the problem

[PATCH] PR libstdc++/80506 fix constant used in condition

2017-04-24 Thread Jonathan Wakely
We use the wrong constant for the Marsaglia Tsang algorithm. PR libstdc++/80506 * include/bits/random.tcc (gamma_distribution::operator()): Fix magic number used in loop condition. Tested powerpc64le-linux, committed to trunk. commit aa4da6523b7bfab7ba92c2e9e505155e1ce4

Re: [PATCH] [x86] Avoid builtins for SSE/AVX2 immidiate logical shifts

2017-04-24 Thread Allan Sandfeld Jensen
On Monday 24 April 2017, Jakub Jelinek wrote: > On Mon, Apr 24, 2017 at 09:33:09AM +0200, Allan Sandfeld Jensen wrote: > > --- a/gcc/config/i386/avx2intrin.h > > +++ b/gcc/config/i386/avx2intrin.h > > @@ -667,7 +667,7 @@ extern __inline __m256i > > > > __attribute__ ((__gnu_inline__, __always_inl

Re: Let tree_single_nonzero_warnv_p use VRP

2017-04-24 Thread Marc Glisse
On Mon, 24 Apr 2017, Jakub Jelinek wrote: On Mon, Apr 24, 2017 at 09:41:01AM +0200, Richard Biener wrote: On Sun, Apr 23, 2017 at 11:38 PM, Marc Glisse wrote: Hello, this patches teaches tree_expr_nonzero_warnv_p to handle SSA_NAME using range information and known (non-)zero bits, by delega

Re: Fix -fdump-ipa-all ICE

2017-04-24 Thread Jakub Jelinek
On Mon, Apr 24, 2017 at 02:12:31PM +0200, Jan Hubicka wrote: > > On 04/24/2017 12:51 PM, Jakub Jelinek wrote: > > > No testcase in the patch? > > > > As Honza is busy right not, I'm sending one. > Thanks (in fact I just forgot to include it and was about to send it now) but > help is welcome! Ok

Re: [Patch, Fortran] PR 80121: Memory leak with derived-type intent(out) argument

2017-04-24 Thread Bernhard Reutner-Fischer
On 24 April 2017 10:56:57 CEST, Janus Weil wrote: >Hi Christophe, > >2017-04-24 10:25 GMT+02:00 Christophe Lyon >: > the patch in the attachment fixes a memory leak by >auto-deallocating > the allocatable components of an allocatable intent(out) argument. > > Regtests cleanly on x8

Re: Fix -fdump-ipa-all ICE

2017-04-24 Thread Jan Hubicka
> On 04/24/2017 12:51 PM, Jakub Jelinek wrote: > > No testcase in the patch? > > As Honza is busy right not, I'm sending one. Thanks (in fact I just forgot to include it and was about to send it now) but help is welcome! Honza > > Martin > >From 87cef5e3123723f81c44dfafe86fa10b7925cea8 Mon Sep

Re: Fix -fdump-ipa-all ICE

2017-04-24 Thread Martin Liška
On 04/24/2017 12:51 PM, Jakub Jelinek wrote: > No testcase in the patch? As Honza is busy right not, I'm sending one. Martin >From 87cef5e3123723f81c44dfafe86fa10b7925cea8 Mon Sep 17 00:00:00 2001 From: marxin Date: Mon, 24 Apr 2017 14:02:54 +0200 Subject: [PATCH] Add new test-case. gcc/testsui

[PATCH] PR libstdc++/80504 qualify calls to avoid ADL

2017-04-24 Thread Jonathan Wakely
This has always been wrong, since 2004 when the overloads were added to . PR libstdc++/80504 * include/bits/refwrap.h (ref, cref): Qualify calls. * testsuite/20_util/reference_wrapper/80504.cc: New test. Tested powerpc64l4-linux, committed to trunk. I'll backport it too.

[PATCH] PR libstdc++/80493 fix invalid exception specification

2017-04-24 Thread Jonathan Wakely
This was fixed for std::optional, but not the TS version, so Clang rejects it. PR libstdc++/80493 * include/experimental/optional (optional::swap): Fix exception specification. Tested powerpc64le-linux, committed to trunk. commit 1d7d6db208e6371f00f8aecd77eb1a78a6fbe578

Re: [PATCH] [MSP430] [STAGE 1] Fix PR78849: ICE on initialization of global struct containing __int20 array

2017-04-24 Thread Jozef Lawrynowicz
On 24 April 2017 at 12:02, Jozef Lawrynowicz wrote: > The patch passed bootstrap and regression testing with no regressions > on recent trunk (r247020) for x86_64-pc-linux-gnu. > The patch passed regression testing with "-mcpu=msp430x/-mlarge" for > msp430-elf with no regressions, and fixed some f

[PATCH][RFC] Enable -fstrict-overflow by default

2017-04-24 Thread Richard Biener
The following makes signed overflow undefined for all (non-)optimization levels. The intent is to remove -fno-strict-overflow signed overflow behavior as that is not a sensible option to the user (it ends up with the worst of both -fwrapv and -fno-wrapv). The implementation details need to be pr

[PATCH] [MSP430] [STAGE 1] Fix PR78849: ICE on initialization of global struct containing __int20 array

2017-04-24 Thread Jozef Lawrynowicz
The attached patch modifies the setting of TYPE_SIZE for __intN types to use GET_MODE_BITSIZE rather than the bitsize extracted from the N value. TYPE_SIZE for sizetype and bitsizetype are also modified to use GET_MODE_BITSIZE rather than the precision of the type. This fixes an issue for the msp4

Re: Fix -fdump-ipa-all ICE

2017-04-24 Thread Jakub Jelinek
On Mon, Apr 24, 2017 at 12:48:19PM +0200, Jan Hubicka wrote: > Hi, > this patch fixes ICE in dumping that triggers somewhat overactive sanity > check. > I think it would be nice to get it into release branches so we could debug > things > more easily. > > I am going to commit to trunk, OK for re

Fix -fdump-ipa-all ICE

2017-04-24 Thread Jan Hubicka
Hi, this patch fixes ICE in dumping that triggers somewhat overactive sanity check. I think it would be nice to get it into release branches so we could debug things more easily. I am going to commit to trunk, OK for release branches? Honza PR middle-end/79931 * ipa-devirt.c (dump

Re: [PATCH GCC8][11/33]New interfaces for tree affine

2017-04-24 Thread Richard Biener
On Tue, Apr 18, 2017 at 12:43 PM, Bin Cheng wrote: > Hi, > This patch adds three simple interfaces for tree affine which will be used in > cost computation later. > > Is it OK? +static inline tree +aff_combination_type (aff_tree *aff) misses a function comment. Please do not introduce new 'sta

Re: [PATCH GCC8][10/33]Clean get_scaled_computation_cost_at and the dump info

2017-04-24 Thread Richard Biener
On Tue, Apr 18, 2017 at 12:42 PM, Bin Cheng wrote: > Hi, > This patch simplifies function get_scaled_computation_cost_at and the dump > information. > > Is it OK? Ok. Richard. > Thanks, > bin > 2017-04-11 Bin Cheng > > * tree-ssa-loop-ivopts.c (get_scaled_computation_cost_at): Delet

Re: [PATCH GCC8][09/33]Compute separate aff_trees for invariant and induction parts

2017-04-24 Thread Richard Biener
On Tue, Apr 18, 2017 at 12:42 PM, Bin Cheng wrote: > Hi, > This patch computes and returns separate aff_trees for invariant expression > and induction expression, so that invariant and induction parts can be handled > separately in both cost computation and code generation. > > Is it OK? Ok. Ric

Re: [PATCH GCC8][08/33]Clean get_computation_*interfaces

2017-04-24 Thread Richard Biener
On Tue, Apr 18, 2017 at 12:41 PM, Bin Cheng wrote: > Hi, > This patch cleans get_computation* interfaces. Specifically, it removes > get_computation and get_computation_cost_at. > > Is it OK? Ok. Richard. > Thanks, > bin > 2017-04-11 Bin Cheng > > * tree-ssa-loop-ivopts.c (get_compu

Re: [PATCH GCC8][07/33]Offset validity check in address expression

2017-04-24 Thread Richard Biener
On Tue, Apr 18, 2017 at 12:41 PM, Bin Cheng wrote: > Hi, > For now, we check validity of offset by computing the maximum offset then > checking if > offset is smaller than the max offset. This is inaccurate, for example, some > targets > may require offset to be aligned by power of 2. This pat

Re: [PATCH GCC8][05/33]Count invariant and candidate separately

2017-04-24 Thread Richard Biener
On Tue, Apr 18, 2017 at 12:40 PM, Bin Cheng wrote: > Hi, > Simple refactor counting invariant (both variables and expressions) and > induction variables separately. > Is it OK? Ok. Richard. > Thanks, > bin > 2017-04-11 Bin Cheng > > * tree-ssa-loop-ivopts.c (struct iv_ca): Rename n_

Re: [PATCH GCC8][06/33]Simple refactor of function rewrite_use_address

2017-04-24 Thread Richard Biener
On Tue, Apr 18, 2017 at 12:40 PM, Bin Cheng wrote: > Hi, > Simple refactor for function rewrite_use_address. Ok. Richard. > Thanks, > bin > 2017-04-11 Bin Cheng > > * tree-ssa-loop-ivopts.c (rewrite_use_address): Simple refactor.

Re: [PATCH GCC8][04/33]Single interface finding invariant variables

2017-04-24 Thread Richard Biener
On Tue, Apr 18, 2017 at 12:39 PM, Bin Cheng wrote: > Hi, > This patch refactors interface finding invariant variables. Now customers > only need to call find_inv_vars, rather than set global variable > fd_ivopts_data > then call walk_tree. > Is it OK? Ok. RIchard. > Thanks, > bin > > 2017-04-

Re: [PATCH GCC8][03/33]Refactor invariant variable/expression handling

2017-04-24 Thread Richard Biener
On Tue, Apr 18, 2017 at 12:38 PM, Bin Cheng wrote: > Hi, > This patch refactors how invariant variable/expressions are handled. Now > they are > recorded in the same kind data structure and handled similarly, which makes > code > easier to understand. > > Is it OK? Ok. Richard. > Thanks, > b

Re: [PATCH GCC8][02/33]Remove code handling pseudo candidate

2017-04-24 Thread Richard Biener
On Tue, Apr 18, 2017 at 12:38 PM, Bin Cheng wrote: > Hi, > We don't have pseudo candidate nowadays, so remove any related code. > > Is it OK? Ok. Thanks, Richard. > Thanks, > bin > > 2017-04-11 Bin Cheng > > * tree-ssa-loop-ivopts.c (get_computation_cost_at): Remove pseudo >

[PATCH] Cleanup SCCVN

2017-04-24 Thread Richard Biener
This does a cleanup I postponed for GCC 8, namely not fail value-numbering completely if we end up with a large SCC but instead just drop that SCC to varying. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. Richard. 2017-04-24 Richard Biener * tree-ssa-sccvn.h (run_sc

[wwwdocs] Change "GCC 6" to "GCC 7" in /gcc7/index.html

2017-04-24 Thread Jonathan Wakely
Committed to CVS. Index: htdocs/gcc-7/index.html === RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-7/index.html,v retrieving revision 1.1 diff -u -r1.1 index.html --- htdocs/gcc-7/index.html 20 Apr 2017 10:32:58 - 1.1 +++ htdocs/gcc-7/in

Re: [PATCH][AArch64] Emit tighter strong atomic compare-exchange loop when comparing against zero

2017-04-24 Thread Kyrill Tkachov
Pinging this back into context so that I don't forget about it... https://gcc.gnu.org/ml/gcc-patches/2017-03/msg00376.html Thanks, Kyrill On 08/03/17 16:35, Kyrill Tkachov wrote: Hi all, For the testcase in this patch where the value of x is zero we currently generate: foo: mov w

Re: [PATCH][AArch64] Allow const0_rtx operand for atomic compare-exchange patterns

2017-04-24 Thread Kyrill Tkachov
Pinging this back into context so that I don't forget about it... https://gcc.gnu.org/ml/gcc-patches/2017-02/msg01648.html Thanks, Kyrill On 28/02/17 12:29, Kyrill Tkachov wrote: Hi all, For the testcase in this patch we currently generate: foo: mov w1, 0 ldaxr w2, [x0]

Re: [PATCH] [x86] Avoid builtins for SSE/AVX2 immidiate logical shifts

2017-04-24 Thread Allan Sandfeld Jensen
On Monday 24 April 2017, Jakub Jelinek wrote: > On Mon, Apr 24, 2017 at 11:01:29AM +0200, Allan Sandfeld Jensen wrote: > > On Monday 24 April 2017, Jakub Jelinek wrote: > > > On Mon, Apr 24, 2017 at 10:34:58AM +0200, Allan Sandfeld Jensen wrote: > > > > That is a different instruction. That is the

Re: [PATCH] [x86] Avoid builtins for SSE/AVX2 immidiate logical shifts

2017-04-24 Thread Jakub Jelinek
On Mon, Apr 24, 2017 at 11:01:29AM +0200, Allan Sandfeld Jensen wrote: > On Monday 24 April 2017, Jakub Jelinek wrote: > > On Mon, Apr 24, 2017 at 10:34:58AM +0200, Allan Sandfeld Jensen wrote: > > > That is a different instruction. That is the vpsllw not vpsllwi > > > > > > The intrinsics I chang

Re: PR79715: Special case strcpy/strncpy for dse

2017-04-24 Thread Prathamesh Kulkarni
On 1 March 2017 at 13:24, Richard Biener wrote: > On Tue, 28 Feb 2017, Jeff Law wrote: > >> On 02/28/2017 05:59 AM, Prathamesh Kulkarni wrote: >> > On 28 February 2017 at 15:40, Jakub Jelinek wrote: >> > > On Tue, Feb 28, 2017 at 03:33:11PM +0530, Prathamesh Kulkarni wrote: >> > > > Hi, >> > > >

Re: [PATCH] [x86] Avoid builtins for SSE/AVX2 immidiate logical shifts

2017-04-24 Thread Allan Sandfeld Jensen
On Monday 24 April 2017, Jakub Jelinek wrote: > On Mon, Apr 24, 2017 at 10:34:58AM +0200, Allan Sandfeld Jensen wrote: > > That is a different instruction. That is the vpsllw not vpsllwi > > > > The intrinsics I changed is the immediate version, I didn't change the > > non- immediate version. It i

Re: [Patch, Fortran] PR 80121: Memory leak with derived-type intent(out) argument

2017-04-24 Thread Janus Weil
Hi Christophe, 2017-04-24 10:25 GMT+02:00 Christophe Lyon : the patch in the attachment fixes a memory leak by auto-deallocating the allocatable components of an allocatable intent(out) argument. Regtests cleanly on x86_64-linux-gnu. Ok for trunk? >>> >>> OK for trunk. >> >> th

[PATCH] Fix PR79201 (half-way)

2017-04-24 Thread Richard Biener
One issue in PR79201 is that we don't sink pure/const calls which is what the following simple patch fixes. Bootstrap and regtest running on x86_64-unknown-linux-gnu. Richard. 2017-04-24 Richard Biener PR tree-optimization/79201 * tree-ssa-sink.c (statement_sink_location): H

Re: [PATCH] [x86] Avoid builtins for SSE/AVX2 immidiate logical shifts

2017-04-24 Thread Jakub Jelinek
On Mon, Apr 24, 2017 at 10:34:58AM +0200, Allan Sandfeld Jensen wrote: > That is a different instruction. That is the vpsllw not vpsllwi > > The intrinsics I changed is the immediate version, I didn't change the non- > immediate version. It is probably a bug if you can give non-immediate values >

Re: [PATCH] [x86] Avoid builtins for SSE/AVX2 immidiate logical shifts

2017-04-24 Thread Allan Sandfeld Jensen
On Monday 24 April 2017, Allan Sandfeld Jensen wrote: > On Monday 24 April 2017, Jakub Jelinek wrote: > > On Mon, Apr 24, 2017 at 10:02:40AM +0200, Allan Sandfeld Jensen wrote: > > > > That said, both the options I've mentioned above provide the same > > > > advantages and don't have the disadvanta

Re: [PATCH] [x86] Avoid builtins for SSE/AVX2 immidiate logical shifts

2017-04-24 Thread Allan Sandfeld Jensen
On Monday 24 April 2017, Jakub Jelinek wrote: > On Mon, Apr 24, 2017 at 10:02:40AM +0200, Allan Sandfeld Jensen wrote: > > > That said, both the options I've mentioned above provide the same > > > advantages and don't have the disadvantages of pessimizing normal code. > > > > What pessimizing? Thi

Re: [PATCH] [x86] Avoid builtins for SSE/AVX2 immidiate logical shifts

2017-04-24 Thread Jakub Jelinek
On Mon, Apr 24, 2017 at 10:02:40AM +0200, Allan Sandfeld Jensen wrote: > > That said, both the options I've mentioned above provide the same > > advantages and don't have the disadvantages of pessimizing normal code. > > > What pessimizing? This produce the same or better code for all legal > arg

Re: [Patch, Fortran] PR 80121: Memory leak with derived-type intent(out) argument

2017-04-24 Thread Christophe Lyon
Hi, On 23 April 2017 at 10:51, Janus Weil wrote: > Hi Thomas, > >>> the patch in the attachment fixes a memory leak by auto-deallocating >>> the allocatable components of an allocatable intent(out) argument. >>> >>> Regtests cleanly on x86_64-linux-gnu. Ok for trunk? >> >> OK for trunk. > > thank

[PATCH] Fix PR80494

2017-04-24 Thread Richard Biener
The following patch fixes this PR. Bootstrap and regtest running on x86_64-unknown-linux-gnu. Richard. 2017-04-24 Richard Biener PR tree-optimization/80494 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Bail out for complex types. * gfortran.dg/pr80

Re: [PATCH] [x86] Avoid builtins for SSE/AVX2 immidiate logical shifts

2017-04-24 Thread Allan Sandfeld Jensen
On Monday 24 April 2017, Jakub Jelinek wrote: > On Mon, Apr 24, 2017 at 09:51:29AM +0200, Allan Sandfeld Jensen wrote: > > On Monday 24 April 2017, Jakub Jelinek wrote: > > > On Mon, Apr 24, 2017 at 09:33:09AM +0200, Allan Sandfeld Jensen wrote: > > > > --- a/gcc/config/i386/avx2intrin.h > > > > ++

Re: [PATCH] [x86] Avoid builtins for SSE/AVX2 immidiate logical shifts

2017-04-24 Thread Jakub Jelinek
On Mon, Apr 24, 2017 at 09:51:29AM +0200, Allan Sandfeld Jensen wrote: > On Monday 24 April 2017, Jakub Jelinek wrote: > > On Mon, Apr 24, 2017 at 09:33:09AM +0200, Allan Sandfeld Jensen wrote: > > > --- a/gcc/config/i386/avx2intrin.h > > > +++ b/gcc/config/i386/avx2intrin.h > > > @@ -667,7 +667,7

Re: [PATCH] [x86] Avoid builtins for SSE/AVX2 immidiate logical shifts

2017-04-24 Thread Allan Sandfeld Jensen
On Monday 24 April 2017, Jakub Jelinek wrote: > On Mon, Apr 24, 2017 at 09:33:09AM +0200, Allan Sandfeld Jensen wrote: > > --- a/gcc/config/i386/avx2intrin.h > > +++ b/gcc/config/i386/avx2intrin.h > > @@ -667,7 +667,7 @@ extern __inline __m256i > > > > __attribute__ ((__gnu_inline__, __always_inl

Re: Let tree_single_nonzero_warnv_p use VRP

2017-04-24 Thread Jakub Jelinek
On Mon, Apr 24, 2017 at 09:41:01AM +0200, Richard Biener wrote: > On Sun, Apr 23, 2017 at 11:38 PM, Marc Glisse wrote: > > Hello, > > > > this patches teaches tree_expr_nonzero_warnv_p to handle SSA_NAME using > > range information and known (non-)zero bits, by delegating to > > expr_not_equal_to

[PATCH] Fix PR79725

2017-04-24 Thread Richard Biener
I have tested the following patch to remove (where easy) dead code in the way of sinking. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk. Richard. 2017-04-24 Richard Biener PR tree-optimization/79725 * tree-ssa-sink.c (statement_sink_location): Return

Re: X /[ex] 4 < Y /[ex] 4

2017-04-24 Thread Richard Biener
On Mon, Apr 24, 2017 at 9:04 AM, Marc Glisse wrote: > On Mon, 24 Apr 2017, Jakub Jelinek wrote: > >>> +/* X / 4 < Y / 4 iif X < Y when the division is known to be exact. */ >> >> >> s/iif/iff/ ? > > > Indeed, thanks, I've fixed it locally. Ok. As of strict-overflow warnings I'd like to kill -f[

Re: [PATCH] [x86] Avoid builtins for SSE/AVX2 immidiate logical shifts

2017-04-24 Thread Jakub Jelinek
On Mon, Apr 24, 2017 at 09:33:09AM +0200, Allan Sandfeld Jensen wrote: > --- a/gcc/config/i386/avx2intrin.h > +++ b/gcc/config/i386/avx2intrin.h > @@ -667,7 +667,7 @@ extern __inline __m256i > __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) > _mm256_slli_epi16 (__m256i __A, in

Re: Let tree_single_nonzero_warnv_p use VRP

2017-04-24 Thread Richard Biener
On Sun, Apr 23, 2017 at 11:38 PM, Marc Glisse wrote: > Hello, > > this patches teaches tree_expr_nonzero_warnv_p to handle SSA_NAME using > range information and known (non-)zero bits, by delegating to > expr_not_equal_to which already knows how to handle all that. > > This makes one strict overfl

Re: [PATCH] [x86] Avoid builtins for SSE/AVX2 immidiate logical shifts

2017-04-24 Thread Allan Sandfeld Jensen
On Saturday 22 April 2017, Allan Sandfeld Jensen wrote: > Replaces definitions of immediate logical shift intrinsics with GCC > extension syntax. Tests are added to ensure the intrinsics still produce > the right instructions and that a few basic optimizations now work. > > Compared to the earlier

Re: [PATCH] squash spurious warnings in dominance.c

2017-04-24 Thread Richard Biener
On Sat, Apr 22, 2017 at 2:51 AM, Martin Sebor wrote: > Bug 80486 - spurious -Walloc-size-larger-than and > -Wstringop-overflow in dominance.c during profiledbootstrap > points out a number of warnings that show up in dominance.c > during a profiledbootstrap. I'm pretty sure the warnings > are due

Re: PR79697: Delete calls to strdup, strndup, realloc if there is no lhs

2017-04-24 Thread Prathamesh Kulkarni
On 27 February 2017 at 00:10, Prathamesh Kulkarni wrote: > On 26 February 2017 at 05:16, Martin Sebor wrote: >> On 02/25/2017 11:54 AM, Prathamesh Kulkarni wrote: >>> >>> On 25 February 2017 at 14:43, Marc Glisse wrote: On Sat, 25 Feb 2017, Prathamesh Kulkarni wrote: > Hi, >>>

Re: X /[ex] 4 < Y /[ex] 4

2017-04-24 Thread Marc Glisse
On Mon, 24 Apr 2017, Jakub Jelinek wrote: +/* X / 4 < Y / 4 iif X < Y when the division is known to be exact. */ s/iif/iff/ ? Indeed, thanks, I've fixed it locally. -- Marc Glisse

Re: [PATCH] Remove dead code from c_common_get_alias_set

2017-04-24 Thread Richard Biener
On Fri, 21 Apr 2017, Bernd Edlinger wrote: > Hi! > > > This removes some dead and unreachable code in c_common_get_alias_set: > Because cc1 was recently changed to be only called with one file at a > time, the code after "if (num_in_fnames == 1) return -1;" is no longer > reachable, and can thus