Miscellaneous optimization group fixes (was: Rename the "openmp" group of optimizations to "omp")

2017-02-21 Thread Thomas Schwinge
Hi! On Wed, 22 Feb 2017 08:48:40 +0100, I wrote: > On Tue, 22 Nov 2016 14:43:02 +0100, Martin Jambor wrote: > > On Fri, Nov 18, 2016 at 11:38:56AM +0100, Jakub Jelinek wrote: > > > On Sun, Nov 13, 2016 at 10:42:01PM +0100, Martin Jambor wrote: > > > > @@ -14133,7 +14183,7 @@ const pass_data pass_

Rename the "openmp" group of optimizations to "omp" (was: [PATCH 3/4] OpenMP lowering changes from the hsa branch)

2017-02-21 Thread Thomas Schwinge
Hi! On Tue, 22 Nov 2016 14:43:02 +0100, Martin Jambor wrote: > On Fri, Nov 18, 2016 at 11:38:56AM +0100, Jakub Jelinek wrote: > > On Sun, Nov 13, 2016 at 10:42:01PM +0100, Martin Jambor wrote: > > > @@ -14133,7 +14183,7 @@ const pass_data pass_data_expand_omp = > > > { > > >GIMPLE_PASS, /* t

Re: [PATCH] restore -Wunused-variable on a typedef'd variable in a function template (PR 79548)

2017-02-21 Thread Martin Sebor
Ah, I see, your patch changes attribute unused handling for local variables from tracking TREE_USED to lookup_attribute. I'm not opposed to this change, but I'd like to understand why the TREE_USED handling wasn't working. In the test case in the bug: template void g () { T t; //

Re: [PATCH] Small reg-stack improvement (PR target/70465)

2017-02-21 Thread Jakub Jelinek
On Tue, Feb 21, 2017 at 10:23:47PM +0100, Jakub Jelinek wrote: > As reported by Uros, the > fld a > fld b > fxchg %st(1) > optimization to > fld b > fld a > misses several important cases, one is FLOAT_EXTEND memory loads where > the memory is SFmode or DFmode but we extend it to a wider mode, and

RE: [PATCH, MIPS] Calling convention differs depending on the presence of MSA

2017-02-21 Thread Moore, Catherine
> -Original Message- > From: Matthew Fortune [mailto:matthew.fort...@imgtec.com] > Sent: Tuesday, February 21, 2017 5:35 AM > To: Sameera Deshpande ; Moore, > Catherine > Cc: gcc-patches@gcc.gnu.org > Subject: RE: [PATCH, MIPS] Calling convention differs depending on the > presence of MS

RE: [PATCH][MIPS] MSA machine description fixes

2017-02-21 Thread Moore, Catherine
> The patch fixes some bugs as mentioned below. > > 1. mips_gen_const_int_vector(): Change type for argument VAL from > int to HOST_WIDE_INT to allow const vector of type doubleword. It in > turn enables generation of BCLRI.d instead of AND.d for immediate > const vector operand with only one bit

Re: PR79286, ira combine_and_move_insns in loops

2017-02-21 Thread Alan Modra
On Sat, Feb 18, 2017 at 12:39:08PM +0100, Dominique d'Humières wrote: > > I'm slightly concerned about the test and how it'll behave on targets with > > small address spaces. If it's a problem we can fault in adjustments. > > The test fails on x86_64-apple-darwin16 with -m32 and -O1 and above. H

[PATCH] Small reg-stack improvement (PR target/70465)

2017-02-21 Thread Jakub Jelinek
Hi! As reported by Uros, the fld a fld b fxchg %st(1) optimization to fld b fld a misses several important cases, one is FLOAT_EXTEND memory loads where the memory is SFmode or DFmode but we extend it to a wider mode, and the other is when we load a known i?87 constant like 0.0, 1.0, PI etc. Boot

Re: [PATCH 3/6] microblaze: Fixes for RTL checking

2017-02-21 Thread Segher Boessenkool
On Tue, Feb 21, 2017 at 12:35:17PM -0800, Michael Eager wrote: > On 02/21/2017 12:15 PM, Jakub Jelinek wrote: > >On Tue, Feb 21, 2017 at 02:48:15PM +, Segher Boessenkool wrote: > >>- /* Shift by zero -- copy regs if necessary. */ > >>+ /* Shift by zero -- copy regs. */ > >>if ((GET_CODE

Re: [PATCH 3/6] microblaze: Fixes for RTL checking

2017-02-21 Thread Michael Eager
On 02/21/2017 12:25 PM, Segher Boessenkool wrote: On Tue, Feb 21, 2017 at 12:08:34PM -0800, Michael Eager wrote: - /* Shift by zero -- copy regs if necessary. */ + /* Shift by zero -- copy regs. */ if ((GET_CODE (operands[2]) == CONST_INT) && (INTVAL (operands[2]) == 0)) { -

C++ PATCH for c++/41727, ICE with partial specialization of member of instantiation

2017-02-21 Thread Jason Merrill
This was a regression from rejects-valid to ice-on-valid. This patch fixes the ICE, but not the underlying bug. Tested x86_64-pc-linux-gnu, applying to trunk. commit 6788ad9769bfce33d478c426aafbebccdbb5f795 Author: Jason Merrill Date: Tue Feb 21 08:21:55 2017 -0800 PR c++/41727 -

C++ PATCH for c++/17729, c++/50308, deprecated warning issues

2017-02-21 Thread Jason Merrill
Both of these PRs are problems with the attribute deprecated warning in cases when there are no other declarations of the name in scope. [basic.def.odr] says that a function is odr-used if it is the unique result of name lookup, and also if it is selected by overload resolution; in 17729 that resul

Re: [v3 PATCH] Implement LWG 2825, LWG 2756 breaks class template argument deduction for optional.

2017-02-21 Thread Jason Merrill
On Mon, Jan 30, 2017 at 4:48 PM, Ville Voutilainen wrote: > On 31 January 2017 at 00:41, Ville Voutilainen > wrote: >> On 31 January 2017 at 00:06, Tim Song wrote: >>> On Mon, Jan 30, 2017 at 9:36 PM Jonathan Wakely wrote: On 30/01/17 13:28 +, Jonathan Wakely wrote: >On 30/01

Re: [PATCH] Move -Wrestrict warning later in the FEs and fix some issues in it (PR c++/79588)

2017-02-21 Thread Jason Merrill
OK if Joseph doesn't object in the next couple of days. On Mon, Feb 20, 2017 at 12:35 PM, Jakub Jelinek wrote: > Hi! > > As mentioned in the PR, -Wrestrict warning is done way too early, where > e.g. default arguments aren't filled up yet (reason for ICE on first > testcase) or where arguments in

Re: [PATCH 3/6] microblaze: Fixes for RTL checking

2017-02-21 Thread Jakub Jelinek
On Tue, Feb 21, 2017 at 12:35:17PM -0800, Michael Eager wrote: > On 02/21/2017 12:15 PM, Jakub Jelinek wrote: > > On Tue, Feb 21, 2017 at 02:48:15PM +, Segher Boessenkool wrote: > > > - /* Shift by zero -- copy regs if necessary. */ > > > + /* Shift by zero -- copy regs. */ > > > if ((G

Re: [C++ PATCH] For -gdwarf-5 emit DW_TAG_variable instead of DW_TAG_member for C++ static data members

2017-02-21 Thread Jason Merrill
On Sat, Feb 18, 2017 at 12:17 AM, Jakub Jelinek wrote: > On Fri, Feb 17, 2017 at 09:37:09PM -0500, Jason Merrill wrote: >> On Fri, Feb 17, 2017 at 1:52 PM, Jakub Jelinek wrote: >> > - && die->die_tag != DW_TAG_member) >> > + && die->die_tag != DW_TAG_member >> > + && (die->die_tag

Re: [PATCH 3/6] microblaze: Fixes for RTL checking

2017-02-21 Thread Michael Eager
On 02/21/2017 12:15 PM, Jakub Jelinek wrote: On Tue, Feb 21, 2017 at 02:48:15PM +, Segher Boessenkool wrote: - /* Shift by zero -- copy regs if necessary. */ + /* Shift by zero -- copy regs. */ if ((GET_CODE (operands[2]) == CONST_INT) && (INTVAL (operands[2]) == 0)) You could have

Re: [PATCH] restore -Wunused-variable on a typedef'd variable in a function template (PR 79548)

2017-02-21 Thread Jason Merrill
On Tue, Feb 21, 2017 at 11:00 AM, Martin Sebor wrote: > On 02/21/2017 11:08 AM, Jason Merrill wrote: >> >> On 02/17/2017 05:07 PM, Martin Sebor wrote: >>> >>> * decl.c (poplevel): Avoid diagnosing entities declared with >>> attribute unused. >> >> >> This change is OK. >> >>> (initiali

Re: [PATCH 3/6] microblaze: Fixes for RTL checking

2017-02-21 Thread Segher Boessenkool
On Tue, Feb 21, 2017 at 12:08:34PM -0800, Michael Eager wrote: > >- /* Shift by zero -- copy regs if necessary. */ > >+ /* Shift by zero -- copy regs. */ > >if ((GET_CODE (operands[2]) == CONST_INT) && (INTVAL (operands[2]) == > >0)) > > { > >- if (REGNO (operands[0]) != REGN

Re: C++ PATCH to fix ICE with NSDMI and flexible array member (PR c++/79535)

2017-02-21 Thread Jason Merrill
OK. On Tue, Feb 21, 2017 at 12:11 PM, Marek Polacek wrote: > Jason suggested that the way forward with this PR, where we ICE because we > have > a default mem-initializer for a flexible array, and verify_ctor_sanity crashes > on that, is to reject such code. This patch attempts to do that; I'm

Re: [PATCH 3/6] microblaze: Fixes for RTL checking

2017-02-21 Thread Jakub Jelinek
On Tue, Feb 21, 2017 at 02:48:15PM +, Segher Boessenkool wrote: > - /* Shift by zero -- copy regs if necessary. */ > + /* Shift by zero -- copy regs. */ >if ((GET_CODE (operands[2]) == CONST_INT) && (INTVAL (operands[2]) == 0)) You could have changed this line to if (operands[2] == c

C++ PATCH to fix ICE with NSDMI and flexible array member (PR c++/79535)

2017-02-21 Thread Marek Polacek
Jason suggested that the way forward with this PR, where we ICE because we have a default mem-initializer for a flexible array, and verify_ctor_sanity crashes on that, is to reject such code. This patch attempts to do that; I'm not entirely happy about the placement of the maybe_reject_flexarray_i

Re: [PATCH 3/6] microblaze: Fixes for RTL checking

2017-02-21 Thread Michael Eager
On 02/21/2017 06:48 AM, Segher Boessenkool wrote: REGNO can only be called on REGs, not SUBREGs; and INTVAL does not work on REGs. 2017-02-21 Segher Boessenkool * config/microblaze/microblaze.c (microblaze_expand_shift): Do not test for register moves to themselves. *

RE: [PATCH 1/5] Handle WORD_REGISTER_OPERATIONS when reloading (subreg(reg))

2017-02-21 Thread Matthew Fortune
Eric Botcazou writes: > > Agreed. I don't think things like WORD_MODE_OPERATIONS should change > > rtl semantics, just optimisation decisions. Sorry, I did cover two topics in one email. My point was about whether simplifying: (subreg:OUTER (mem:INNER ...)) To: (mem:OUTER ...) Should ever be

Re: [PATCH 4/6] nios2: Fixes for RTL checking

2017-02-21 Thread Sandra Loosemore
On 02/21/2017 07:48 AM, Segher Boessenkool wrote: You cannot call REGNO on something that isn't a REG, and you cannot call INTVAL on something that isn't a CONST_INT. The way I fixed nios2_alternate_compare_const is admittedly a bit lame. Yeah. :-P 2017-02-21 Segher Boessenkool

Re: [PATCH] Look through clobber stmts in uninit (PR tree-optimization/79345)

2017-02-21 Thread Jeff Law
On 02/21/2017 02:01 AM, Richard Biener wrote: On Mon, 20 Feb 2017, Marc Glisse wrote: On Mon, 20 Feb 2017, Jakub Jelinek wrote: As mentioned by Jason in the PR, we've regressed on the following testcase since we started emitting CLOBBERs at the start of ctors (and we warn as before with -fno-

Re: [PATCH 4/6] nios2: Fixes for RTL checking

2017-02-21 Thread Jeff Law
On 02/21/2017 07:48 AM, Segher Boessenkool wrote: You cannot call REGNO on something that isn't a REG, and you cannot call INTVAL on something that isn't a CONST_INT. The way I fixed nios2_alternate_compare_const is admittedly a bit lame. 2017-02-21 Segher Boessenkool * config/nios

Re: [PATCH 3/6] microblaze: Fixes for RTL checking

2017-02-21 Thread Jeff Law
On 02/21/2017 07:48 AM, Segher Boessenkool wrote: REGNO can only be called on REGs, not SUBREGs; and INTVAL does not work on REGs. 2017-02-21 Segher Boessenkool * config/microblaze/microblaze.c (microblaze_expand_shift): Do not test for register moves to themselves. *

Re: [PATCH] arc: Fixes for RTL checking

2017-02-21 Thread Jeff Law
On 02/21/2017 08:08 AM, Segher Boessenkool wrote: Whoops, I forgot one. Here it is. Joern, please see . 2017-02-21 Segher Boessenkool * config/arc/arc.c (arc_ccfsm_advance): Only take the PATTERN of this_insn if it

Re: [PATCH 5/6] pa: Fixes for RTL checking

2017-02-21 Thread Jeff Law
On 02/21/2017 07:48 AM, Segher Boessenkool wrote: I do not know what the USEs are really for, so I do not know if using just the pattern here is correct. Using the full insn is probably not correct either though. 2017-02-21 Segher Boessenkool * config/pa/pa.c (pa_combine_instructio

Re: [PATCH] restore -Wunused-variable on a typedef'd variable in a function template (PR 79548)

2017-02-21 Thread Martin Sebor
On 02/21/2017 11:08 AM, Jason Merrill wrote: On 02/17/2017 05:07 PM, Martin Sebor wrote: * decl.c (poplevel): Avoid diagnosing entities declared with attribute unused. This change is OK. (initialize_local_var): Do not consider the type of a variable when determining whether o

[PATCH, i386]: Fix PR79593: Poor/Worse code generation for FPU on versions after 6

2017-02-21 Thread Uros Bizjak
: rep ret .cfi_endproc .LFE2: .size bar, .-bar - .ident "GCC: (GNU) 7.0.0 20170117 (experimental) [trunk revision 244540]" + .ident "GCC: (GNU) 7.0.1 20170221 (experimental) [trunk revision 245630]" .section.note.GNU-stack,&

Re: [driver, doc] Support escaping special characters in specs

2017-02-21 Thread Sandra Loosemore
On 02/21/2017 06:54 AM, Rainer Orth wrote: Hi Joseph, On Fri, 13 Jan 2017, Rainer Orth wrote: I'm unsure if the patch is large enough to need a copyright assignment (in which case it's almost certainly too late for GCC 7), and even if not if it's appropriate at this point in the release cycle

Re: [PATCH 1/5] Handle WORD_REGISTER_OPERATIONS when reloading (subreg(reg))

2017-02-21 Thread Eric Botcazou
> Agreed. I don't think things like WORD_MODE_OPERATIONS should change > rtl semantics, just optimisation decisions. And using the smallest > possible spill size is often good even for RISCy targets. I don't think that's correct, WORD_MODE_OPERATIONS does change RTL semantics for SUBREGs smalle

Re: [PATCH 1/5] Handle WORD_REGISTER_OPERATIONS when reloading (subreg(reg))

2017-02-21 Thread Richard Sandiford
Matthew Fortune writes: > Richard Sandiford writes: >> Matthew Fortune writes: >> > Eric Botcazou writes: >> >> > Thanks for reporting. I'll take a brief look first but revert if >> >> > the issue isn't something that vaguely makes sense to me. >> >> >> >> You need to restrict any WORD_REGISTER

Re: [C++ PATCH] Fix default TLS model for non-inline static data members (PR c++/79288)

2017-02-21 Thread Jason Merrill
OK. On Mon, Jan 30, 2017 at 12:49 PM, Jakub Jelinek wrote: > Hi! > > The inline variable changes broke the default TLS model of non-inline static > data members. The decl_default_tls_model call needs DECL_EXTERNAL for the > !processing_template_decl be already set appropriately. The following p

Re: [PATCH] restore -Wunused-variable on a typedef'd variable in a function template (PR 79548)

2017-02-21 Thread Jason Merrill
On 02/17/2017 05:07 PM, Martin Sebor wrote: * decl.c (poplevel): Avoid diagnosing entities declared with attribute unused. This change is OK. (initialize_local_var): Do not consider the type of a variable when determining whether or not it's used. This is not

[PATCH][PR tree-optimization/79621] Avoid path isolation on block with edge to itself

2017-02-21 Thread Jeff Law
Erroneous path isolation inherently duplicates blocks with erroneous behavior when reached via certain paths. This allows us to modify one copy without affecting the other. Block duplication can cause re-allocation of a PHI nodes in successor blocks and thus referencing the old PHI referenc

Re: [C++ PATCH] Fix ICE with decomp gimplification (PR sanitizer/79589)

2017-02-21 Thread Jason Merrill
OK. On Mon, Feb 20, 2017 at 12:38 PM, Jakub Jelinek wrote: > Hi! > > When generic is unshared, we generally don't unshare DECL_VALUE_EXPRs, > so those are assumed to be not shared, otherwise as in the testcase > we can clear first argument of a COMPOUND_EXPR after it has been gimplified > in one

Re: [C++ PATCH] Fix decomp error recovery (PR c++/79654)

2017-02-21 Thread Jason Merrill
OK. On Tue, Feb 21, 2017 at 8:35 AM, Jakub Jelinek wrote: > Hi! > > This patch undoes part of my r245218 change, there is nothing wrong with > the decomposition type, it is better to handle it in tsubst_decomp_names. > Plus Paolo's decl2.c change that also fixes the ICE. > > I think we want both,

Re: [C++ PATCH] Diagnose constexpr store to ARRAY_REF with negative index (PR c++/79655)

2017-02-21 Thread Jason Merrill
OK. On Tue, Feb 21, 2017 at 8:42 AM, Jakub Jelinek wrote: > Hi! > > The following patch fixes ICE where we try to store a[-1]. The problem > is that we don't check the bounds first and then later on we assert it > is not negative. > > Fixed thusly, bootstrapped/regtested on x86_64-linux and i686

Re: [C++ PATCH] Fix ICE with constexpr store to pointer to method (PR c++/79639)

2017-02-21 Thread Jason Merrill
OK. On Tue, Feb 21, 2017 at 8:44 AM, Jakub Jelinek wrote: > Hi! > > Apparently we can end up trying to store into a pointer-to-member > that has a PTRMEM_CST as its current value. Later code in > cxx_eval_store_expression is upset that it isn't a CONSTRUCTOR when > the type is actually aggregate

Re: [PATCH][libgcc, fuchsia]

2017-02-21 Thread Josh Conner via gcc-patches
Ping^2? On 2/2/17 11:22 AM, Josh Conner wrote: Ping? On 1/17/17 10:40 AM, Josh Conner 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 indire

Re: [PATCH] Fix ICE with -fcheck-pointer-bounds -mmpx (PR target/79633)

2017-02-21 Thread Jeff Law
On 02/21/2017 09:37 AM, Jakub Jelinek wrote: Hi! This function accesses arguments of builtin call without checking the right arguments are actually provided. Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? The is_gimple_call in there is meant as a performance

RE: [PATCH 1/5] Handle WORD_REGISTER_OPERATIONS when reloading (subreg(reg))

2017-02-21 Thread Matthew Fortune
Richard Sandiford writes: > Matthew Fortune writes: > > Eric Botcazou writes: > >> > Thanks for reporting. I'll take a brief look first but revert if > >> > the issue isn't something that vaguely makes sense to me. > >> > >> You need to restrict any WORD_REGISTER_OPERATIONS test to subword > >>

Re: [PATCH 1/5] Handle WORD_REGISTER_OPERATIONS when reloading (subreg(reg))

2017-02-21 Thread Richard Sandiford
Matthew Fortune writes: > Eric Botcazou writes: >> > Thanks for reporting. I'll take a brief look first but revert if the >> > issue isn't something that vaguely makes sense to me. >> >> You need to restrict any WORD_REGISTER_OPERATIONS test to subword >> registers. > > I've reverted this. I hav

Re: [PATCH 1/5] Handle WORD_REGISTER_OPERATIONS when reloading (subreg(reg))

2017-02-21 Thread Kyrill Tkachov
On 21/02/17 16:58, Matthew Fortune wrote: Eric Botcazou writes: Thanks for reporting. I'll take a brief look first but revert if the issue isn't something that vaguely makes sense to me. You need to restrict any WORD_REGISTER_OPERATIONS test to subword registers. I've reverted this. I haven'

RE: [PATCH 1/5] Handle WORD_REGISTER_OPERATIONS when reloading (subreg(reg))

2017-02-21 Thread Matthew Fortune
Eric Botcazou writes: > > Thanks for reporting. I'll take a brief look first but revert if the > > issue isn't something that vaguely makes sense to me. > > You need to restrict any WORD_REGISTER_OPERATIONS test to subword > registers. I've reverted this. I haven't been able to quickly find a ch

[PATCH 2/2] [ARM] Add table of costs for AAarch32 addressing modes.

2017-02-21 Thread charles . baylis
From: Charles Baylis This patch adds support for modelling the varying costs of different addressing modes. The generic cost table treats all addressing modes as having equal cost. The cost table for Cortex-A57 is derived from http://infocenter.arm.com/help/topic/com.arm.doc.uan0015b/Cortex_A57_

[PATCH 1/2] [ARM] Refactor costs calculation for MEM.

2017-02-21 Thread charles . baylis
From: Charles Baylis This patch moves the calculation of costs for MEM into a separate function, and reforms the calculation into two parts. Firstly any additional cost of the addressing mode is calculated, and then the cost of the memory access itself is added. In this patch, the calculation of

[PATCH 0/2] [ARM] PR61551 addressing mode costs

2017-02-21 Thread charles . baylis
From: Charles Baylis Hi Ramana, This patch set continues previous work on fixing the cost calculations for MEMs which use different addressing modes. It implements the approach we discussed at Linaro Connect BKK16. I have included some notes on the patch set as follows: Background: The motiv

Re: [C/C++ PATCH] Fix mode attribute handling (PR c++/79641)

2017-02-21 Thread Jeff Law
On 02/21/2017 09:40 AM, Jakub Jelinek wrote: Hi! On the following testcase, we have TYPE_READONLY integer type before handling the mode attribute and transform it into a signed char type (without TYPE_READONLY), which causes ICE in the FE, because it isn't const anymore. Fixed by making sure we

Re: [PATCH] Fix ICE with selective scheduling and VTA (PR target/79570)

2017-02-21 Thread Jeff Law
On 02/21/2017 09:49 AM, Jakub Jelinek wrote: Hi! We ICE in the following hunk which has been added by Alexandre back in VTA merge. A fairly recent change started clearing BLOCK_FOR_INSN for instructions that are temporarily removed from the IL (but those would never previously satisfy the condi

[PATCH] Fix ICE with selective scheduling and VTA (PR target/79570)

2017-02-21 Thread Jakub Jelinek
Hi! We ICE in the following hunk which has been added by Alexandre back in VTA merge. A fairly recent change started clearing BLOCK_FOR_INSN for instructions that are temporarily removed from the IL (but those would never previously satisfy the condition - they would never be heads of their block

[C++ PATCH] Fix ICE with constexpr store to pointer to method (PR c++/79639)

2017-02-21 Thread Jakub Jelinek
Hi! Apparently we can end up trying to store into a pointer-to-member that has a PTRMEM_CST as its current value. Later code in cxx_eval_store_expression is upset that it isn't a CONSTRUCTOR when the type is actually aggregate. The following patch fixes that, bootstrapped/regtested on x86_64-lin

[C++ PATCH] Diagnose constexpr store to ARRAY_REF with negative index (PR c++/79655)

2017-02-21 Thread Jakub Jelinek
Hi! The following patch fixes ICE where we try to store a[-1]. The problem is that we don't check the bounds first and then later on we assert it is not negative. Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2017-02-21 Jakub Jelinek PR c++/79655

[C/C++ PATCH] Fix mode attribute handling (PR c++/79641)

2017-02-21 Thread Jakub Jelinek
Hi! On the following testcase, we have TYPE_READONLY integer type before handling the mode attribute and transform it into a signed char type (without TYPE_READONLY), which causes ICE in the FE, because it isn't const anymore. Fixed by making sure we have the same quals as before applying the mod

[PATCH] Fix ICE with -fcheck-pointer-bounds -mmpx (PR target/79633)

2017-02-21 Thread Jakub Jelinek
Hi! This function accesses arguments of builtin call without checking the right arguments are actually provided. Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? The is_gimple_call in there is meant as a performance thing, we could call gimple_call_builtin_p fir

[C++ PATCH] Fix decomp error recovery (PR c++/79654)

2017-02-21 Thread Jakub Jelinek
Hi! This patch undoes part of my r245218 change, there is nothing wrong with the decomposition type, it is better to handle it in tsubst_decomp_names. Plus Paolo's decl2.c change that also fixes the ICE. I think we want both, there could be other spots that aren't happy about error_mark_node type

[committed] Avoid pattern-recognizing memset/memcpy/memmove for loops with non-generic address spaces (PR tree-optimization/79649)

2017-02-21 Thread Jakub Jelinek
Hi! At least the library routines for these builtins can't deal with non-generic address spaces, so we shouldn't transform loops setting or copying to and/or from such address spaces into the builtins. Bootstrapped/regtested on x86_64-linux and i686-linux, preapproved by Richard in the PR, commit

Re: [PATCH 6/6] sh: Fixes for RTL checking

2017-02-21 Thread Segher Boessenkool
On Wed, Feb 22, 2017 at 12:16:43AM +0900, Oleg Endo wrote: > That SUBREG vs. REG stuff is annoying.  Isn't there a simple function > that just does the right thing which can be used instead of manually > open-coding these checks over and over again? There is reg_or_subregno, which would even work

Re: [PATCH PR77536]Generate correct profiling information for vectorized loop

2017-02-21 Thread Jan Hubicka
> 2017-02-21 Bin Cheng > > PR tree-optimization/77536 > * tree-ssa-loop-manip.c (niter_for_unrolled_loop): New function. > (tree_transform_and_unroll_loop): Use above function to compute the > estimated niter of unrolled loop and use it when scaling profile. > * tree-ssa-loop-manip.h niter_for_

Re: [PATCH] Remove wrong assert about gcov_type (PR lto/79587).

2017-02-21 Thread Jan Hubicka
> Hello. > > As described in the PR, we represent unsigned long types as gcov_type in > compiler. > That can lead to a negative value in context of GCOV_SINGLE_VALUE (coming > from DIV/MOV expression). > Thus, we have to relax the assert. > > Patch can bootstrap on ppc64le-redhat-linux and surv

Re: [PATCH 6/6] sh: Fixes for RTL checking

2017-02-21 Thread Oleg Endo
On Tue, 2017-02-21 at 14:48 +, Segher Boessenkool wrote: > 2017-02-21  Segher Boessenkool   > > * config/sh/sh.md (tstsi_t): If operands[0] is a SUBREG instead of > a REG, look at the REG it is a SUBREG of. > (splitter for cmpeqsi_t): Ditto. > > --- >  gcc/config/sh/sh.md |

[PATCH] arc: Fixes for RTL checking

2017-02-21 Thread Segher Boessenkool
Whoops, I forgot one. Here it is. Joern, please see . 2017-02-21 Segher Boessenkool * config/arc/arc.c (arc_ccfsm_advance): Only take the PATTERN of this_insn if it is an INSN or JUMP_INSN. (force_offsettable)

Re: [PATCH 1/6] c6x: Fix for RTL checking

2017-02-21 Thread Bernd Schmidt
On 02/21/2017 03:48 PM, Segher Boessenkool wrote: 2017-02-21 Segher Boessenkool * config/c6x/c6x.c (predicate_insn): Do not incorrectly share RTL. Ok, thanks. Bernd

[PATCH 1/6] c6x: Fix for RTL checking

2017-02-21 Thread Segher Boessenkool
2017-02-21 Segher Boessenkool * config/c6x/c6x.c (predicate_insn): Do not incorrectly share RTL. --- gcc/config/c6x/c6x.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/config/c6x/c6x.c b/gcc/config/c6x/c6x.c index 84bfdfa..42b773b 100644 --- a/gcc/config/c6x/c6x.c +++ b/gcc/

Re: [PATCH 2/6] cris: Fix for RTL checking

2017-02-21 Thread Hans-Peter Nilsson
> From: Segher Boessenkool > Date: Tue, 21 Feb 2017 14:48:14 + > 2017-02-21 Segher Boessenkool > > * config/cris/cris.md: Use correct operand in a define_peephole2. Obviously ok, thanks (INTVAL on "const_int_operand" vs. "nonimmediate_operand"). brgds, H-P

[PATCH 5/6] pa: Fixes for RTL checking

2017-02-21 Thread Segher Boessenkool
I do not know what the USEs are really for, so I do not know if using just the pattern here is correct. Using the full insn is probably not correct either though. 2017-02-21 Segher Boessenkool * config/pa/pa.c (pa_combine_instructions): Do not share RTL. Make the special USE

[PATCH 0/6] Fallout from RTL checking

2017-02-21 Thread Segher Boessenkool
Hi! I tested building a cross compiler to all Linux targets (well, those that are supported by GCC), and building Linux with that. I used --enable-checking=yes,rtl,tree and there was some fallout; all in ports, and all with RTL checking. c6x and pa illegally share RTL. The rest of the failures

[PATCH 6/6] sh: Fixes for RTL checking

2017-02-21 Thread Segher Boessenkool
2017-02-21 Segher Boessenkool * config/sh/sh.md (tstsi_t): If operands[0] is a SUBREG instead of a REG, look at the REG it is a SUBREG of. (splitter for cmpeqsi_t): Ditto. --- gcc/config/sh/sh.md | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff

[PATCH 4/6] nios2: Fixes for RTL checking

2017-02-21 Thread Segher Boessenkool
You cannot call REGNO on something that isn't a REG, and you cannot call INTVAL on something that isn't a CONST_INT. The way I fixed nios2_alternate_compare_const is admittedly a bit lame. 2017-02-21 Segher Boessenkool * config/nios2/nios2.c (nios2_simple_const_p): Returns false if t

[PATCH 3/6] microblaze: Fixes for RTL checking

2017-02-21 Thread Segher Boessenkool
REGNO can only be called on REGs, not SUBREGs; and INTVAL does not work on REGs. 2017-02-21 Segher Boessenkool * config/microblaze/microblaze.c (microblaze_expand_shift): Do not test for register moves to themselves. * config/microblaze/microblaze.md (*ashlsi3_byone, *a

[PATCH 2/6] cris: Fix for RTL checking

2017-02-21 Thread Segher Boessenkool
2017-02-21 Segher Boessenkool * config/cris/cris.md: Use correct operand in a define_peephole2. --- gcc/config/cris/cris.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/cris/cris.md b/gcc/config/cris/cris.md index 6ba3772..472aec7 100644 --- a/gcc/con

Re: [PATCH PR77536]Generate correct profiling information for vectorized loop

2017-02-21 Thread Bin.Cheng
On Mon, Feb 20, 2017 at 4:05 PM, Jan Hubicka wrote: >> BTW, if we use gcov_type in calculation from >> expected_loop_iterations_unbounded, >> how should we adjust the number for calling scale_loop_frequencies >> which has int type? In extreme case, gcov_type could be out of int's >> range, we ha

Re: [PATCH] Avoid uninit warnings with PR79345 fix

2017-02-21 Thread Richard Biener
On Tue, 21 Feb 2017, Jakub Jelinek wrote: > On Tue, Feb 21, 2017 at 02:53:32PM +0100, Richard Biener wrote: > > > > The following fixes a bit-load.c bug as well as avoids the warnings > > for two other cases. > > > > Bootstrapped and tested on x86_64-unknown-linux-gnu. > > > > Ok? > > > > Than

Re: [PATCH] Avoid uninit warnings with PR79345 fix

2017-02-21 Thread Jakub Jelinek
On Tue, Feb 21, 2017 at 02:53:32PM +0100, Richard Biener wrote: > > The following fixes a bit-load.c bug as well as avoids the warnings > for two other cases. > > Bootstrapped and tested on x86_64-unknown-linux-gnu. > > Ok? > > Thanks, > Richard. > > 2017-02-21 Richard Biener > > * b

Re: loop versioning doc changes

2017-02-21 Thread Richard Biener
On Tue, Feb 21, 2017 at 11:09 AM, Aldy Hernandez wrote: > Found these while poking at loop versioning. Most importantly, we no longer > have tree_ssa_loop_version, so I removed it from the docs. > > OK? Ok. Richard.

Re: [driver, doc] Support escaping special characters in specs

2017-02-21 Thread Rainer Orth
Hi Sandra, > On 01/16/2017 03:54 AM, Rainer Orth wrote: >> Hi Sandra, >> >>> On 01/13/2017 05:59 AM, Rainer Orth wrote: diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -26391,6 +26391,13 @@ be as many clauses as you

Re: [driver, doc] Support escaping special characters in specs

2017-02-21 Thread Rainer Orth
Hi Joseph, > On Fri, 13 Jan 2017, Rainer Orth wrote: > >> I'm unsure if the patch is large enough to need a copyright assignment >> (in which case it's almost certainly too late for GCC 7), and even if >> not if it's appropriate at this point in the release cycle. > > I think it's big enough to ne

[PATCH] Avoid uninit warnings with PR79345 fix

2017-02-21 Thread Richard Biener
The following fixes a bit-load.c bug as well as avoids the warnings for two other cases. Bootstrapped and tested on x86_64-unknown-linux-gnu. Ok? Thanks, Richard. 2017-02-21 Richard Biener * bt-load.c (compute_defs_uses_and_gen): Clear call_saved. * fixed-value.c (fixed_fro

[PR 79579] Avoid segfault on NULL ipa_edge_args_vector

2017-02-21 Thread Martin Jambor
Hi, in, PR 79579, early inliner creates ipa_node_params_sum which is then tested by ipa_prop_write_jump_functions to figure out whether there has been anything to stream out when there is not. The following patch improves the test - when there are no jump function, there is no point in streaming

Re: [PATCH] Properly deprecate -fipa-cp-alignment

2017-02-21 Thread Martin Jambor
Hi, On Fri, Feb 17, 2017 at 10:34:21AM +0100, Jakub Jelinek wrote: > On Fri, Feb 17, 2017 at 10:31:16AM +0100, Martin Jambor wrote: > > @@ -8066,12 +8065,8 @@ This flag is enabled by default at @option{-O3}. > > > > @item -fipa-cp-alignment > > @opindex -fipa-cp-alignment > > -When enabled, th

Re: [PATCH] Add -Wno-psabi to diagnostic-test-expressions-1.c options

2017-02-21 Thread Jakub Jelinek
On Tue, Feb 21, 2017 at 12:00:03PM +, Segher Boessenkool wrote: > Without this the test fails on 32-bit PowerPC. > > Is this okay for trunk? > > > Segher > > > 2017-02-21 Segher Boessenkool > > gcc/testsuite/ > * gcc.dg/plugin/diagnostic-test-expressions-1.c: Add -Wno-psabi >

[PATCH] Add -Wno-psabi to diagnostic-test-expressions-1.c options

2017-02-21 Thread Segher Boessenkool
Without this the test fails on 32-bit PowerPC. Is this okay for trunk? Segher 2017-02-21 Segher Boessenkool gcc/testsuite/ * gcc.dg/plugin/diagnostic-test-expressions-1.c: Add -Wno-psabi to dg-options. --- gcc/testsuite/gcc.dg/plugin/diagnostic-test-expressions-1.c | 2 +-

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

2017-02-21 Thread Eric Botcazou
> The condition would look like this, What do you think? > > if (!(GET_MODE_PRECISION (mode) != GET_MODE_PRECISION (innermode) > && GET_MODE_SIZE (mode) <= UNITS_PER_WORD > && GET_MODE_SIZE (innermode) <= UNITS_PER_WORD > && WORD_REGISTER_O

Re: [PATCH 1/5] Handle WORD_REGISTER_OPERATIONS when reloading (subreg(reg))

2017-02-21 Thread Eric Botcazou
> Thanks for reporting. I'll take a brief look first but revert if the > issue isn't something that vaguely makes sense to me. You need to restrict any WORD_REGISTER_OPERATIONS test to subword registers. -- Eric Botcazou

RE: [PATCH 1/5] Handle WORD_REGISTER_OPERATIONS when reloading (subreg(reg))

2017-02-21 Thread Matthew Fortune
Christophe Lyon writes: > On 21 February 2017 at 11:59, Kyrill Tkachov > wrote: > > > > On 21/02/17 10:54, Christophe Lyon wrote: > >> > >> Hi, > >> > >> On 20 February 2017 at 13:08, Matthew Fortune > >> wrote: > >>> > >>> Vladimir Makarov writes: > > On 02/07/2017 09:08 AM, Matthew

Re: [PATCH 1/5] Handle WORD_REGISTER_OPERATIONS when reloading (subreg(reg))

2017-02-21 Thread Christophe Lyon
On 21 February 2017 at 11:59, Kyrill Tkachov wrote: > > On 21/02/17 10:54, Christophe Lyon wrote: >> >> Hi, >> >> On 20 February 2017 at 13:08, Matthew Fortune >> wrote: >>> >>> Vladimir Makarov writes: On 02/07/2017 09:08 AM, Matthew Fortune wrote: > > Hi, > > This cha

Re: [PATCH 1/5] Handle WORD_REGISTER_OPERATIONS when reloading (subreg(reg))

2017-02-21 Thread Kyrill Tkachov
On 21/02/17 10:54, Christophe Lyon wrote: Hi, On 20 February 2017 at 13:08, Matthew Fortune wrote: Vladimir Makarov writes: On 02/07/2017 09:08 AM, Matthew Fortune wrote: Hi, This change deals with reloading a subreg(reg) using the inner mode to prevent partial spilling of data like in th

Re: [PATCH 1/5] Handle WORD_REGISTER_OPERATIONS when reloading (subreg(reg))

2017-02-21 Thread Christophe Lyon
Hi, On 20 February 2017 at 13:08, Matthew Fortune wrote: > Vladimir Makarov writes: >> On 02/07/2017 09:08 AM, Matthew Fortune wrote: >> > Hi, >> > >> > This change deals with reloading a subreg(reg) using the inner mode to >> > prevent partial spilling of data like in the case described here: >

[PR translation/79638] "%ntid.y" confuses gcc.pot generation (was: [PATCH] Fix exgettext to handle multi-line help texts from *.opt files (PR translation/78745))

2017-02-21 Thread Thomas Schwinge
Hi! On Thu, 16 Feb 2017 23:33:54 +, Joseph Myers wrote: > [...] So I > think one of the local fixes to avoid this particular case being > misdetected as a spec string should be preferred. Committed to trunk in r245623 (but I have not regenerated the gcc.pot file): commit 74a4a36d1369f295

Re: [PATCH] Fix typo in -masm-dialect option values.

2017-02-21 Thread Martin Liška
On 02/21/2017 10:52 AM, Jakub Jelinek wrote: > On Tue, Feb 21, 2017 at 10:44:40AM +0100, Martin Liška wrote: >> The patch is obvious, however should I also replace the option in *.po files: > > Ok for trunk. > >> gcc/po/be.po:msgid "Known assembler dialects (for use with the >> -masm-dialect= op

[PATCH] Use -Wnornalized=[options] instead of -Wnormalized=

2017-02-21 Thread Martin Liška
Hello. To make documentation and output of --help consistent, I suggest to replace inequality signs with square brackets. Ready to be installed? Martin >From 2b1ae19cf76271790b585e3fd90ba76b37166ed0 Mon Sep 17 00:00:00 2001 From: marxin Date: Tue, 21 Feb 2017 11:39:24 +0100 Subject: [PATCH] Use

RE: [PATCH, MIPS] Calling convention differs depending on the presence of MSA

2017-02-21 Thread Matthew Fortune
Sameera Deshpande writes: > Hi Matthew, > > Please find attached updated patch as per our offline discussion. > > I have disabled return in registers for all vector float types, and > updated the test case accordingly. > > Ok for trunk? Hi Sameera, Sorry for the slow response. I'd like to ex

loop versioning doc changes

2017-02-21 Thread Aldy Hernandez
Found these while poking at loop versioning. Most importantly, we no longer have tree_ssa_loop_version, so I removed it from the docs. OK? gcc/ * doc/loop.texi (Loop manipulation): Remove nonexistent tree_ssa_loop_version from the documentation. * cfgloopmanip.c (loop_v

Re: [GIMPLE FE] add fma_expr

2017-02-21 Thread Richard Biener
On Tue, 21 Feb 2017, Kyrill Tkachov wrote: > > On 21/02/17 08:56, Richard Biener wrote: > > On Tue, 21 Feb 2017, Kyrill Tkachov wrote: > > > > > On 21/02/17 08:43, Richard Biener wrote: > > > > On Mon, 20 Feb 2017, Kyrill Tkachov wrote: > > > > > > > > > Hi Prathamesh, > > > > > > > > > > On 1

Re: [GIMPLE FE] add fma_expr

2017-02-21 Thread Kyrill Tkachov
On 21/02/17 08:56, Richard Biener wrote: On Tue, 21 Feb 2017, Kyrill Tkachov wrote: On 21/02/17 08:43, Richard Biener wrote: On Mon, 20 Feb 2017, Kyrill Tkachov wrote: Hi Prathamesh, On 16/02/17 12:47, Prathamesh Kulkarni wrote: Hi Richard, The attached patch handles fma_expr in gimple-fe

Re: [PATCH] Fix typo in -masm-dialect option values.

2017-02-21 Thread Jakub Jelinek
On Tue, Feb 21, 2017 at 10:44:40AM +0100, Martin Liška wrote: > The patch is obvious, however should I also replace the option in *.po files: Ok for trunk. > gcc/po/be.po:msgid "Known assembler dialects (for use with the -masm-dialect= > option):" > gcc/po/da.po:msgid "Known assembler dialects (

[PATCH] Fix typo in -masm-dialect option values.

2017-02-21 Thread Martin Liška
Hello. The patch is obvious, however should I also replace the option in *.po files: gcc/po/be.po:msgid "Known assembler dialects (for use with the -masm-dialect= option):" gcc/po/da.po:msgid "Known assembler dialects (for use with the -masm-dialect= option):" gcc/po/de.po:msgid "Known assemble

  1   2   >