[PATCH, i386]: Extend Load+RegOp to Mov+MemOp peephole2 to all integer modes

2016-04-28 Thread Uros Bizjak
Hello! 2016-04-29 Uros Bizjak * config/i386/i386.md (Load+RegOp to Mov+MemOp peephole2): Use SWI mode iterator. Use general_reg_operand predicate. (Load+RegOp to Mov+MemOp peephole2 with vector regs): Split peephole to MMX and SSE part. Use mmx_reg_operand and sse_reg_operand

Re: [patch] Refactor macros out of gcc/config/i386.c

2016-04-28 Thread Chris Gregory
Adding the following to the beginning of ``i386-target-macros.c'' would be appreciated: /* Macros used for code generation on IA-32. Only used in i386.c Copyright (C) 1988-2016 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modif

[patch] Refactor macros out of gcc/config/i386.c

2016-04-28 Thread Chris Gregory
I refactored out all the macros at the end of ``gcc/config/i386.c'' into ``gcc/config/i386-target-macros.c''. Included are the diff on ``i386.c'' and the new file. -- Chris Gregory 2016-04-28 Chris Gregory * config/i386/i386.c: Move TARGET macros to separate file (and #inclu

Re: [PATCH] x86 interrupt attribute patch [1/2]

2016-04-28 Thread Yulia Koval
Thanks, Here is the patch. Is it ok? Update TARGET_FUNCTION_INCOMING_ARG documentation On x86, interrupt handlers are only called by processors which push interrupt data onto stack at the address where the normal return address is. Since interrupt handlers must access interrupt d

Re: [PATCH, rs6000] Add support for vector element-reversal built-ins

2016-04-28 Thread Segher Boessenkool
On Wed, Apr 27, 2016 at 01:30:54PM -0500, Bill Schmidt wrote: > 2016-04-27 Bill Schmidt > > * config/rs6000/altivec.h: Change definitions of vec_xl and > vec_xst. > * config/rs6000/rs6000-builtin.def (LD_ELEMREV_V2DF): New. > (LD_ELEMREV_V2DI): New. > (LD_ELEMREV_V

[PATCH, rs6000] Backport some swap optimization improvements

2016-04-28 Thread Bill Schmidt
Hi, The lack of certain swap optimizations added in GCC 6 has shown up as a performance issue in some customer code, where the customer is unable to move off of GCC 5. To accommodate this, I would like to backport these changes to GCC 5. They have all been burned in on trunk for many months. Th

[patch] Remove trailing whitespaces from libstdc++-v3/config

2016-04-28 Thread Chris Gregory
I had to break this patch up into multiple edits. Here is the one for ``libstdc++-v3/config''. -- Chris Gregory Index: libstdc++-v3/config/abi/compatibility.h === --- libstdc++-v3/config/abi/compatibility.h (revision 235619) +++ li

Re: [C++ Patch] PR 66644

2016-04-28 Thread Paolo Carlini
Hi Jason, On 28/04/2016 23:45, Jason Merrill wrote: I would expect this to cause a false negative on a union of two anonymous structs, both of which have initialized members. I think better would be to have a local any_default_members rather than passing the same pointer through all levels.

Re: [PATCH] Improve detection of constant conditions during jump threading

2016-04-28 Thread Patrick Palka
On Thu, Apr 28, 2016 at 12:52 PM, Jeff Law wrote: > On 04/20/2016 03:02 AM, Richard Biener wrote: >> >> On Tue, Apr 19, 2016 at 7:50 PM, Patrick Palka >> wrote: >>> >>> This patch makes the jump threader look through the BIT_AND_EXPRs and >>> BIT_IOR_EXPRs within a condition so that we could find

Re: [PATCH] c++/66561 - __builtin_LINE at al. should yield constant expressions

2016-04-28 Thread Martin Sebor
+/* Fold __builtin_FILE() to a constant string. */ NIT: When we refer to functions, we don't have the trailing(). So drop it from the comment. + +/* Fold __builtin_FUNCTION() to a constant string. */ Similarly. + +/* Fold __builtin_LINE() to an integer constant. */ Similarly. Okay, I'

Re: [PATCH], Fix _Complex when there are multiple FP types the same size

