Re: [PATCH 0/3] Support for mandatory tail calls

2016-05-18 Thread Basile Starynkevitch
On 05/19/2016 12:12 AM, Jeff Law wrote: On 05/17/2016 04:01 PM, David Malcolm wrote: There have been requests [1] for libgccjit to better support functional programming by supporting the contination-passing style, in which every function "returns" by calling a "continuation" function pointer.

Re: inhibit the sincos optimization when the target has sin and cos instructions

2016-05-18 Thread Cesar Philippidis
On 05/18/2016 05:29 AM, Nathan Sidwell wrote: > On 05/17/16 17:30, Cesar Philippidis wrote: >> On 05/17/2016 02:22 PM, Andrew Pinski wrote: gcc.sum Tests that now fail, but worked before: nvptx-none-run: gcc.c-torture/execute/20100316-1.c -Os execution test

[PATCH] c++/71147 - [6 Regression] Flexible array member wrongly rejected in template

2016-05-18 Thread Martin Sebor
The handling of flexible array members whose element type was dependent tried to deal with the case when the element type was not yet completed but it did it wrong. The attached patch corrects the handling by trying to complete the element type first. Thanks Martin PR c++/71147 - [6 Regression]

Re: [PATCH][AArch64] Improve aarch64_case_values_threshold setting

2016-05-18 Thread Jim Wilson
On Mon, May 16, 2016 at 4:30 AM, James Greenhalgh wrote: > As this change will change code generation for all cores (except > Exynos-M1), I'd like to hear from those with more detailed knowledge of > ThunderX, X-Gene and qdf24xx before I take this patch. It looks like a

[PATCH] PR c/71171: Fix uninitialized source_range in c_parser_postfix_expression

2016-05-18 Thread David Malcolm
PR c/71171 reports yet another instance of the src_range of a c_expr being used without initialization. Investigation shows that this was due to error-handling, where the "value" field of a c_expr is set to error_mark_node without touching the src_range, leading to complaints from valgrind. This

[PATCH] PR c++/71184: Fix NULL dereference in cp_parser_operator

2016-05-18 Thread David Malcolm
The source-range handling for the array form of operator new/delete erroneously assumed that the "]" was present, leading to a dereference of NULL when it's absent. Fix it thusly. Successfully bootstrapped on x86_64-pc-linux-gnu; adds 6 PASS results to g++.sum. OK for trunk and gcc-6-branch?

[PATCH] c/71115 - Missing warning: excess elements in struct initializer

2016-05-18 Thread Martin Sebor
The bug points out that the following and similar invalid uses of NULL are not diagnosed. #include const char* a[1] = { "", NULL }; The attached patch implements the suggestion on the Diagnostics Guidelines Wiki to call expansion_point_location_if_in_system_header to determine the

[PATCH] Ensure source_date_epoch is always initialised

2016-05-18 Thread James Clarke
gcc/c-family PR preprocessor/71183 * c-common.c (get_source_date_epoch): Move to libcpp/init.c. * c-common.h (get_source_date_epoch): Remove definition, as it is now internal to libcpp/init.c. * c-lex.c (c_lex_with_flags): Remove source_date_epoch

Re: [C++ Patch/RFC] PR 70572 ("[4.9/5/6/7 Regression] ICE on code with decltype (auto) on x86_64-linux-gnu in digest_init_r")

2016-05-18 Thread Paolo Carlini
Hi, On 18/05/2016 23:13, Jason Merrill wrote: Shouldn't we have complained about declaring a variable with function type before we get here? Ah, interesting, I think all the other compilers I have at hand don't even try to catch the issue so early. In any case, something as simple as the

Re: [PATCH 2/3] function: Factor out make_*logue_seq

2016-05-18 Thread Segher Boessenkool
On Wed, May 18, 2016 at 01:35:16PM -0500, Segher Boessenkool wrote: > On Wed, May 18, 2016 at 11:20:29AM -0700, H.J. Lu wrote: > > >> > * function.c (make_split_prologue_seq, make_prologue_seq, > > >> > make_epilogue_seq): New functions, factored out from... > > >> >

Re: [PATCH 0/3] Support for mandatory tail calls

2016-05-18 Thread Jeff Law
On 05/17/2016 04:01 PM, David Malcolm wrote: There have been requests [1] for libgccjit to better support functional programming by supporting the contination-passing style, in which every function "returns" by calling a "continuation" function pointer. These calls must be guaranteed to be

Re: [PATCH] PR driver/69265: add hint for options with misspelled arguments

2016-05-18 Thread Jeff Law
On 05/09/2016 06:14 PM, David Malcolm wrote: opts-common.c's cmdline_handle_error handles invalid arguments for options with CL_ERR_ENUM_ARG by building a strings listing the valid arguments. By also building a vec of valid arguments, we can use find_closest_string and provide a hint if we see

Re: [PATCH] Make basic asm implicitly clobber memory

2016-05-18 Thread Jeff Law
On 05/07/2016 11:38 AM, Andrew Haley wrote: On 06/05/16 07:35, David Wohlferd wrote: 1) I'm not clear precisely what problem this patch fixes. It's true that some people have incorrectly assumed that basic asm clobbers memory and this change would fix their code. But some people also

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