2016-04-28 Thread Michael Meissner
On Thu, Apr 28, 2016 at 05:10:07PM -0500, Segher Boessenkool wrote: > On Thu, Apr 28, 2016 at 05:06:14PM -0400, Michael Meissner wrote: > Hi Mike, > > > * config/rs6000/rs6000.c (rs6000_hard_regno_nregs_internal): Add > > support for __float128 complex datatypes. > > (rs6000_hard_regno

[PATCH] Fix PR tree-optimization/51513

2016-04-28 Thread Peter Bergner
This patch fixes PR tree-optimization/51513, namely the generation of wild branches due to switch case statements that only contain calls to __builtin_unreachable(). For example, compiling using -O2 -fjump-tables --param case-values-threshold=1 (to easily expose the bug), we see: switch (which)

Re: [ping][patch] update handling of 'acc parallel loop' reductions for PR70626

2016-04-28 Thread Cesar Philippidis
Ping. Cesar On 04/15/2016 02:30 PM, Cesar Philippidis wrote: > This patch makes the c, c++ and fortran FEs duplicate the reduction > clauses in a combined 'acc parallel loop' directive when it splits that > directive into separate parallel and loop directives. So given something > like > > #pr

Re: [PATCH] c++/66561 - __builtin_LINE at al. should yield constant expressions

2016-04-28 Thread Jeff Law
On 04/26/2016 05:59 PM, Martin Sebor wrote: PR c++/66639 asked to declare __func__ , __FUNCTION__ and __PRETTY_FUNCTION__ as constexpr​. With the request fulfilled sometime in the 6.0 time frame (possibly as a result of fixing c++/70353), the attached patch implements the corresponding change su

Re: [PATCH] Re-use cc1-checksum.c for stage-final

2016-04-28 Thread Jeff Law
On 04/28/2016 02:49 AM, Richard Biener wrote: The following prototype patch re-uses cc1-checksum.c from the previous stage when compiling stage-final. This eventually allows to compare cc1 from the last two stages to fix the lack of a true comparison when doing LTO bootstrap (it compiles LTO by

Re: [PATCH] Fix ICE during operand_equal_p hash checking (PR middle-end/70843)

2016-04-28 Thread Jeff Law
On 04/28/2016 09:50 AM, Jakub Jelinek wrote: Hi! As reported in the PR and can be seen on this simplified testcase everywhere, the FEs sometimes call operand_equal_p e.g. on a SAVE_EXPR that contains a BIND_EXPR in it, and if arg0 == arg1, operand_equal_p can return non-zero on it. The ICE is be

Re: [PATCH], Fix _Complex when there are multiple FP types the same size

2016-04-28 Thread Segher Boessenkool
On Thu, Apr 28, 2016 at 05:06:14PM -0400, Michael Meissner wrote: Hi Mike, > * config/rs6000/rs6000.c (rs6000_hard_regno_nregs_internal): Add > support for __float128 complex datatypes. > (rs6000_hard_regno_mode_ok): Likewise. > (rs6000_setup_reg_addr_masks): Likewise. >

[PATCH] Fix wrong argument to build_modify_expr

2016-04-28 Thread Jeff Law
As Andrew pointed out a while ago, build_modify_expr's last argument is supposed to be a tree type. However in two cases within fix_builtin_array_notation_fn we end passing down an tree expression. Thankfully in the contexts were this happens, the last argument isn't actually used, so it ha

Re: not a type buglet in c/c-array-notation

2016-04-28 Thread Jeff Law
On 03/31/2016 07:00 AM, Andrew MacLeod wrote: Another potential buglet I stumbled across whilst testing the tree-type work: in c/c-array-notation.c::fix_builtin_array_notation_fn() <...> if (list_size > 1) { new_yes_ind = build_modify_expr (location, *new_var,

Re: [C++ Patch] PR 66644

2016-04-28 Thread Jason Merrill
I would expect this to cause a false negative on a union of two anonymous structs, both of which have initialized members. I think better would be to have a local any_default_members rather than passing the same pointer through all levels. Also, you can look at 'type' rather than DECL_CONTEXT

[PATCH], Fix _Complex when there are multiple FP types the same size

2016-04-28 Thread Michael Meissner
In GCC 6.x, I was not able to get complex __float128 to work before the cut off period for stage1 submissions. This patch enables complex support for PowerPC __float128. Note, it does not address adding complex support in libgcc. Note, similar to the x86_64, you cannot say: typedef _Compl

Re: [PATCH] [ARC] Fix unwanted match for sign extend 16-bit constant.

2016-04-28 Thread Joern Wolfgang Rennecke
On 28/04/16 21:31, Claudiu Zissulescu wrote: Otherwise, I'd suggest using a traditional integer letter. 'J' is free. Thanks for the suggestion, I will use 'J'. Why do you remove half of the indentation? Unwanted reformatting, sorry for this, I will revert it. I have the feeling you are h

Re: [PATCH] [ARC] Fix unwanted match for sign extend 16-bit constant.

2016-04-28 Thread Claudiu Zissulescu
Otherwise, I'd suggest using a traditional integer letter. 'J' is free. Thanks for the suggestion, I will use 'J'. Why do you remove half of the indentation? Unwanted reformatting, sorry for this, I will revert it. I have the feeling you are happy with my new patch. Is there anything to be

Re: Move "X +- C1 CMP C2 to X CMP C2 -+ C1" to match.pd

2016-04-28 Thread Marc Glisse
On Wed, 27 Apr 2016, Richard Biener wrote: --- trunk4/gcc/fold-const.h (revision 235452) +++ trunk4/gcc/fold-const.h (working copy) @@ -13,20 +13,22 @@ WARRANTY; without even the implied warra FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You

[C++ Patch] PR 66644

2016-04-28 Thread Paolo Carlini
Hi, only when Jakub bumped some bugs in preparation for the release I noted that this one remained assigned to me for way too much time... Roughly speaking, the problem is caused by the fact that when we have a GNU anonymous struct inside a union the fields are flattened out and appear to be

Go patch committed: Mark concurrent calls

2016-04-28 Thread Ian Lance Taylor
This patch by Chris Manghane marks concurrent calls in the Go frontend. This is a small change that prepares for future patches. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE ===

Re: [RFA][PATCH] Adding missing calls to bitmap_clear

2016-04-28 Thread Jeff Law
On 03/22/2016 03:37 AM, Richard Biener wrote: On Mon, Mar 21, 2016 at 9:32 PM, Jeff Law wrote: On 03/21/2016 01:10 PM, Bernd Schmidt wrote: On 03/21/2016 08:06 PM, Jeff Law wrote: As noted last week, find_removable_extensions initializes several bitmaps, but doesn't clear them. This is no

[PATCH] Fix PR target/69810 (GCC 7)

2016-04-28 Thread David Edelsohn
This PR was fixed earlier with a patch that was deemed safe for GCC 6 through the removal of splitters for zero extend and sign extend to HImode. Now that trunk has opened for GCC 7 development, the following patch restores the splitters and fixes the bug in the more aggressive manner originally p

Re: [PATCH] x86 interrupt attribute patch [1/2]

2016-04-28 Thread H.J. Lu
On Thu, Apr 28, 2016 at 11:22 AM, Yulia Koval wrote: > Thank you, > Here is the repost. > > Update TARGET_FUNCTION_INCOMING_ARG documentation > > On x86, interrupt handlers are only called by processors which push > interrupt data onto stack at the address where the normal return address >

Re: [PATCH] Disable some i?86 builtins for -m32 (PR target/70858)

2016-04-28 Thread Uros Bizjak
On Thu, Apr 28, 2016 at 9:14 PM, Jakub Jelinek wrote: > Hi! > > The PR reported one ICE caused by a builtin for __x86_64__ guarded > intrinsics to be mistakenly available in -m32 too, I've looked for > INT64 substrings in the various i386.c builtin tables and for each > that has been missing OPTIO

[PATCH, i386]: Extend TARGET_READ_MODIFY{,_WRITE} peepholes to all integer modes

2016-04-28 Thread Uros Bizjak
Hello! Attached patch extends TARGET_READ_MODIFY{,_WRITE} peepholes to handle all integer modes, while also taking care not to introduce additional QImode register stalls. While looking at the insn enable condition, I noticed that we don't use "probe_stack" pattern any more, as the stack check lo

Re: [PATCHv2 7/7] gcc/arc: Add an nps400 specific testcase

2016-04-28 Thread Joern Wolfgang Rennecke
On 21/04/16 12:39, Andrew Burgess wrote: * gcc.target/arc/nps400-1.c: New file. Thanks. I have applied this patch.

[PATCH] Disable some i?86 builtins for -m32 (PR target/70858)

2016-04-28 Thread Jakub Jelinek
Hi! The PR reported one ICE caused by a builtin for __x86_64__ guarded intrinsics to be mistakenly available in -m32 too, I've looked for INT64 substrings in the various i386.c builtin tables and for each that has been missing OPTION_MASK_ISA_64BIT in the mask looked at whether the uses of the bui

Go patch committed: export String_index_expression

2016-04-28 Thread Ian Lance Taylor
This patch to the Go frontend by Chris Manghane makes String_index_expression accessible outside of expressions.cc. This is a step toward future patches. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE =

Re: [PATCHv2 6/7] gcc/arc: Mask integer 'L' operands to 32-bit

2016-04-28 Thread Joern Wolfgang Rennecke
Thanks. I have applied this patch.

Re: RFA: PATCH to tell gdb to skip over is-a.h inlines

2016-04-28 Thread Jason Merrill
On 04/25/2016 01:28 PM, Jason Merrill wrote: There doesn't seem to be any need to step through the is-a inline functions. OK for trunk? Likewise line-map.h. Jason commit 59d1faf71bda301f6ac608534d3a7208f99cb8a5 Author: Jason Merrill Date: Mon Apr 25 21:45:33 2016 -0400 * gdbinit.in:

C++ PATCH to implement C++17 [[nodiscard]] attribute

2016-04-28 Thread Jason Merrill
C++17 adds a [[nodiscard]] attribute, which is similar to the GNU warn_unused_result attribute, except that it applies to function declarations and class/enum types rather than to function types and is suppressed by an explicit conversion to void. I considered just treating it as warn_unused_re

Re: Allow embedded timestamps by C/C++ macros to be set externally (3)

2016-04-28 Thread Martin Sebor
I'm sorry I'm a little late but I have a couple of minor comments on the patch: + epoch = strtoll (source_date_epoch, &endptr, 10); + if ((errno == ERANGE && (epoch == LLONG_MAX || epoch == LLONG_MIN)) + || (errno != 0 && epoch == 0)) +fatal_error (UNKNOWN_LOCATION, "environment varia

Re: [PATCHv2 5/7] gcc/arc: Add nps400 bitops support

2016-04-28 Thread Joern Wolfgang Rennecke
On 21/04/16 12:39, Andrew Burgess wrote: Add support for nps400 bit operation instructions. There's a new flag -mbitops that turns this feature on. There are new instructions, some changes to existing instructions, a new register class to support the new instructions, and some new expand and

Re: Thoughts on memcmp expansion (PR43052)

2016-04-28 Thread Bernd Schmidt
On 01/18/2016 10:22 AM, Richard Biener wrote: See also https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52171 - the inline expansion for small sizes and equality compares should be done on GIMPLE. Today the strlen pass might be an appropriate place to do this given its superior knowledge about strin

Re: Allow embedded timestamps by C/C++ macros to be set externally (3)

2016-04-28 Thread Dhole
On 16-04-28 15:14:20, Jakub Jelinek wrote: > On Thu, Apr 28, 2016 at 03:10:26PM +0200, Bernd Schmidt wrote: > > On 04/28/2016 12:35 PM, Jakub Jelinek wrote: > > >On Thu, Apr 28, 2016 at 12:31:40PM +0200, Bernd Schmidt wrote: > > >>I really don't see anything in that function that looks like a huge

Re: [PATCHv2 4/7] gcc/arc: Add support for nps400 cmem xld/xst instructions

2016-04-28 Thread Joern Wolfgang Rennecke
Thanks. I have merged this patch.

Re: [PATCH] x86 interrupt attribute patch [1/2]

2016-04-28 Thread Yulia Koval
Thank you, Here is the repost. Update TARGET_FUNCTION_INCOMING_ARG documentation On x86, interrupt handlers are only called by processors which push interrupt data onto stack at the address where the normal return address is. Since interrupt handlers must access interrupt data via po

Re: [PATCH] sbitmap: Remove popcount

2016-04-28 Thread Bernd Schmidt
On 04/28/2016 07:30 PM, Segher Boessenkool wrote: In r193072 sbitmap_popcount was removed, so we cannot ask for the popcount of an sbitmap anymore. Nothing calls sbitmap_alloc_with_popcount either. This patch removes everything else popcount-related from sbitmap. Tested on powerpc64-linux; is t

Re: [PATCH][AArch64] Improve aarch64_case_values_threshold setting

2016-04-28 Thread Wilco Dijkstra
Kyrill Tkachov wrote: > On 25/04/16 20:21, Wilco Dijkstra wrote: > > The GCC switch expansion is awful, so > > even with a good indirect predictor it is better to use conditional > > branches. > > In what way is it awful? If there's something we can do better at > can you file a bug report with a

[PATCH] rs6000: Rename insn_chain_scanned_p to spe_insn_chain_scanned_p

2016-04-28 Thread Segher Boessenkool
This makes it clearer this field is only for SPE. Committing. Segher 2016-04-28 Segher Boessenkool * config/rs6000/rs6000.c (machine_function): Rename insn_chain_scanned_p to spe_insn_chain_scanned_p. (rs6000_stack_info): Adjust. --- gcc/config/rs6000/rs6000.c | 8

Re: [PATCH] [ARC] Fix unwanted match for sign extend 16-bit constant.

2016-04-28 Thread Joern Wolfgang Rennecke
On 28/04/16 18:10, Claudiu Zissulescu wrote: Please find the updated patch. Claudiu gcc/ 2016-04-28 Claudiu Zissulescu * config/arc/arc.h (UNSIGNED_INT12, UNSIGNED_INT16): Define. * config/arc/arc.md (umulhisi3): Use arc_short_operand predicate. (umulhisi3_imm): Up

Re: [patch] cleanup *finish_omp_clauses

2016-04-28 Thread Cesar Philippidis
On 04/28/2016 01:56 AM, Jakub Jelinek wrote: > On Wed, Apr 27, 2016 at 07:37:17PM -0700, Cesar Philippidis wrote: >> This patch replaces all of the bool argument to c_finish_omp_clauses and >> finish_omp_clauses in the c and c++ front ends, respectively. Right now >> there are three bool arguments,

[PATCH] sbitmap: Remove popcount

2016-04-28 Thread Segher Boessenkool
In r193072 sbitmap_popcount was removed, so we cannot ask for the popcount of an sbitmap anymore. Nothing calls sbitmap_alloc_with_popcount either. This patch removes everything else popcount-related from sbitmap. Tested on powerpc64-linux; is this okay for trunk? Segher 2016-04-28 Segher Bo

Re: [PATCHv2 3/7] gcc/arc: convert some constraints to define_constraint

2016-04-28 Thread Joern Wolfgang Rennecke
On 21/04/16 12:39, Andrew Burgess wrote: * config/arc/constraints.md (Usd): Convert to define_constraint. (Us<): Likewise. (Us>): Likewise. Thanks. I have allied this patch.

Re: [PATCHv2 1/7] gcc/arc: Add support for nps400 cpu type.

2016-04-28 Thread Joern Wolfgang Rennecke
On 21/04/16 12:39, Andrew Burgess wrote: The nps400 is an arc700 with a set of extension instructions produced by Mellanox (formally EZChip). This commit adds support for the nps400 architecture to the arc backend. After this commit it is possible to compile using -mcpu=nps400 in order to spe

Re: [PATCHv2 2/7] gcc/arc: Replace rI constraint with r & Cm2 for ld and update insns

2016-04-28 Thread Joern Wolfgang Rennecke
On 21/04/16 12:39, Andrew Burgess wrote: * config/arc/arc.md (*loadqi_update): Replace use of 'rI' constraint with separate 'r' and 'Cm2' constraints. Why don't you use simply rCm2 ?

[PATCH] [ARC] Fix unwanted match for sign extend 16-bit constant.

2016-04-28 Thread Claudiu Zissulescu
Please find the updated patch. Claudiu gcc/ 2016-04-28 Claudiu Zissulescu * config/arc/arc.h (UNSIGNED_INT12, UNSIGNED_INT16): Define. * config/arc/arc.md (umulhisi3): Use arc_short_operand predicate. (umulhisi3_imm): Update predicates and constraint letters. (

[PATCH] tracer: Make bb_seen static

2016-04-28 Thread Segher Boessenkool
bb_seen is not used outside of tracer.c. Committing as trivial. 2016-04-28 Segher Boesssenkool * tracer.c (bb_seen): Make static. --- gcc/tracer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/tracer.c b/gcc/tracer.c index 56788a2..477d8b3 100644 --- a/gcc

Re: [PATCHv2 0/7] ARC: Add support for nps400 variant

2016-04-28 Thread Joern Wolfgang Rennecke
On 28/04/16 16:31, Joern Wolfgang Rennecke wrote: However, setting defaults and multilib sets at gcc configure time is also quite useful, as otherwise every user is confronted with building multilibs for a burgeoning array of variants. P.S.: One way to do this is to add introduce a new macro

Re: [PATCH] Improve detection of constant conditions during jump threading

2016-04-28 Thread Jeff Law
On 04/20/2016 03:02 AM, Richard Biener wrote: On Tue, Apr 19, 2016 at 7:50 PM, Patrick Palka wrote: This patch makes the jump threader look through the BIT_AND_EXPRs and BIT_IOR_EXPRs within a condition so that we could find dominating ASSERT_EXPRs that could help make the overall condition eva

[PATCH, i386]: "mov $0, reg" and "mov $-1", reg peepholes cleanup

2016-04-28 Thread Uros Bizjak
No functional changes. 2016-04-28 Uros Bizjak * config/i386/i386.md (zeroing peephole2): Use general_reg_operand. (or $-1,reg peephole2): Ditto. (strict_low_part zeroing peephole2): Use SWI12 mode iterator. Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}. Committed

Re: [PATCH] x86 interrupt attribute patch [1/2]

2016-04-28 Thread Jeff Law
On 04/20/2016 07:48 AM, Koval, Julia wrote: Sorry, here is the right patch. -Original Message- From: Koval, Julia Sent: Wednesday, April 20, 2016 4:42 PM To: 'gcc-patches@gcc.gnu.org' Cc: Lu, Hongjiu ; 'vaalfr...@gmail.com' ; 'ubiz...@gmail.com' ; 'l...@redhat.com' ; Zamyatin, Igor S

Re: [PATCH] asan: Don't check frame numbers in the testsuite

2016-04-28 Thread Segher Boessenkool
On Thu, Apr 28, 2016 at 06:03:38PM +0200, Jakub Jelinek wrote: > On Thu, Apr 28, 2016 at 03:57:38PM +, Segher Boessenkool wrote: > > On various PowerPC configurations, the top frame is often mentioned > > twice in the backtrace, making many asan tests fail. I see no particular > > reason the a

Re: [PATCH] Add peephole for -Os lock; dec (PR target/70821)

2016-04-28 Thread Uros Bizjak
On Thu, Apr 28, 2016 at 5:42 PM, Jakub Jelinek wrote: > Hi! > > Optimizing atomic_fetch_add followed by comparison into just testing > the flags of the lock; sub is handled by a peephole2, which works usually > fine, except that for -Os we have another peephole2 that transforms > movl $-1, %reg in

Re: [PATCH] Update gmp/mpfr/mpc in-tree versions

2016-04-28 Thread Bernd Edlinger
On 28.04.2016 16:29, Richard Biener wrote: > > Another option would be to try if mini-gmp is enough for our > (in-tree) use and what the performance impact would be if we'd > use that (in-tree). > Yes, we would certainly never need more than that subset. But I don't see how mpfr can be built with

Re: [PATCH] asan: Don't check frame numbers in the testsuite

2016-04-28 Thread Jeff Law
On 04/28/2016 09:57 AM, Segher Boessenkool wrote: On various PowerPC configurations, the top frame is often mentioned twice in the backtrace, making many asan tests fail. I see no particular reason the asan tests want to check the frame number, so this patch makes it check for " #. " instead of

Re: [PATCH] asan: Don't check frame numbers in the testsuite

2016-04-28 Thread Yury Gribov
On 04/28/2016 06:57 PM, Segher Boessenkool wrote: On various PowerPC configurations, the top frame is often mentioned twice in the backtrace, making many asan tests fail. I see no particular reason the asan tests want to check the frame number, so this patch makes it check for " #. " instead of

Re: [PATCH] asan: Don't check frame numbers in the testsuite

2016-04-28 Thread Jakub Jelinek
On Thu, Apr 28, 2016 at 03:57:38PM +, Segher Boessenkool wrote: > On various PowerPC configurations, the top frame is often mentioned > twice in the backtrace, making many asan tests fail. I see no particular > reason the asan tests want to check the frame number, so this patch > makes it chec

Re: [PATCH] nds32: Fix casesi (PR70668)

2016-04-28 Thread Jeff Law
On 04/28/2016 09:45 AM, Segher Boessenkool wrote: Expanders do not have more elements in the operands array than declared in the pattern. So, we cannot use operands[5] here. Instead just declare and use another rtx. Built with a cross compiler; not tested otherwise. Is this okay for trunk?

[PATCH] Better location info for "incomplete type" error msg (PR c/70756)

2016-04-28 Thread Marek Polacek
The goal of this patch is to improve the location info for the "incomplete type" error. Turned out this is isn't as trivial as it should be: 1) c_incomplete_type_error is a target hook, so I had to add the location parameter to the other hooks, too, 2) I had to add the location parameter to siz

[PATCH] asan: Don't check frame numbers in the testsuite

2016-04-28 Thread Segher Boessenkool
On various PowerPC configurations, the top frame is often mentioned twice in the backtrace, making many asan tests fail. I see no particular reason the asan tests want to check the frame number, so this patch makes it check for " #. " instead of " #1 ", etc., in all of the c-c++-common/asan tests.

[PATCH] Fix ICE during operand_equal_p hash checking (PR middle-end/70843)

2016-04-28 Thread Jakub Jelinek
Hi! As reported in the PR and can be seen on this simplified testcase everywhere, the FEs sometimes call operand_equal_p e.g. on a SAVE_EXPR that contains a BIND_EXPR in it, and if arg0 == arg1, operand_equal_p can return non-zero on it. The ICE is because inchash::add_expr is unprepared to hash s

Re: [ARM] Enable __fp16 as a function parameter and return type.

2016-04-28 Thread Joseph Myers
On Thu, 28 Apr 2016, Matthew Wahab wrote: > Hello, > > The ARM target supports the half-precision floating point type __fp16 > but does not allow its use as a function return or parameter type. This > patch removes that restriction and defines the ACLE macro > __ARM_FP16_ARGS to indicate this. Th

Re: [PATCH][reload1.c] Convert conditional compilation on WORD_REGISTER_OPERATIONS

2016-04-28 Thread Jeff Law
On 12/15/2015 10:28 AM, Kyrill Tkachov wrote: Hi all, This converts the preprocessor check for WORD_REGISTER_OPERATIONS into a runtime check in reload1.c. Since this one is used to guard part of a condition, I'd appreciate it if someone double-checks that the logic is still equivalent. Bootstr

[PATCH] nds32: Fix casesi (PR70668)

2016-04-28 Thread Segher Boessenkool
Expanders do not have more elements in the operands array than declared in the pattern. So, we cannot use operands[5] here. Instead just declare and use another rtx. Built with a cross compiler; not tested otherwise. Is this okay for trunk? Segher 2016-04-28 Segher Boessenkool P

[PATCH] Add peephole for -Os lock; dec (PR target/70821)

2016-04-28 Thread Jakub Jelinek
Hi! Optimizing atomic_fetch_add followed by comparison into just testing the flags of the lock; sub is handled by a peephole2, which works usually fine, except that for -Os we have another peephole2 that transforms movl $-1, %reg into orl $-1, %reg and that causes the above mentioned peephole2 not

Re: [PATCHv2 0/7] ARC: Add support for nps400 variant

2016-04-28 Thread Joern Wolfgang Rennecke
On 21/04/16 12:39, Andrew Burgess wrote: This new iteration of the previous version is largely the same except that I now no longer use configure time options to build in support for nps400. Instead support controlled with a -mcpu=nps400 command line switch. This change was made to mirror a s

Re: [PATCH][reload.c] Convert conditional compilation of WORD_REGISTER_OPERATIONS

2016-04-28 Thread Jeff Law
On 12/15/2015 10:27 AM, Kyrill Tkachov wrote: Hi all, This converts the preprocessor checks for WORD_REGISTER_OPERATIONS into runtime checks in reload.c. Since this one is used to guard part of a large condition, I'd appreciate it if someone double-checks that the logic is still equivalent. Bo

Re: [PATCH] Update TARGET_FUNCTION_INCOMING_ARG documentation

2016-04-28 Thread H.J. Lu
On Thu, Apr 28, 2016 at 8:25 AM, Jeff Law wrote: > On 11/30/2015 03:35 AM, Bernd Schmidt wrote: >> >> On 11/29/2015 06:14 PM, H.J. Lu wrote: >>> >>> Is this safe for stage 3? >> >> >> Is there a reason to do it now? This doesn't include a testcase. > > Handling the proposed attribute requires exte

Re: [PATCH] doc: discourage use of __attribute__((optimize())) in production code

2016-04-28 Thread Jeff Law
On 12/13/2015 01:19 AM, Markus Trippelsdorf wrote: Many developers are still using __attribute__((optimize())) in production code, although it quite broken. * doc/extend.texi (Common Function Attributes) [optimize]: Discourage use of the optimize attribute. I went back and review

[PATCH PR70803]Require "vect_int_mult" for the test.

2016-04-28 Thread Bin Cheng
Hi, This patch fixes PR70803 by skipping targets that don't support vect_int_mult. It's an obvious change. Thanks, bin gcc/testsuite/ChangeLog 2016-04-29 Bin Cheng PR tree-optimization/70803 * gcc.dg/vect/pr56625.c: Require vect_int_mult.diff --git a/gcc/testsuite/gcc.dg/vec

Re: [PATCH] Update TARGET_FUNCTION_INCOMING_ARG documentation

2016-04-28 Thread Jeff Law
On 11/30/2015 03:35 AM, Bernd Schmidt wrote: On 11/29/2015 06:14 PM, H.J. Lu wrote: Is this safe for stage 3? Is there a reason to do it now? This doesn't include a testcase. Handling the proposed attribute requires extensions to the current function_arg capabilities. I need to go back to t

Re: [PATCH] [ARC] Add new ARCv2 instructions.

2016-04-28 Thread Joern Wolfgang Rennecke
On 20/04/16 13:12, Claudiu Zissulescu wrote: This patch adds new instruction variants as introduced by the ARCv2 architecture. You have used groups of 8 spaces at line starts; tabs should be used instead for indentation. (arc_dwarf_register_span): Remove enum keyword. That bit sh

Re: [PATCH] add -fprolog-pad=N option to c-family

2016-04-28 Thread Jeff Law
On 04/28/2016 05:18 AM, Torsten Duwe wrote: On Thu, Apr 28, 2016 at 11:39:48AM +0300, Maxim Kuvyrkov wrote: On Apr 27, 2016, at 6:22 PM, Torsten Duwe wrote: Your current patch is great for experiments for the kernel engineers to check if suggested approaches to code patching will work. Stil

Re: [PATCH 4/6] [ARC] Handle FPX NaN within optimized floating point library.

2016-04-28 Thread Joern Wolfgang Rennecke
On 28/04/16 15:11, Claudiu Zissulescu wrote: Sure thing, running for ARC700, using original implementation and enabled guarded code for FPX handling: [0x02a2] 0xc000 K Zld_s r0,[sp,0x0] : lw [0x5000c0c0] => 0x : (w1) r0 <= 0x * [0x02a4] 0

Re: [PATCH] Turn some compile-time tests into run-time tests

2016-04-28 Thread Jeff Law
On 04/28/2016 08:03 AM, Patrick Palka wrote: The rest seem OK to me. Note that I'm not convinced all these tests were designed to be execution tests, even though they use __builtin_abort and friends. Though it's a good marker of something that can/should be looked at. True.. What made me l

Re: [PATCH] Update gmp/mpfr/mpc in-tree versions

2016-04-28 Thread Richard Biener
On Thu, 28 Apr 2016, Bernd Edlinger wrote: > On 28.04.2016 14:35, Richard Biener wrote: > > On Thu, 28 Apr 2016, Bernd Edlinger wrote: > > > >> Hi, > >> > >> here is the first part of the patch that addresses only the in-tree > >> builds. I tried different combinations of the documented supported

Re: [PATCH 1/4] PR c++/62314: add fixit hint for missing "template <> " in explicit specialization

2016-04-28 Thread Trevor Saunders
On Thu, Apr 28, 2016 at 10:28:15AM -0400, David Malcolm wrote: > This is a resend of a patch kit I sent in stage 3; the original post > was here: > https://gcc.gnu.org/ml/gcc-patches/2015-12/msg01933.html > > I've rebased the patches against yesterday's trunk and retested them. > > They add var

Re: [PATCH] Improve AVX512F sse4_1_round* patterns

2016-04-28 Thread Kirill Yukhin
Hi Jakub, On 27 Apr 23:34, Jakub Jelinek wrote: > Hi! > > While AVX512F doesn't contain EVEX encoded vround{ss,sd,ps,pd} instructions, > it contains vrndscale* which performs the same thing if bits [4:7] of the > immediate are zero. > > For _mm*_round_{ps,pd} we actually already emit vrndscale* f

Re: [PATCH] Update gmp/mpfr/mpc in-tree versions

2016-04-28 Thread Bernd Edlinger
On 28.04.2016 14:35, Richard Biener wrote: > On Thu, 28 Apr 2016, Bernd Edlinger wrote: > >> Hi, >> >> here is the first part of the patch that addresses only the in-tree >> builds. I tried different combinations of the documented supported >> in-tree versions, and all combinations seem to work. >

Re: [ubsan PATCH] Fix compile-time hog with &TARGET_EXPRs (PR sanitizer/70342)

2016-04-28 Thread Jakub Jelinek
On Thu, Apr 28, 2016 at 04:10:01PM +0200, Marek Polacek wrote: > That works too, though it of course affects all users, not just ubsan. Here's Of course, but I think that is a good thing ;) > the patch with your suggested change. > > Bootstrapped/regtested on x86_64-linux, ok for trunk? > > 20

Re: [PATCH] Mark predicates generated by genmatch as static

2016-04-28 Thread Patrick Palka
On Thu, Apr 28, 2016 at 10:02 AM, Richard Biener wrote: > On Thu, Apr 28, 2016 at 3:50 PM, Patrick Palka wrote: >> The predicate functions emitted by genmatch are expected to only be used >> locally within {gimple,generic}-match.c, so this patch marks them as >> static. Does this look OK to comm

RE: [PATCH 4/6] [ARC] Handle FPX NaN within optimized floating point library.

2016-04-28 Thread Claudiu Zissulescu
Hi, > Where exactly does the test go wrong? The test which fails is this one: TEST_EQ (double, __DBL_MAX__, __DBL_MAX__, 1); From the test file included in the patch. > Can you show a trace of __eqdf2 with register values? Sure thing, running for ARC700, using original implementation a

[AArch64] Remove an unused reload hook.

2016-04-28 Thread Matthew Wahab
Hello, Yvan Roux pointed out that the patch at https://gcc.gnu.org/ml/gcc-patches/2016-02/msg01713.html was never committed. From the original submission: The LEGITIMIZE_RELOAD_ADDRESS macro is only needed for reload. Since the Aarch64 backend no longer supports reload, this macro is not

Re: [ubsan PATCH] Fix compile-time hog with &TARGET_EXPRs (PR sanitizer/70342)

2016-04-28 Thread Marek Polacek
On Thu, Apr 28, 2016 at 11:07:30AM +0200, Jakub Jelinek wrote: > On Wed, Apr 27, 2016 at 07:03:25PM +0200, Marek Polacek wrote: > > This test took forever to compile with -fsanitize=null, because the > > instrumentation was creating incredible amount of duplicated expressions, > > in a > > quadrat

[PATCH 4/4] C: add fixit hint to misspelled field names

2016-04-28 Thread David Malcolm
Similar to the C++ case, but more involved as the location of the pertinent token isn't readily available. The patch adds it as a param to build_component_ref. All callers are updated to provide the info, apart from objc_build_component_ref; fixing the latter would lead to a cascade of other chan

[PATCH 2/4] PR c++/62314: add fixit hint for "expected ';' after class definition"

2016-04-28 Thread David Malcolm
Looking over the discussion of missing semicolons in "Quality of Implementation and Attention to Detail" within http://clang.llvm.org/diagnostics.html and comparing with https://gcc.gnu.org/wiki/ClangDiagnosticsComparison I noticed that of the cases we do handle [1], there's room for improvem

[PATCH 3/4] PR c++/62314: C++: add fixit hint to misspelled member names

2016-04-28 Thread David Malcolm
When we emit a hint about a misspelled member name, it will slightly aid readability if we use a fixit-hint to show the proposed name in context within the source code (and in the future this might support some kind of auto-apply in an IDE). This patch adds such a hint to the C++ frontend, taking

Re: [PATCH] Turn some compile-time tests into run-time tests

2016-04-28 Thread Patrick Palka
On Wed, Apr 27, 2016 at 5:36 PM, Jeff Law wrote: > On 03/10/2016 04:38 PM, Patrick Palka wrote: >> >> I ran the command >> >> git grep -l "dg-do compile" | xargs grep -l __builtin_abort | xargs grep >> -lw main >> >> to find tests marked as compile-time tests that likely ought to instead >> be m

[PATCH 1/4] PR c++/62314: add fixit hint for missing "template <> " in explicit specialization

2016-04-28 Thread David Malcolm
This is a resend of a patch kit I sent in stage 3; the original post was here: https://gcc.gnu.org/ml/gcc-patches/2015-12/msg01933.html I've rebased the patches against yesterday's trunk and retested them. They add various fix-it hints to existing diagnostics (PR 62314 is a catch-all for adding

Re: [PATCH] Mark predicates generated by genmatch as static

2016-04-28 Thread Richard Biener
On Thu, Apr 28, 2016 at 3:50 PM, Patrick Palka wrote: > The predicate functions emitted by genmatch are expected to only be used > locally within {gimple,generic}-match.c, so this patch marks them as > static. Does this look OK to commit after bootstrap and regtest? Actually the idea was to for

Re: [PATCH] Fixup nb_iterations_upper_bound adjustment for vectorized loops

2016-04-28 Thread Richard Biener
On Thu, Apr 28, 2016 at 3:26 PM, Ilya Enkovich wrote: > On 27 Apr 16:05, Richard Biener wrote: >> >> >> >> I'd like to see testcases covering the corner-cases - have them have >> >> upper bound estimates by adjusting known array sizes and also cover >> >> the case of peeling for gaps. >> > >> > OK

[PATCH] Do not build a pointer-to-element type for arrays in layout_type

2016-04-28 Thread Richard Biener
I stumbled over this odd call, present since CVS repo import (r348). Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. Richard. 2016-04-28 Richard Biener * stor-layout.c (layout_type): Do not build a pointer-to-element type for arrays. Index: gcc/stor-layout.c

[PATCH] Mark predicates generated by genmatch as static

2016-04-28 Thread Patrick Palka
The predicate functions emitted by genmatch are expected to only be used locally within {gimple,generic}-match.c, so this patch marks them as static. Does this look OK to commit after bootstrap and regtest? gcc/ChangeLog: * genmatch.c (write_predicate): Mark the emitted function as

  1   2   >