2016-05-18 Thread Jeff Law
On 05/03/2016 04:32 AM, Richard Biener wrote: On Tue, 3 May 2016, Richard Biener wrote: On Mon, 2 May 2016, Jeff Law wrote: On 04/29/2016 05:36 AM, Richard Biener wrote: On Thu, 28 Apr 2016, Jeff Law wrote: On 04/28/2016 02:49 AM, Richard Biener wrote: The following prototype patch

Re: [PATCH] Clean up tests where a later dg-do completely overrides another.

2016-05-18 Thread Jeff Law
On 05/02/2016 10:24 AM, Dominik Vogt wrote: On Mon, May 02, 2016 at 09:29:50AM -0600, Jeff Law wrote: On 04/29/2016 05:56 PM, Dominik Vogt wrote: ... Maybe a comment should be added to the test case /* If this test is *run* (not just compiled) and therefore fails on non sh*-targets, this

Re: [PATCH] libiberty: support demangling of rvalue reference typenames

2016-05-18 Thread Jeff Law
On 01/04/2016 06:43 PM, Artemiy Volkov wrote: 016-01-04 Artemiy Volkov * cplus-dem.c (enum type_kind_t): Add tk_rvalue_reference constant. (demangle_template_value_parm): Handle tk_rvalue_reference type kind. (do_type): Support 'O'

Re: [C++ Patch/RFC] PR 70572 ("[4.9/5/6/7 Regression] ICE on code with decltype (auto) on x86_64-linux-gnu in digest_init_r")

2016-05-18 Thread Jason Merrill
On 05/18/2016 11:48 AM, Paolo Carlini wrote: Hi, this issue should be easy to fix. Broken code like: void foo () { decltype (auto) a = foo; } triggers the gcc_assert in digest_init_r: /* Come here only for aggregates: records, arrays, unions, complex numbers and vectors. */

Re: [PATCH] Make C++ honor the enum mode attribute

2016-05-18 Thread Jason Merrill
OK. Jason

Re: [PATCH] Fix another case of noreturn call with TREE_ADDRESSABLE type on lhs (PR c++/71100)

2016-05-18 Thread Jason Merrill
OK. Jason On Wed, May 18, 2016 at 4:55 PM, Jakub Jelinek wrote: > Hi! > > In 6+ we require that lhs is present if the return type of a call is > TREE_ADDRESSABLE, apparently this function has been missed. > > Fixed thusly, bootstrapped/regtested (at r236371, later trunk fails

[PATCH] Fix up vec_set_* for -mavx512vl -mno-avx512dq

2016-05-18 Thread Jakub Jelinek
Hi! The vinsert[if]64x2 instructions are AVX512VL & AVX512DQ, so if only AVX512VL is on, we should emit the other insns - 32x4, which without masking do the same thing. With masking, we have to require TARGET_AVX512DQ. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?

[PATCH] Improve XMM16+ handling in vec_set*

2016-05-18 Thread Jakub Jelinek
Hi! vinserti32x4 is in AVX512VL. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2016-05-18 Jakub Jelinek * config/i386/sse.md (vec_set_lo_v16hi, vec_set_hi_v16hi, vec_set_lo_v32qi, vec_set_hi_v32qi): Add alternative with v

[PATCH] Improve 128-bit to 256-bit broadcasts

2016-05-18 Thread Jakub Jelinek
Hi! vbroadcast[fi]32x4 and vinsert[fi]32x4 are in AVX512VL, vbroadcast[fi]64x2 and vinsert[fi]64x2 are in AVX512VL & AVX512DQ. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2016-05-18 Jakub Jelinek * config/i386/sse.md (i128vldq): New mode

[PATCH] Improve XMM16-31 handling in various *vec_dup* patterns

2016-05-18 Thread Jakub Jelinek
Hi! These instructions are available in AVX512VL, so we can use XMM16+ in there. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2016-05-18 Jakub Jelinek * config/i386/sse.md (avx2_vec_dupv4df): Use v instead of x constraint, use

[PATCH] Fix another case of noreturn call with TREE_ADDRESSABLE type on lhs (PR c++/71100)

2016-05-18 Thread Jakub Jelinek
Hi! In 6+ we require that lhs is present if the return type of a call is TREE_ADDRESSABLE, apparently this function has been missed. Fixed thusly, bootstrapped/regtested (at r236371, later trunk fails miserably on both x86_64-linux and i686-linux), ok for trunk/6.2? 2016-05-18 Jakub Jelinek

[PATCH, alpha]: Fix PR 71145: Error: No lda !gpdisp!278 was found

2016-05-18 Thread Uros Bizjak
Hello! Alpha assembler requires that matching "lda $29,0($29) !gpdisp!NNN" always follow "ldah $29,0($26)!gpdisp!NNN". However, when the compiler inserts trap insn, it (correctly) figures out that $29 is unused, and removes "lda" from insn stream. Since ldah is defined as unspec_volatile,

Re: [PATCH 2/4] BRIG (HSAIL) frontend: The FE itself.

2016-05-18 Thread David Malcolm
On Wed, 2016-05-18 at 19:59 +0300, Pekka Jääskeläinen wrote: > Hi Joseph, > > Thanks for the comments. Updated patch attached. Hopefully I > didn't miss any diags. It looks like the attachment doesn't contain the patch; on unzipping I just see a 27 byte file reading "The BRIG frontend itself."

Re: [PATCH 2/3] function: Factor out make_*logue_seq

2016-05-18 Thread Segher Boessenkool
On Wed, May 18, 2016 at 11:20:29AM -0700, H.J. Lu wrote: > >> > * function.c (make_split_prologue_seq, make_prologue_seq, > >> > make_epilogue_seq): New functions, factored out from... > >> > (thread_prologue_and_epilogue_insns): Here. > >> > >> It breaks x86: > > > > Are

[PATCH], Add support for PowerPC ISA 3.0 VNEGD/VNEGW instructions

2016-05-18 Thread Michael Meissner
Unlike some of my patches, this is a fairly simple patch to add support for the VNEGW and VNEGD instructions that were added in ISA 3.0. Note, ISA 3.0 does not provide negation for V16QImode/V8HImode, just V4SImode/V2DImode. I discovered that when we added ISA 2.07 support for V2DImode, we

[patch, fortran] PR66461 ICE on missing end program in fixed source

2016-05-18 Thread Jerry DeLisle
Hi all, The following patch regression tested on x86-64. The ICE is from an attempt to free a bad expression after a MATCH_ERROR is returned. I have not been able to identify an exact cause, there being numerous matchers involved attempting to match the logical expression. Regardless, it is an

Re: [PATCH 2/3] function: Factor out make_*logue_seq

2016-05-18 Thread H.J. Lu
On Wed, May 18, 2016 at 11:20 AM, H.J. Lu wrote: > On Wed, May 18, 2016 at 11:11 AM, Segher Boessenkool > wrote: >> On Wed, May 18, 2016 at 10:17:32AM -0700, H.J. Lu wrote: >>> On Mon, May 16, 2016 at 6:09 PM, Segher Boessenkool >>>

Re: [PATCH 2/3] function: Factor out make_*logue_seq

2016-05-18 Thread H.J. Lu
On Wed, May 18, 2016 at 11:11 AM, Segher Boessenkool wrote: > On Wed, May 18, 2016 at 10:17:32AM -0700, H.J. Lu wrote: >> On Mon, May 16, 2016 at 6:09 PM, Segher Boessenkool >> wrote: >> > Make new functions make_split_prologue_seq,

[PING**2] [PATCH] Make C++ honor the enum mode attribute

2016-05-18 Thread Bernd Edlinger
Ping... On 07.05.2016 11:54 Bernd Edlinger wrote: > Ping.. > > For this patch: https://gcc.gnu.org/ml/gcc-patches/2016-04/msg02069.html > > Thanks > Bernd. >

Re: [PATCH 2/3] function: Factor out make_*logue_seq

2016-05-18 Thread Segher Boessenkool
On Wed, May 18, 2016 at 10:17:32AM -0700, H.J. Lu wrote: > On Mon, May 16, 2016 at 6:09 PM, Segher Boessenkool > wrote: > > Make new functions make_split_prologue_seq, make_prologue_seq, and > > make_epilogue_seq. > > > > Tested as in the previous patch; is this okay

Re: [PATCH] Fix PR71104 - call gimplification

2016-05-18 Thread Jeff Law
On 05/17/2016 06:28 AM, Richard Biener wrote: The following patch addresses PR71104 which shows verify-SSA ICEs after gimplify-into-SSA. The issue is that for returns-twice calls we gimplify register uses in the LHS before the actual call which leads to p.0_1 = p; _2 = vfork (); *p.0_1

Re: [PATCH][PR sanitizer/64354] Define __SANITIZE_THREAD__ and __SANITIZE_UNDEFINED__ macros if corresponding switches are enabled.

2016-05-18 Thread Maxim Ostapenko
On 18/05/16 20:39, Yuri Gribov wrote: On Wed, May 18, 2016 at 8:33 PM, Maxim Ostapenko wrote: Hi, when compiling with -fsanitize=address we define __SANITIZE_ADDRESS__ macros, but we don't do this for -fsanitize=thread and -fsanitize=undefined. Perhaps we should be

Re: New C++ PATCH for c++/10200 et al

2016-05-18 Thread Jason Merrill
On 05/13/2016 03:17 PM, Jason Merrill wrote: On 02/16/2016 07:49 PM, Jason Merrill wrote: Clearly the DR 141 change is requiring much larger adjustments in the rest of the compiler than I'm comfortable making at this point in the GCC 6 schedule, so I'm backing out my earlier changes for 10200

Re: [PATCH][PR sanitizer/64354] Define __SANITIZE_THREAD__ and __SANITIZE_UNDEFINED__ macros if corresponding switches are enabled.

2016-05-18 Thread Yuri Gribov
On Wed, May 18, 2016 at 8:33 PM, Maxim Ostapenko wrote: > Hi, > > when compiling with -fsanitize=address we define __SANITIZE_ADDRESS__ > macros, but we don't do this for -fsanitize=thread and -fsanitize=undefined. > Perhaps we should be more symmetric here and define

Re: [PATCH][PR sanitizer/64354] Define __SANITIZE_THREAD__ and __SANITIZE_UNDEFINED__ macros if corresponding switches are enabled.

2016-05-18 Thread Yuri Gribov
On Wed, May 18, 2016 at 8:36 PM, Jakub Jelinek wrote: > On Wed, May 18, 2016 at 08:33:53PM +0300, Maxim Ostapenko wrote: >> when compiling with -fsanitize=address we define __SANITIZE_ADDRESS__ >> macros, but we don't do this for -fsanitize=thread and -fsanitize=undefined. >>

Re: [PATCH][PR sanitizer/64354] Define __SANITIZE_THREAD__ and __SANITIZE_UNDEFINED__ macros if corresponding switches are enabled.

2016-05-18 Thread Jakub Jelinek
On Wed, May 18, 2016 at 08:33:53PM +0300, Maxim Ostapenko wrote: > when compiling with -fsanitize=address we define __SANITIZE_ADDRESS__ > macros, but we don't do this for -fsanitize=thread and -fsanitize=undefined. > Perhaps we should be more symmetric here and define corresponding >

[PATCH][PR sanitizer/64354] Define __SANITIZE_THREAD__ and __SANITIZE_UNDEFINED__ macros if corresponding switches are enabled.

2016-05-18 Thread Maxim Ostapenko
Hi, when compiling with -fsanitize=address we define __SANITIZE_ADDRESS__ macros, but we don't do this for -fsanitize=thread and -fsanitize=undefined. Perhaps we should be more symmetric here and define corresponding __SANITIZE_THREAD__ and __SANITIZE_UNDEFINED__ macros respectively? I

Re: [PATCH 2/3] function: Factor out make_*logue_seq

2016-05-18 Thread H.J. Lu
On Mon, May 16, 2016 at 6:09 PM, Segher Boessenkool wrote: > Make new functions make_split_prologue_seq, make_prologue_seq, and > make_epilogue_seq. > > Tested as in the previous patch; is this okay for trunk? > > > Segher > > > 2016-05-16 Segher Boessenkool

Re: [PATCH #2] Add PowerPC ISA 3.0 word splat and byte immediate splat support

2016-05-18 Thread Michael Meissner
On Wed, May 18, 2016 at 06:53:51AM -0500, Segher Boessenkool wrote: > On Tue, May 17, 2016 at 07:08:52PM -0400, Michael Meissner wrote: > > FWIW, the problem after subversion id 236136 shows up when the trunk > > compiler > > is built with the host compiler (4.3.4). > > That compiler is almost

Re: [PATCH 0/4] BRIG (HSAIL) frontend

2016-05-18 Thread Pekka Jääskeläinen
Hi Joseph, Updated diffstat below: Makefile.def | 3 + Makefile.in | 489 + configure | 1 + configure.ac | 1 +

Re: [PATCH 2/4] BRIG (HSAIL) frontend: The FE itself.

2016-05-18 Thread Pekka Jääskeläinen
Hi Joseph, Thanks for the comments. Updated patch attached. Hopefully I didn't miss any diags. On Wed, May 18, 2016 at 3:20 AM, Joseph Myers wrote: > This patch has many improperly formatted diagnostic messages (e.g. > starting with capital letters, ending with '.' or

Re: [PATCH 1/4] BRIG (HSAIL) frontend: configuration file changes and misc

2016-05-18 Thread Pekka Jääskeläinen
Hi, Attached an updated patch (rebased + added .texi docs). On Mon, May 16, 2016 at 8:25 PM, Pekka Jääskeläinen wrote: > The configuration file changes and misc. updates required > by the BRIG frontend. > > Also, added include/hsa-interface.h which is hsa.h taken from

[PATCH, PR rtl-optimization/71148] Avoid cleanup_cfg called with invalidated dominance info

2016-05-18 Thread Ilya Enkovich
Hi, This patch resolves PR71148 by releasing dominance info before cleanup_cfg calls to avoid attempts to fixup invalid dominance info. Dominance info handling in cleanup_cfg looks weird though. It tries to fix it but can invalidate it at the same time (PR71084). We should probably do something

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

2016-05-18 Thread Joseph Myers
On Wed, 18 May 2016, Matthew Wahab wrote: > On 18/05/16 09:41, Ramana Radhakrishnan wrote: > > On Mon, May 16, 2016 at 2:16 PM, Tejas Belagod > > wrote: > > > > > > > > We do have plans to fix pre-ACLE behavior of fp16 to conform to current > > > ACLE > > > spec,

[C++ Patch/RFC] PR 70572 ("[4.9/5/6/7 Regression] ICE on code with decltype (auto) on x86_64-linux-gnu in digest_init_r")

2016-05-18 Thread Paolo Carlini
Hi, this issue should be easy to fix. Broken code like: void foo () { decltype (auto) a = foo; } triggers the gcc_assert in digest_init_r: /* Come here only for aggregates: records, arrays, unions, complex numbers and vectors. */ gcc_assert (TREE_CODE (type) == ARRAY_TYPE

Re: [C++ Patch] PR 69793 ("ICE on invalid code in "cp_lexer_peek_nth_token"")

2016-05-18 Thread Paolo Carlini
Hi, On 18/05/2016 17:17, Jason Merrill wrote: On 05/18/2016 11:05 AM, Paolo Carlini wrote: On 18/05/2016 16:39, Jason Merrill wrote: On 05/17/2016 04:47 PM, Paolo Carlini wrote: this ICE during error recovery exposes a rather more general weakness: we should never call

RE: [Patch V2] Fix SLP PR58135.

2016-05-18 Thread Kumar, Venkataramanan
Hi Richard, > -Original Message- > From: Richard Biener [mailto:richard.guent...@gmail.com] > Sent: Tuesday, May 17, 2016 5:40 PM > To: Kumar, Venkataramanan > Cc: gcc-patches@gcc.gnu.org > Subject: Re: [Patch V2] Fix SLP PR58135. > > On Tue, May 17, 2016

Re: [C++ Patch] PR 69793 ("ICE on invalid code in "cp_lexer_peek_nth_token"")

2016-05-18 Thread David Malcolm
On Wed, 2016-05-18 at 17:05 +0200, Paolo Carlini wrote: > Hi, > > On 18/05/2016 16:39, Jason Merrill wrote: > > On 05/17/2016 04:47 PM, Paolo Carlini wrote: > > > this ICE during error recovery exposes a rather more general > > > weakness: > > > we should never call cp_lexer_peek_nth_token (*, 2)

Re: [PATCH 8/17][ARM] Add VFP FP16 arithmetic instructions.

2016-05-18 Thread Joseph Myers
On Wed, 18 May 2016, Matthew Wahab wrote: > AArch64 follows IEEE-754 but ARM (AArch32) adds restrictions like > flush-to-zero that could affect the outcome of a calculation. The result of a float computation on two values immediately promoted from fp16 cannot be within the subnormal range for

Re: [C++ Patch] PR 69793 ("ICE on invalid code in "cp_lexer_peek_nth_token"")

2016-05-18 Thread Jason Merrill
On 05/18/2016 11:05 AM, Paolo Carlini wrote: On 18/05/2016 16:39, Jason Merrill wrote: On 05/17/2016 04:47 PM, Paolo Carlini wrote: this ICE during error recovery exposes a rather more general weakness: we should never call cp_lexer_peek_nth_token (*, 2) when a previous cp_lexer_peek_token

Re: [PATCH PR69848/partial]Propagate comparison into VEC_COND_EXPR if target supports

2016-05-18 Thread Bin.Cheng
On Tue, May 17, 2016 at 12:08 PM, Richard Biener wrote: > On Mon, May 16, 2016 at 10:09 AM, Bin.Cheng wrote: >> On Fri, May 13, 2016 at 5:53 PM, Richard Biener >> wrote: >>> On May 13, 2016 6:02:27 PM GMT+02:00, Bin

Re: [C++ Patch] PR 69793 ("ICE on invalid code in "cp_lexer_peek_nth_token"")

2016-05-18 Thread Paolo Carlini
Hi, On 18/05/2016 16:39, Jason Merrill wrote: On 05/17/2016 04:47 PM, Paolo Carlini wrote: this ICE during error recovery exposes a rather more general weakness: we should never call cp_lexer_peek_nth_token (*, 2) when a previous cp_lexer_peek_token returns CPP_EOF. Hmm, that seems fragile,

Re: [C++ Patch] PR 69793 ("ICE on invalid code in "cp_lexer_peek_nth_token"")

2016-05-18 Thread Jason Merrill
On 05/17/2016 04:47 PM, Paolo Carlini wrote: this ICE during error recovery exposes a rather more general weakness: we should never call cp_lexer_peek_nth_token (*, 2) when a previous cp_lexer_peek_token returns CPP_EOF. Hmm, that seems fragile, I would expect it to keep returning EOF. But

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

2016-05-18 Thread Ramana Radhakrishnan
On 18/05/16 15:33, Matthew Wahab wrote: > On 18/05/16 09:41, Ramana Radhakrishnan wrote: >> On Mon, May 16, 2016 at 2:16 PM, Tejas Belagod >> wrote: >> >>> >>> We do have plans to fix pre-ACLE behavior of fp16 to conform to current ACLE >>> spec, but can't say when

Re: [RFC][PATCH][PR63586] Convert x+x+x+x into 4*x

2016-05-18 Thread H.J. Lu
On Wed, May 4, 2016 at 6:57 PM, kugan wrote: > Hi Richard, > >> >> maybe instert_stmt_after will help here, I don't think you got the >> insertion >> logic correct, thus insert_stmt_after (mul_stmt, def_stmt) which I think >> misses GIMPLE_NOP handling. At

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

2016-05-18 Thread Matthew Wahab
On 18/05/16 09:41, Ramana Radhakrishnan wrote: On Mon, May 16, 2016 at 2:16 PM, Tejas Belagod wrote: We do have plans to fix pre-ACLE behavior of fp16 to conform to current ACLE spec, but can't say when exactly. Matthew, could you please take a look at this

Re: [C++ Patch] PR 70466 ("ICE on invalid code in tree check: expected constructor, have parm_decl in convert_like_real...")

2016-05-18 Thread Jason Merrill
On 05/18/2016 10:22 AM, Paolo Carlini wrote: Hi, On 18/05/2016 16:08, Jason Merrill wrote: On 05/17/2016 05:57 PM, Paolo Carlini wrote: On 17/05/2016 20:15, Jason Merrill wrote: On 05/17/2016 04:47 AM, Paolo Carlini wrote: ... alternately, if the substance of my patchlet is right, we could

Re: [Patch] PR rtl-optimization/71150, guard in_class_p check with REG_P

2016-05-18 Thread Vladimir Makarov
On 05/17/2016 06:02 AM, Jiong Wang wrote: This bug is introduced by my commit r236181 where the inner rtx of SUBREG haven't been checked while it should as "in_class_p" only works with REG, and SUBREG_REG is actually not always REG. If REG_P check failed, then we should fall back to normal

Re: [C++ Patch] PR 70466 ("ICE on invalid code in tree check: expected constructor, have parm_decl in convert_like_real...")

2016-05-18 Thread Paolo Carlini
Hi, On 18/05/2016 16:08, Jason Merrill wrote: On 05/17/2016 05:57 PM, Paolo Carlini wrote: On 17/05/2016 20:15, Jason Merrill wrote: On 05/17/2016 04:47 AM, Paolo Carlini wrote: ... alternately, if the substance of my patchlet is right, we could simplify a bit the logic per the below.

Re: [PATCH #2] Add PowerPC ISA 3.0 word splat and byte immediate splat support

2016-05-18 Thread Michael Meissner
On Wed, May 18, 2016 at 07:15:10AM -0500, Segher Boessenkool wrote: > On Tue, May 17, 2016 at 06:45:49PM -0400, Michael Meissner wrote: > > As I mentioned in the last message, my previous patch had some problems that > > showed up on big endian systems, using RELOAD (one of the tests that failed

Re: [C++ Patch] PR 70466 ("ICE on invalid code in tree check: expected constructor, have parm_decl in convert_like_real...")

2016-05-18 Thread Jason Merrill
On 05/17/2016 05:57 PM, Paolo Carlini wrote: On 17/05/2016 20:15, Jason Merrill wrote: On 05/17/2016 04:47 AM, Paolo Carlini wrote: ... alternately, if the substance of my patchlet is right, we could simplify a bit the logic per the below. Here's a well-formed variant that was accepted by

Re: [PATCH, ARM 3/7, ping1] Fix indentation of FL_FOR_ARCH* definition after adding support for ARMv8-M

2016-05-18 Thread Kyrill Tkachov
On 18/05/16 14:45, Thomas Preudhomme wrote: On Wednesday 18 May 2016 11:30:43 Kyrill Tkachov wrote: Hi Thomas, On 17/05/16 11:10, Thomas Preudhomme wrote: Ping? *** gcc/ChangeLog *** 2015-11-06 Thomas Preud'homme * config/arm/arm-protos.h: Reindent

Re: [PATCH, ARM 3/7, ping1] Fix indentation of FL_FOR_ARCH* definition after adding support for ARMv8-M

2016-05-18 Thread Thomas Preudhomme
On Wednesday 18 May 2016 11:30:43 Kyrill Tkachov wrote: > Hi Thomas, > > On 17/05/16 11:10, Thomas Preudhomme wrote: > > Ping? > > > > *** gcc/ChangeLog *** > > > > 2015-11-06 Thomas Preud'homme > > > > * config/arm/arm-protos.h: Reindent FL_FOR_* macro

Re: [PATCH 8/17][ARM] Add VFP FP16 arithmetic instructions.

2016-05-18 Thread Matthew Wahab
On 18/05/16 01:51, Joseph Myers wrote: On Tue, 17 May 2016, Matthew Wahab wrote: In most cases the instructions are added using non-standard pattern names. This is to force operations on __fp16 values to be done, by conversion, using the single-precision instructions. The exceptions are the

Re: [PATCH] Optimize strchr (s, 0) to strlen

2016-05-18 Thread Richard Biener
On Wed, May 18, 2016 at 2:29 PM, Wilco Dijkstra wrote: > Richard Biener wrote: >> >> Yeah ;) I'm currently bootstrapping/testing the patch that makes it >> possible to >> write all this in match.pd. > > So what was the conclusion? Improving match.pd to be able to handle

Re: [AArch64, 2/4] Extend vector mutiply by element to all supported modes

2016-05-18 Thread Jiong Wang
On 18/05/16 09:17, Christophe Lyon wrote: On 17 May 2016 at 14:27, James Greenhalgh wrote: On Mon, May 16, 2016 at 10:09:31AM +0100, Jiong Wang wrote: AArch64 support vector multiply by element for V2DF, V2SF, V4SF, V2SI, V4SI, V4HI, V8HI. All above are well

Re: [PATCH] Improve TBAA with unions

2016-05-18 Thread Eric Botcazou
> We have a good place in the middle-end to apply such rules which > is component_uses_parent_alias_set_from - this is where I move > the logic that is duplicated in various frontends. > > The Java and Ada frontends do not allow union type punning (LTO does), > so this patch may eventually

GCC 5.4 Status report (2016-05-18)

2016-05-18 Thread Richard Biener
Status == The GCC 5 branch is currently open for regression and documentation fixes. I plan to do a release candidate of GCC 5.4 at the end of next week followed by a release at the beginning of June. This is a good time to look through your assigned bugs looking for patches you might want

Re: [testuite,AArch64] Make scan for 'br' more robust

2016-05-18 Thread Christophe Lyon
On 13 May 2016 at 15:51, James Greenhalgh wrote: > On Wed, May 04, 2016 at 11:55:42AM +0200, Christophe Lyon wrote: >> On 4 May 2016 at 10:43, Kyrill Tkachov wrote: >> > >> > Hi Christophe, >> > >> > >> > On 02/05/16 12:50, Christophe Lyon

Re: [PATCH, libbacktrace]: Fix PR 71161, Lots of ASAN and libgo runtime FAILs on 32bit x86 targets

2016-05-18 Thread Ian Lance Taylor
Uros Bizjak writes: > 2016-05-18 Uros Bizjak > > * elf.c (phdr_callback) [__i386__]: Add > __attribute__((__force_align_arg_pointer__)). This is OK. Thanks. Ian

Re: inhibit the sincos optimization when the target has sin and cos instructions

2016-05-18 Thread Nathan Sidwell
On 05/17/16 17:30, Cesar Philippidis wrote: On 05/17/2016 02:22 PM, Andrew Pinski wrote: Good eyes, thanks! I thought I had to create a new insn, but I got away with an expand. I attached the updated patch. Cesar gcc.sum Tests that now fail, but worked before: nvptx-none-run:

Re: [PATCH] Optimize strchr (s, 0) to strlen

2016-05-18 Thread Wilco Dijkstra
Richard Biener wrote: > > Yeah ;) I'm currently bootstrapping/testing the patch that makes it possible > to > write all this in match.pd. So what was the conclusion? Improving match.pd to be able to handle more cases like this seems like a nice thing. Wilco

Re: [PATCH #2] Add PowerPC ISA 3.0 word splat and byte immediate splat support

2016-05-18 Thread Segher Boessenkool
On Tue, May 17, 2016 at 06:45:49PM -0400, Michael Meissner wrote: > As I mentioned in the last message, my previous patch had some problems that > showed up on big endian systems, using RELOAD (one of the tests that failed > was > the vshuf-v32qi.c test in the testsuite). Little endian and IRA

Re: [PATCH] Fix PR fortran/70856

2016-05-18 Thread Richard Biener
On Wed, May 18, 2016 at 2:03 PM, Martin Liška wrote: > On 05/18/2016 01:24 PM, Richard Biener wrote: >> Ok. >> >> Richard. > > Thanks, I'll install the same patch to GCC 6 branch after > finishing of tests, ok? Ok. Richard. > Martin

[PATCH, libbacktrace]: Fix PR 71161, Lots of ASAN and libgo runtime FAILs on 32bit x86 targets

2016-05-18 Thread Uros Bizjak
Hello! The issue here is a misaligned stack with some old(er) 32bit x86 glibcs, where dl_iterate_phdr callback gets called with misaligned stack. Attached patch makes phdr_callback in libbacktrace resistant to this ABI violation. 2016-05-18 Uros Bizjak * elf.c

Re: [PATCH] Fix PR fortran/70856

2016-05-18 Thread Martin Liška
On 05/18/2016 01:24 PM, Richard Biener wrote: > Ok. > > Richard. Thanks, I'll install the same patch to GCC 6 branch after finishing of tests, ok? Martin

Re: [PATCH #2] Add PowerPC ISA 3.0 word splat and byte immediate splat support

2016-05-18 Thread Segher Boessenkool
On Tue, May 17, 2016 at 07:08:52PM -0400, Michael Meissner wrote: > FWIW, the problem after subversion id 236136 shows up when the trunk compiler > is built with the host compiler (4.3.4). That compiler is almost seven years old. It would be interesting to find out what the oldest compiler that

Re: [committed] Cherry-pick upstream asan fix for upcoming glibc (PR sanitizer/71160)

2016-05-18 Thread Florian Weimer
On 05/17/2016 04:46 PM, Jakub Jelinek wrote: On Tue, May 17, 2016 at 05:38:27PM +0300, Maxim Ostapenko wrote: Hi Jakub, thanks for backporting this! Do you have any plans to apply this patch to GCC 5 and 6 branches? AFAIK people hit on this ASan + newer Glibc bug by using GCC 5.3.1 on Fedora

Re: [PATCH] Fix PR71132

2016-05-18 Thread Richard Biener
On Wed, 18 May 2016, H.J. Lu wrote: > On Wed, May 18, 2016 at 12:50 AM, Richard Biener wrote: > > On Tue, 17 May 2016, H.J. Lu wrote: > > > >> On Tue, May 17, 2016 at 5:51 AM, Richard Biener wrote: > >> > > >> > The following fixes a latent issue in loop

Re: Splitting up gcc/omp-low.c?

2016-05-18 Thread Thomas Schwinge
Hi! Ping. On Wed, 11 May 2016 15:44:14 +0200, I wrote: > Ping. > > On Tue, 03 May 2016 11:34:39 +0200, I wrote: > > On Wed, 13 Apr 2016 18:01:09 +0200, I wrote: > > > On Fri, 08 Apr 2016 11:36:03 +0200, I wrote: > > > > On Thu, 10 Dec 2015 09:08:35 +0100, Jakub Jelinek > > >

Re: libgomp: In OpenACC testing, cycle though $offload_targets, and by default only build for the offload target that we're actually going to test

2016-05-18 Thread Thomas Schwinge
Hi! Ping. On Wed, 11 May 2016 15:45:13 +0200, I wrote: > Ping. > > On Mon, 02 May 2016 11:54:27 +0200, I wrote: > > On Fri, 29 Apr 2016 09:43:41 +0200, Jakub Jelinek wrote: > > > On Thu, Apr 28, 2016 at 12:43:43PM +0200, Thomas Schwinge wrote: > > > > commit

Re: [PATCH] Fix PR71132

2016-05-18 Thread H.J. Lu
On Wed, May 18, 2016 at 12:50 AM, Richard Biener wrote: > On Tue, 17 May 2016, H.J. Lu wrote: > >> On Tue, May 17, 2016 at 5:51 AM, Richard Biener wrote: >> > >> > The following fixes a latent issue in loop distribution catched by >> > the fake edge

Re: [RFC][PATCH][PR40921] Convert x + (-y * z * z) into x - y * z * z

2016-05-18 Thread Kugan
Hi Martin, > > I see various ICE after your commit r236356: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71170 Sorry for the breakage. Looking into it. Thanks, Kugan

Re: [PATCH, ARM 5/7, ping1] Add support for MOVT/MOVW to ARMv8-M Baseline

2016-05-18 Thread Kyrill Tkachov
Hi Thomas, This looks mostly good with a few nits inline. Please repost with the comments addressed. Thanks, Kyrill On 17/05/16 11:13, Thomas Preudhomme wrote: Ping? *** gcc/ChangeLog *** 2015-11-13 Thomas Preud'homme * config/arm/arm.h

Re: [RFC][PATCH][PR40921] Convert x + (-y * z * z) into x - y * z * z

2016-05-18 Thread Richard Biener
On Wed, May 18, 2016 at 10:38 AM, Kugan Vivekanandarajah wrote: Please move the whole thing under the else { } case of the ops.length == 0, ops.length == 1 test chain as you did for the actual emit of the negate. >>> >>> I see your point.

Re: [PATCH] Fix PR fortran/70856

2016-05-18 Thread Richard Biener
On Wed, May 18, 2016 at 12:30 PM, Martin Liška wrote: > Hello. > > Following patch add support for IPA ICF, where we miss support for > a proper DECL_PT_UID update in situations where we merge variables. > > Patch can bootstrap and no new regression is introduced for

Re: PR 71020: Handle abnormal PHIs in tree-call-cdce.c

2016-05-18 Thread Richard Biener
On Wed, May 18, 2016 at 11:10 AM, Richard Sandiford wrote: > The PR is about a case where tree-call-cdce.c causes two abnormal > PHIs for the same variable to be live at the same time, leading to > a coalescing failure. It seemed like getting rid of these kinds of >

[PATCH] Bump LTO bytecode major

2016-05-18 Thread Richard Biener
Committed. Richard. 2016-05-18 Richard Biener * lto-streamer.h (LTO_major_version): Bump to 6. Index: gcc/lto-streamer.h === --- gcc/lto-streamer.h (revision 236373) +++ gcc/lto-streamer.h (working

[PATCH] Improve TBAA with unions

2016-05-18 Thread Richard Biener
The following adjusts get_alias_set beahvior when applied to union accesses to use the union alias-set rather than alias-set zero. This is in line with behavior from the alias oracle which (bogously) circumvents alias-set zero with looking at the alias-sets of the base object. Thus for union U

Re: [PATCH 16/17][ARM] Add tests for VFP FP16 ACLE instrinsics.

2016-05-18 Thread Matthew Wahab
On 18/05/16 02:06, Joseph Myers wrote: On Tue, 17 May 2016, Matthew Wahab wrote: In some tests, there are unavoidable differences in precision when calculating the actual and the expected results of an FP16 operation. A new support function CHECK_FP_BIAS is used so that these tests can check

[PATCH] Help PR70729, shuffle LIM and PRE

2016-05-18 Thread Richard Biener
The following patch moves LIM before PRE to allow it to cleanup CSE (and copyprop) opportunities LIM exposes. It also moves the DCE done in loop before the loop pipeline as otherwise it is no longer executed uncoditionally at this point (since we have the no_loop pipeline). The patch requires

Re: [PATCH, ARM 4/7, ping1] Factor out MOVW/MOVT availability and desirability checks

2016-05-18 Thread Kyrill Tkachov
Hi Thomas, On 17/05/16 11:11, Thomas Preudhomme wrote: Ping? *** gcc/ChangeLog *** 2015-11-09 Thomas Preud'homme * config/arm/arm.h (TARGET_USE_MOVT): Check MOVT/MOVW availability with TARGET_HAVE_MOVT. (TARGET_HAVE_MOVT): Define.

[PATCH] Fix LIM PHI movement cost

2016-05-18 Thread Richard Biener
The PHI movement penalty is bogously biased by adding the cost of moving the condition - but the condition is computed unconditionally and thus its cost should be added to the PHI cost. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. This patch is required to avoid regressing

[PATCH Obvious/r236200]Check invariant expression pointer, not pointer to the pointer

2016-05-18 Thread Bin Cheng
Hi, Revision 236200 checks wrong pointer for invariant expression, which accidentally clears all depends_on information. This causes wrong cost and bad code generation, for example, gcc.target/arm/pr42505.c on thumb1 targets. This patch fixes the issue. Test result checked for

Re: [PATCH, ARM 3/7, ping1] Fix indentation of FL_FOR_ARCH* definition after adding support for ARMv8-M

2016-05-18 Thread Kyrill Tkachov
Hi Thomas, On 17/05/16 11:10, Thomas Preudhomme wrote: Ping? *** gcc/ChangeLog *** 2015-11-06 Thomas Preud'homme * config/arm/arm-protos.h: Reindent FL_FOR_* macro definitions. diff --git a/gcc/config/arm/arm-protos.h b/gcc/config/arm/arm-protos.h

[PATCH] Fix PR fortran/70856

2016-05-18 Thread Martin Liška
Hello. Following patch add support for IPA ICF, where we miss support for a proper DECL_PT_UID update in situations where we merge variables. Patch can bootstrap and no new regression is introduced for x86_64-linux-gnu. Ready for trunk? Thanks, Martin >From

Re: [RFC][PATCH][PR40921] Convert x + (-y * z * z) into x - y * z * z

2016-05-18 Thread Martin Liška
On 05/18/2016 10:38 AM, Kugan Vivekanandarajah wrote: > Is this Still OK. Bootstrap and regression testing on ARM, AARCH64 and > x86-64 didn’t have any new regressions. > > Thanks, > Kugan Hello. I see various ICE after your commit r236356: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71170

  1   2   >