Re: [PATCH] Add patch_area_size and patch_area_entry to crtl

2020-02-06 Thread Richard Sandiford
"H.J. Lu" writes: > On Wed, Feb 5, 2020 at 2:51 PM H.J. Lu wrote: >> >> On Wed, Feb 5, 2020 at 2:37 PM Marek Polacek wrote: >> > >> > On Wed, Feb 05, 2020 at 02:24:48PM -0800, H.J. Lu wrote: >> > > On Wed, Feb 5, 2020 at 12:20 PM H.J. Lu wrote: >> > > > >> > > > On Wed, Feb 5, 2020 at 9:00 AM R

[PATCH] openmp: Notice reduction decl in outer contexts after adding it to shared [PR93515]

2020-02-06 Thread Jakub Jelinek
Hi! If we call omp_add_variable, following omp_notice_variable will already find it on that construct and not go through outer constructs, the following patch fixes that. Note, this still doesn't follow OpenMP 5.0 semantics on target combined with other constructs with reduction/lastprivate/line

openmp: Fix handling of non-addressable shared scalars in parallel nested inside of target [PR93515]

2020-02-06 Thread Jakub Jelinek
Hi! As the following testcase shows, we need to consider even target to be a construct that forces not to use copy in/out for shared on parallel inside of the target. E.g. for parallel nested inside another parallel or host teams, we already avoid copy in/out and we need to treat target the same.

[PATCH] i386: Improve avx* vector concatenation [PR93594]

2020-02-06 Thread Jakub Jelinek
Hi! The following testcase shows that for _mm256_set*_m128i and similar intrinsics, we sometimes generate bad code. All 4 routines are expressing the same thing, a 128-bit vector zero padded to 256-bit vector, but only the 3rd one actually emits the desired vmovdqa %xmm0, %xmm0 insn, the oth

Re: [PATCH] i386: Improve avx* vector concatenation [PR93594]

2020-02-06 Thread Uros Bizjak
On Thu, Feb 6, 2020 at 9:34 AM Jakub Jelinek wrote: > > Hi! > > The following testcase shows that for _mm256_set*_m128i and similar > intrinsics, we sometimes generate bad code. All 4 routines are expressing > the same thing, a 128-bit vector zero padded to 256-bit vector, but only the > 3rd one

Re: [PATCH] Use a non-empty test program to test ability to link

2020-02-06 Thread Jonathan Wakely
On 05/02/20 11:52 -0700, Sandra Loosemore wrote: This patch is for PR 79193 and 88999, problems where libstdc++ is mis-configuring itself when building for a bare-metal target because it thinks it can link programs without pulling in the BSP that provides low-level I/O support. (Specifically,

Re: [PATCH coroutines] Change lowering behavior of alias variable from copy to substitute

2020-02-06 Thread Iain Sandoe
Hi JunMa, JunMa wrote: 在 2020/2/4 下午8:17, JunMa 写道: Hi When testing coroutines with lambda function, I find we copy each captured variable to frame. However, according to gimplify pass, for each declaration that is an alias for another expression(DECL_VALUE_EXPR), we can substitute them di

Re: [PATCH] Use a non-empty test program to test ability to link

2020-02-06 Thread Richard Sandiford
Sandra Loosemore writes: > This patch is for PR 79193 and 88999, problems where libstdc++ is > mis-configuring itself when building for a bare-metal target because it > thinks it can link programs without pulling in the BSP that provides > low-level I/O support. (Specifically, this was observe

Re: [PATCH] avoid issuing -Wrestrict from folder (PR 93519)

2020-02-06 Thread Richard Biener
On Wed, Feb 5, 2020 at 4:55 PM Martin Sebor wrote: > > On 2/5/20 1:19 AM, Richard Biener wrote: > > On Tue, Feb 4, 2020 at 11:02 PM Martin Sebor wrote: > >> > >> On 2/4/20 2:31 PM, Jeff Law wrote: > >>> On Tue, 2020-02-04 at 13:08 -0700, Martin Sebor wrote: > On 2/4/20 12:15 PM, Richard Bien

Re: [PATCH] avoid issuing -Wrestrict from folder (PR 93519)

2020-02-06 Thread Richard Biener
On Thu, Feb 6, 2020 at 11:06 AM Richard Biener wrote: > > On Wed, Feb 5, 2020 at 4:55 PM Martin Sebor wrote: > > > > On 2/5/20 1:19 AM, Richard Biener wrote: > > > On Tue, Feb 4, 2020 at 11:02 PM Martin Sebor wrote: > > >> > > >> On 2/4/20 2:31 PM, Jeff Law wrote: > > >>> On Tue, 2020-02-04 at 1

Re: [PATCH 2/3] libstdc++: Implement C++20 constrained algorithms

2020-02-06 Thread Jonathan Wakely
On 05/02/20 14:24 -0500, Patrick Palka wrote: Also IIRC, the way __miter_base() is currently defined assumes that the underlying iterator is copyable which is not necessarily true anymore for non-forward iterators. So I would have to also fix __miter_base() which might be risky to do at this sta

[PATCH 0/4] Fix various minor issues seen with cppcheck

2020-02-06 Thread Martin Liska
Hi. The series is about small issues that were spotted with cppcheck and where David Binderman suggested a patch. It's probably a stage1 material? Martin Martin Liska (4): Remove 2 dead variables in bid_internal.h. Use const for some function arguments. Put index check before use. Use c

[PATCH 2/4] Use const for some function arguments.

2020-02-06 Thread Martin Liska
gcc/ChangeLog: 2020-02-04 Martin Liska PR c/92472. * alloc-pool.h: Use const for some arguments. * bitmap.h: Likewise. * mem-stats.h: Likewise. * sese.h (get_entry_bb): Likewise. (get_exit_bb): Likewise. --- gcc/alloc-pool.h | 2 +- gcc/bitmap.

[PATCH 1/4] Remove 2 dead variables in bid_internal.h.

2020-02-06 Thread Martin Liska
libgcc/config/libbid/ChangeLog: 2020-02-04 Martin Liska PR libgcc/92565 * bid_internal.h (handle_UF_128_rem): Remove unused variable. (handle_UF_128): Likewise. --- libgcc/config/libbid/bid_internal.h | 4 1 file changed, 4 deletions(-) diff --git a/libgcc/confi

[PATCH 4/4] Use const for template argument.

2020-02-06 Thread Martin Liska
libstdc++-v3/ChangeLog: 2020-02-04 Martin Liska PR c/92472. * include/parallel/multiway_merge.h: Use const for _Compare template argument. --- libstdc++-v3/include/parallel/multiway_merge.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libstd

[PATCH 3/4] Put index check before use.

2020-02-06 Thread Martin Liska
liboffloadmic/ChangeLog: 2020-02-04 Martin Liska PR other/89860. * runtime/offload_target.cpp: Put index check before its use. --- liboffloadmic/runtime/offload_target.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/liboffloadmic/runtime/offloa

Re: [PATCH coroutines] Change lowering behavior of alias variable from copy to substitute

2020-02-06 Thread Bin.Cheng
On Thu, Feb 6, 2020 at 5:12 PM Iain Sandoe wrote: > > Hi JunMa, > > JunMa wrote: > > > 在 2020/2/4 下午8:17, JunMa 写道: > >> Hi > >> When testing coroutines with lambda function, I find we copy each captured > >> variable to frame. However, according to gimplify pass, for each > >> declaration > >> t

Re: [PATCH coroutines] Change lowering behavior of alias variable from copy to substitute

2020-02-06 Thread JunMa
在 2020/2/6 下午5:12, Iain Sandoe 写道: Hi JunMa, JunMa wrote: 在 2020/2/4 下午8:17, JunMa 写道: Hi When testing coroutines with lambda function, I find we copy each captured variable to frame. However, according to gimplify pass, for each declaration that is an alias for another expression(DECL_VA

[PATCH] Improve splitX passes management

2020-02-06 Thread Uros Bizjak
The names of split_before_sched2 ("split4") and split_before_regstack ("split3") do not reflect their insertion point in the sequence of passes, where split_before_regstack follows split_before_sched2. Reorder the code and rename the passes to reflect the reality. split_before_regstack pass does n

Re: [PATCH] avoid issuing -Wrestrict from folder (PR 93519)

2020-02-06 Thread Richard Biener
On Thu, Feb 6, 2020 at 11:33 AM Richard Biener wrote: > > On Thu, Feb 6, 2020 at 11:06 AM Richard Biener > wrote: > > > > On Wed, Feb 5, 2020 at 4:55 PM Martin Sebor wrote: > > > > > > On 2/5/20 1:19 AM, Richard Biener wrote: > > > > On Tue, Feb 4, 2020 at 11:02 PM Martin Sebor wrote: > > > >>

Re: [PATCH 0/4] Fix various minor issues seen with cppcheck

2020-02-06 Thread Richard Biener
On Thu, Feb 6, 2020 at 12:07 PM Martin Liska wrote: > > Hi. > > The series is about small issues that were spotted with cppcheck > and where David Binderman suggested a patch. > > It's probably a stage1 material? Yes. > Martin > > Martin Liska (4): > Remove 2 dead variables in bid_internal.h.

[committed] libstdc++: Remove redundant macro that is always empty

2020-02-06 Thread Jonathan Wakely
The __iter_swap class template and explicit specialization are only declared (and used) for C++03 so _GLIBCXX20_CONSTEXPR does nothing here. * include/bits/stl_algobase.h (__iter_swap, __iter_swap): Remove redundant _GLIBCXX20_CONSTEXPR. Tested x86_64-linux, committed to master.

Re: [PATCH] avoid issuing -Wrestrict from folder (PR 93519)

2020-02-06 Thread Richard Biener
On Thu, Feb 6, 2020 at 12:14 PM Richard Biener wrote: > > On Thu, Feb 6, 2020 at 11:33 AM Richard Biener > wrote: > > > > On Thu, Feb 6, 2020 at 11:06 AM Richard Biener > > wrote: > > > > > > On Wed, Feb 5, 2020 at 4:55 PM Martin Sebor wrote: > > > > > > > > On 2/5/20 1:19 AM, Richard Biener wr

Re: [PATCH] c++: Handle CONSTRUCTORs without indexes in find_array_ctor_elt [PR93549]

2020-02-06 Thread Jakub Jelinek
On Wed, Feb 05, 2020 at 01:31:30PM -0500, Jason Merrill wrote: > > from the constexpr new change apparently broke the following testcase. > > When handling COND_EXPR, we build_vector_from_val, however as the argument > > we > > pass to it is not an INTEGER_CST/REAL_CST, but that wrapped in a > > N

Re: [PATCH] c++: Handle CONSTRUCTORs without indexes in find_array_ctor_elt [PR93549]

2020-02-06 Thread Richard Biener
On Thu, 6 Feb 2020, Jakub Jelinek wrote: > On Wed, Feb 05, 2020 at 01:31:30PM -0500, Jason Merrill wrote: > > > from the constexpr new change apparently broke the following testcase. > > > When handling COND_EXPR, we build_vector_from_val, however as the > > > argument we > > > pass to it is not

Re: [Patch][Testsuite] – More fixes for remote execution: check_gc_sections_available, …

2020-02-06 Thread Tobias Burnus
Hi Richard, On 2/5/20 5:36 PM, Richard Sandiford wrote: In each case it might be more obvious to use: [list "additional_flags=..."] with no explicit { ... } quoting. The .exp files are supposed to follow the 80 char limit where possible, so there should probably be a line break before [list

Re: [PATCH 2/3] libstdc++: Implement C++20 constrained algorithms

2020-02-06 Thread Jonathan Wakely
On 05/02/20 19:39 +0100, François Dumont wrote: Hi     Is it me or the patch isn't an attachment ? It is far more convenient to provide something easy to extract and apply locally. On 2/4/20 3:07 AM, Patrick Palka wrote: This patch implements the C++20 ranges overloads for the algorithms in

Re: [PR47785] COLLECT_AS_OPTIONS

2020-02-06 Thread Prathamesh Kulkarni
On Tue, 4 Feb 2020 at 19:44, Richard Biener wrote: > > On Mon, Feb 3, 2020 at 12:37 PM Prathamesh Kulkarni > wrote: > > > > On Thu, 30 Jan 2020 at 19:10, Richard Biener > > wrote: > > > > > > On Thu, Jan 30, 2020 at 5:31 AM Prathamesh Kulkarni > > > wrote: > > > > > > > > On Tue, 28 Jan 2020 a

Re: [PATCH] avoid issuing -Wrestrict from folder (PR 93519)

2020-02-06 Thread Jeff Law
On Wed, 2020-02-05 at 09:19 +0100, Richard Biener wrote: > On Tue, Feb 4, 2020 at 11:02 PM Martin Sebor wrote: > > On 2/4/20 2:31 PM, Jeff Law wrote: > > > On Tue, 2020-02-04 at 13:08 -0700, Martin Sebor wrote: > > > > On 2/4/20 12:15 PM, Richard Biener wrote: > > > > > On February 4, 2020 5:30:42

Re: [PATCH] adjust object size computation for union accesses and PHIs (PR 92765)

2020-02-06 Thread Jeff Law
On Wed, 2020-02-05 at 16:57 -0700, Martin Sebor wrote: > > It passes thanks to the TREE_CODE (arg) == PARM_DECL test added > in the patch to get_range_strlen (the test was missing before > and so while it handled ordinary objects (local or global) it > unnecessarily excluded function arguments. Oh

Re: [RFA] [PR rtl-optimization/90275] Handle nop reg->reg copies in cse

2020-02-06 Thread Jeff Law
On Wed, 2020-02-05 at 13:30 +, Richard Sandiford wrote: > Jeff Law writes: > > Richard & Segher, if y'all could check my analysis here, it'd be > > appreciated. > > > > pr90275 is a P2 regression that is only triggering on ARM. David's > > testcase in c#1 is the best for this problem as it d

[committed] Fix minor hppa testsuite failure due to recent IRA changes

2020-02-06 Thread Jeff Law
The recent IRA changes twiddled register allocation. Not surprisingly there's a bit of fallout. On the PA we've started failing one of the shadd tests which was triggered by the IRA changes. In simplest terms the register allocations changed, which obviously changes the hard registers live at a

[PATCH] [MIPS] Remove unnecessary moves around DSP multiply-accumulate instructions

2020-02-06 Thread Mihailo Stojanovic
Unnecessary moves around dpadd and dpsub are caused by different pseudos being assigned to the input-output operands which correspond to the same register. Just like for the MSA multiply-accumulate instructions, this forces the same pseudo to the input-output operands, which removes unnecesary mov

Re: [PR47785] COLLECT_AS_OPTIONS

2020-02-06 Thread Richard Biener
On Thu, Feb 6, 2020 at 1:48 PM Prathamesh Kulkarni wrote: > > On Tue, 4 Feb 2020 at 19:44, Richard Biener > wrote: > > > > On Mon, Feb 3, 2020 at 12:37 PM Prathamesh Kulkarni > > wrote: > > > > > > On Thu, 30 Jan 2020 at 19:10, Richard Biener > > > wrote: > > > > > > > > On Thu, Jan 30, 2020

Re: [PATCH] avoid issuing -Wrestrict from folder (PR 93519)

2020-02-06 Thread Richard Biener
On Thu, Feb 6, 2020 at 2:00 PM Jeff Law wrote: > > On Wed, 2020-02-05 at 09:19 +0100, Richard Biener wrote: > > On Tue, Feb 4, 2020 at 11:02 PM Martin Sebor wrote: > > > On 2/4/20 2:31 PM, Jeff Law wrote: > > > > On Tue, 2020-02-04 at 13:08 -0700, Martin Sebor wrote: > > > > > On 2/4/20 12:15 PM,

[PATCH] Revert mangling of names with -fprofile-generate=.

2020-02-06 Thread Martin Liška
Hi. The patch reverts mangling of filenames due to file length limitation. Creation of a folder tree seems fine in context of PGO. Ready for master? Thanks, Martin gcc/ChangeLog: 2020-02-06 Martin Liska PR gcov-profile/91971 PR gcov-profile/93466 * coverage.c (cover

Re: [PATCH] Revert mangling of names with -fprofile-generate=.

2020-02-06 Thread Jan Hubicka
> Hi. > > The patch reverts mangling of filenames due to file > length limitation. Creation of a folder tree seems fine > in context of PGO. > > Ready for master? > Thanks, > Martin > > gcc/ChangeLog: > > 2020-02-06 Martin Liska > > PR gcov-profile/91971 > PR gcov-profile/93466

[PATCH], PR target/93569, Fix PowerPC vsx-builtin-15d.c test case

2020-02-06 Thread Michael Meissner
When I applied my previous patches for vec_extract, I switched to using reg_to_non_prefixed to validate the vector extract address. It uncovered a bug that reg_to_non_prefixed allowed D-FORM (reg+offset) addresses to load up Altivec registers on power7 and power8. However, those systems only supp

[committed] libstdc++: decay in viewable_range should be remove_cvref (LWG 3375)

2020-02-06 Thread Jonathan Wakely
* include/bits/stl_algobase.h (__iter_swap, __iter_swap): Remove redundant _GLIBCXX20_CONSTEXPR. Tested powerpc64le-linux, committed to master. commit 26eae9ac2bf75a26a419dc1e47a067c66331fb74 Author: Jonathan Wakely Date: Thu Feb 6 11:30:30 2020 + libstdc++: decay in v

[committed] libstdc++: Fix comment to refer to correct PR

2020-02-06 Thread Jonathan Wakely
* include/bits/stl_iterator.h (__detail::__common_iter_ptr): Fix PR number in comment. Fix indentation. Tested powerpc64le-linux, committed to master. commit bd630df033784c791c3ca49fc30821eaee35f7c2 Author: Jonathan Wakely Date: Thu Feb 6 11:33:12 2020 + libstdc++: Fix

[PATCH] libstdc++: Optimize C++20 comparison category types

2020-02-06 Thread Jonathan Wakely
This reduces sizeof(std::partial_ordering) and optimizes conversion and comparison operators to avoid conditional branches where possible. * libsupc++/compare (__cmp_cat::_Ncmp::unordered): Change value to 2. (partial_ordering::_M_is_ordered): Remove data member. (partial_o

Re: [PATCH] Revert mangling of names with -fprofile-generate=.

2020-02-06 Thread Martin Liška
On 2/6/20 2:26 PM, Jan Hubicka wrote: Hi. The patch reverts mangling of filenames due to file length limitation. Creation of a folder tree seems fine in context of PGO. Ready for master? Thanks, Martin gcc/ChangeLog: 2020-02-06 Martin Liska PR gcov-profile/91971 PR gcov-pr

Re: [PATCH] libstdc++: Optimize C++20 comparison category types

2020-02-06 Thread Jonathan Wakely
On 06/02/20 13:40 +, Jonathan Wakely wrote: This reduces sizeof(std::partial_ordering) and optimizes conversion and comparison operators to avoid conditional branches where possible. * libsupc++/compare (__cmp_cat::_Ncmp::unordered): Change value to 2. (partial_ordering::_M_i

Re: [PATCH] Revert mangling of names with -fprofile-generate=.

2020-02-06 Thread Jan Hubicka
> On 2/6/20 2:26 PM, Jan Hubicka wrote: > > > Hi. > > > > > > The patch reverts mangling of filenames due to file > > > length limitation. Creation of a folder tree seems fine > > > in context of PGO. > > > > > > Ready for master? > > > Thanks, > > > Martin > > > > > > gcc/ChangeLog: > > > > >

Re: [RFA] [PR rtl-optimization/90275] Handle nop reg->reg copies in cse

2020-02-06 Thread Segher Boessenkool
On Wed, Feb 05, 2020 at 11:48:23AM -0700, Jeff Law wrote: > Yea, it's closely related. In your case you need to effectively ignore > the nop insn to get the optimization you want. In mine that nop insn > causes an ICE. > > I think we could take your cse bits + adding a !CALL_P separately from >

rs6000: Correct documentation for __builtin_mtfsf

2020-02-06 Thread Bill Schmidt
Hi, PR93570 reports that the documentation shows __builtin_mtfsf to return a double, but that is incorrect.  The return signature should be void. Corrected herein. Built on powerpc64le-unknown-linux-gnu and verified correct PDF output. Committed as obvious. Thanks! Bill 2020-02-06 Bill Sc

Is machine_name fix still needed?

2020-02-06 Thread Matheus Castanho
Hi, I recently faced problems while building GCC caused by a system header being broken by the machine_name fix from fixincludes [1]. And apparently I am not the first one [2][3]. After digging into the fixincludes code, I found the following comment on fixincludes/fixinc.in: > # # # # # # # # #

Re: [PATCH] libstdc++: Optimize C++20 comparison category types

2020-02-06 Thread Jonathan Wakely
On 06/02/20 13:53 +, Jonathan Wakely wrote: On 06/02/20 13:40 +, Jonathan Wakely wrote: This reduces sizeof(std::partial_ordering) and optimizes conversion and comparison operators to avoid conditional branches where possible. * libsupc++/compare (__cmp_cat::_Ncmp::unordered): C

Re: [PR47785] COLLECT_AS_OPTIONS

2020-02-06 Thread Prathamesh Kulkarni
On Thu, 6 Feb 2020 at 18:42, Richard Biener wrote: > > On Thu, Feb 6, 2020 at 1:48 PM Prathamesh Kulkarni > wrote: > > > > On Tue, 4 Feb 2020 at 19:44, Richard Biener > > wrote: > > > > > > On Mon, Feb 3, 2020 at 12:37 PM Prathamesh Kulkarni > > > wrote: > > > > > > > > On Thu, 30 Jan 2020 at

[PATCH] middle-end/93519 - avoid folding stmts in obviously unreachable code

2020-02-06 Thread Richard Biener
The inliner folds stmts delayed, the following arranges things so to not fold stmts that are obviously not reachable to avoid warnings from those code regions. Bootstrapped and tested on x86_64-unknown-linux-gnu. OK? Thanks, Richard. 2020-02-06 Richard Biener PR middle-end/93519

Re: Is machine_name fix still needed?

2020-02-06 Thread Segher Boessenkool
Hi! On Thu, Feb 06, 2020 at 11:26:23AM -0300, Matheus Castanho wrote: > I recently faced problems while building GCC caused by a system header > being broken by the machine_name fix from fixincludes [1]. And > apparently I am not the first one [2][3]. > > After digging into the fixincludes code,

Re: [PATCH, rs6000]: mark clobber for registers changed by untpyed_call

2020-02-06 Thread Segher Boessenkool
Hi! On Thu, Feb 06, 2020 at 10:49:36AM +0800, Jiufu Guo wrote: > > emit_call_insn (gen_call (operands[0], const0_rtx, const0_rtx)); > > > > for (i = 0; i < XVECLEN (operands[2], 0); i++) > > { > > rtx set = XVECEXP (operands[2], 0, i); > > emit_move_insn (SET_DEST (set), SET_SR

Re: [PATCH] c++: Handle CONSTRUCTORs without indexes in find_array_ctor_elt [PR93549]

2020-02-06 Thread Jason Merrill
On Thu, Feb 6, 2020 at 7:02 AM Jakub Jelinek wrote: > On Wed, Feb 05, 2020 at 01:31:30PM -0500, Jason Merrill wrote: > > > from the constexpr new change apparently broke the following testcase. > > > When handling COND_EXPR, we build_vector_from_val, however as the > argument we > > > pass to it

Re: [PATCH], PR target/93569, Fix PowerPC vsx-builtin-15d.c test case

2020-02-06 Thread Segher Boessenkool
Hi! On Thu, Feb 06, 2020 at 08:29:41AM -0500, Michael Meissner wrote: > --- /tmp/eAu61F_rs6000.c 2020-02-05 18:08:48.698992017 -0500 > +++ gcc/config/rs6000/rs6000.c2020-02-05 17:23:55.733650185 -0500 > @@ -24943,9 +24943,13 @@ reg_to_non_prefixed (rtx reg, machine_mo > } > >

Re: [PATCH] c++: Handle CONSTRUCTORs without indexes in find_array_ctor_elt [PR93549]

2020-02-06 Thread Jakub Jelinek
On Thu, Feb 06, 2020 at 10:38:25AM -0500, Jason Merrill wrote: > > I don't know, can try to add some instrumentation and do bootstrap/regtest > > with it. The handling of the CONSTRUCTORs with missing or present or mixed > > indexes is what I found in various middle-end routines. > > The only thin

Re: [PATCH 2/3] libstdc++: Implement C++20 constrained algorithms

2020-02-06 Thread Jonathan Wakely
On 03/02/20 21:07 -0500, Patrick Palka wrote: +#ifndef _RANGES_ALGO_H +#define _RANGES_ALGO_H 1 + +#if __cplusplus > 201703L + +#include +#include +#include +// #include This line could be removed, or leave it as a reminder to me to refactor so that the small utility pieces are in a small

[committed] x86: Emit "#" instead of calling gcc_unreachable for invalid insns.

2020-02-06 Thread Uros Bizjak
Implement standard approach by emitting "#" for insns that have to be split. Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}. 2020-02-06 Uroš Bizjak * config/i386/i386.md (*pushtf): Emit "#" instead of calling gcc_unreachable in insn output. (*pushxf): Ditto. (*

Re: [GCC][PATCH][ARM] Regenerate arm-tables.opt for Armv8.1-M patch

2020-02-06 Thread Kyrill Tkachov
On 2/3/20 5:18 PM, Mihail Ionescu wrote: Hi all, I've regenerated arm-tables.opt in config/arm to replace the improperly generated arm-tables.opt file from "[PATCH, GCC/ARM, 2/10] Add command line support for Armv8.1-M Mainline" (9722215a027b68651c3c7a8af9204d033197e9c0). 2020-02-03  Mihai

Re: [GCC][PATCH][ARM] Set profile to M for Armv8.1-M

2020-02-06 Thread Kyrill Tkachov
On 2/4/20 1:49 PM, Christophe Lyon wrote: On Mon, 3 Feb 2020 at 18:20, Mihail Ionescu wrote: > > Hi, > > We noticed that the profile for armv8.1-m.main was not set in arm-cpus.in > , which led to TARGET_ARM_ARCH_PROFILE and _ARM_ARCH_PROFILE not being > defined properly. > > > > gcc/ChangeL

Re: [GCC][PATCH][AArch64] ACLE intrinsics bfmmla and bfmlal for AArch64 AdvSIMD

2020-02-06 Thread Richard Sandiford
Delia Burduv writes: > Sure, here it is. I'll do that for the other patch too. Thanks, belatedly pushed as f78335df69993a900512f92324cab6a20b1bde0c. Sorry for the delay. Richard > > Thanks, > Delia > > On 1/31/20 3:37 PM, Richard Sandiford wrote: >> Delia Burduv writes: >>> Thank you, Richard!

Re: [committed] x86: Emit "#" instead of calling gcc_unreachable for invalid insns.

2020-02-06 Thread Jakub Jelinek
On Thu, Feb 06, 2020 at 05:36:43PM +0100, Uros Bizjak wrote: > 2020-02-06 Uroš Bizjak > > * config/i386/i386.md (*pushtf): Emit "#" instead of > calling gcc_unreachable in insn output. > (*pushxf): Ditto. > (*pushdf): Ditto. > (*pushsf_rex64): Ditto for alternatives other th

Re: [committed] x86: Emit "#" instead of calling gcc_unreachable for invalid insns.

2020-02-06 Thread Uros Bizjak
On Thu, Feb 6, 2020 at 6:07 PM Jakub Jelinek wrote: > > On Thu, Feb 06, 2020 at 05:36:43PM +0100, Uros Bizjak wrote: > > 2020-02-06 Uroš Bizjak > > > > * config/i386/i386.md (*pushtf): Emit "#" instead of > > calling gcc_unreachable in insn output. > > (*pushxf): Ditto. > > (*pu

[committed] testsuite: Unify gcc.target/i386/memcpy scan strings.

2020-02-06 Thread Uros Bizjak
After -fno-common became the default, we can unify various scan strings between 64bit and 32bit targets. Tested on x86_64-linux-gnu {,-m32}. 2020-02-06 Uroš Bizjak * gcc.target/i386/memcpy-strategy-1.c (dg-final): Unify scan-assembler strings for all targets. * gcc.target/i386/mem

Re: [PATCH 3/3] libstdc++: Implement C++20 range adaptors

2020-02-06 Thread Jonathan Wakely
On 03/02/20 21:07 -0500, Patrick Palka wrote: This patch implements [range.adaptors]. It also includes the changes from P3280 and P3278 and P3323, without which many standard examples won't work. The implementation is mostly dictated by the spec and there was not much room for implementation di

[committed] aarch64: Add an extra sbfiz pattern [PR87763]

2020-02-06 Thread Richard Sandiford
This patch matches another form of sbfiz, in which the input has DImode and the output has SImode. It fixes a regression in gcc.target/aarch64/lsl_asr_sbfiz.c from GCC 8. Tested on aarch64-linux-gnu & pushed. Richard 2020-02-04 Richard Sandiford gcc/ PR rtl-optimization/87763

[committed] aarch64: Add an and/ior-based movk pattern [PR87763]

2020-02-06 Thread Richard Sandiford
This patch adds a second movk pattern that models the instruction as a "normal" and/ior operation rather than an insertion. It fixes the third insv_1.c failure in PR87763, which was a regression from GCC 8. Tested on aarch64-linux-gnu & pushed. Richard 2020-02-04 Richard Sandiford gcc/

[PATCH] add -mvsx to pr92923-1.c test requiring vsx

2020-02-06 Thread will schmidt
Hi, The existing testcase pr92923-1.c uses vector long long, and thus requires vsx. OK for master? Thanks, -Will [testsuite] * testsuite/gcc.target/powerpc/pr92923-1.c: Add -mvsx. diff --git a/gcc/testsuite/gcc.target/powerpc/pr92923-1.c b/gcc/testsuite/gcc.target/powerpc/p

[PATCH] rs6000: Use rldimi for 64-bit constants with high=low (PR93012)

2020-02-06 Thread Segher Boessenkool
We currently use an (up to) five instruction sequence to generate such constants. After this change we just generate a 32-bit constant and do a rotate-and-mask-insert instruction, making the sequence only up to three instructions. Tested on powerpc64-linux {-m32,-m64}; committing to trunk. Segh

Re: [PATCH], PR target/93569, Fix PowerPC vsx-builtin-15d.c test case

2020-02-06 Thread Michael Meissner
On Thu, Feb 06, 2020 at 09:49:18AM -0600, Segher Boessenkool wrote: > Hi! > > On Thu, Feb 06, 2020 at 08:29:41AM -0500, Michael Meissner wrote: > > --- /tmp/eAu61F_rs6000.c2020-02-05 18:08:48.698992017 -0500 > > +++ gcc/config/rs6000/rs6000.c 2020-02-05 17:23:55.733650185 -0500 > > @@ -24

[committed] aarch64: Add a type attribute to aarch64_movk

2020-02-06 Thread Richard Sandiford
Kyrill pointed out off-list that this new pattern was missing a type attribute -- sorry about that. Tested on aarch64-linux-gnu & pushed. Richard 2020-02-06 Richard Sandiford gcc/ * config/aarch64/aarch64.md (aarch64_movk): Add a type attribute. --- gcc/config/aarch64/aarch

[PATCH] PR target/93569 [version 2], Fix PowerPC vsx-builtin-15d.c test case

2020-02-06 Thread Michael Meissner
This patch addresses the concern the Segher raised in the original submission of the patch to fix PR target/93569. In addition to checking for D*-form addresses in the traditional Altivec registers, this patch also checks for D*-form addresses for vectors in the traditional floating point register

Re: [PATCH] Fix PowerPC -fstack-clash-protection -mprefixed-addr ICE (PR target/93122)

2020-02-06 Thread Segher Boessenkool
Hi! Sorry for dropping this once again. On Thu, Jan 30, 2020 at 05:14:08PM +0100, Jakub Jelinek wrote: > Here is what I meant as the alternative, i.e. don't check any predicates, > just gen_add3_insn, if that fails, force rs into register and retry. I don't like gen_add3_insn here *at all*, as I

[PATCH/RFC] analyzer: workaround for nested pp_printf

2020-02-06 Thread David Malcolm
The dumps from the analyzer sometimes contain garbled output. The root cause is due to nesting of calls to pp_printf: I'm using pp_printf with %qT to print types with a PP using default_tree_printer. default_tree_printer handles 'T' (and various other codes) via dump_generic_node (pp, t, 0, TDF

[committed] analyzer: round-trip pointer-equality through intptr_t

2020-02-06 Thread David Malcolm
When investigating how the analyzer handles malloc/free of Cray pointers in gfortran I noticed that that analyzer was losing information on pointers that were cast to an integer type, and then back to a pointer type again. The root cause is that region_model::maybe_cast_1 was only preserving the r

Re: [PATCH] Fix PowerPC -fstack-clash-protection -mprefixed-addr ICE (PR target/93122)

2020-02-06 Thread Jakub Jelinek
On Thu, Feb 06, 2020 at 01:15:25PM -0600, Segher Boessenkool wrote: > On Thu, Jan 30, 2020 at 05:14:08PM +0100, Jakub Jelinek wrote: > > Here is what I meant as the alternative, i.e. don't check any predicates, > > just gen_add3_insn, if that fails, force rs into register and retry. > > I don't li

[PATCH 1/2] analyzer: gfortran testsuite support

2020-02-06 Thread David Malcolm
PR analyzer/93405 reports an ICE when attempting to use -fanalyzer on certain gfortran code. The second patch in this kit fixes that, but in the meantime I need somewhere to put regression tests for -fanalyzer with gfortran. This patch adds a gfortran.dg/analyzer subdirectory with an analyzer.exp

[PATCH 2/2] analyzer: fix ICE with fortran constant arguments (PR 93405)

2020-02-06 Thread David Malcolm
PR analyzer/93405 reports an ICE with -fanalyzer when passing a constant "by reference" in gfortran. The issue is that the constant is passed as an ADDR_EXPR of a CONST_DECL, and region_model::get_lvalue_1 doesn't know how to handle CONST_DECL. This patch implements it for CONST_DECL by providing

[wwwdocs] Mention common attribute in gcc-10/porting_to.html

2020-02-06 Thread Jakub Jelinek
Hi! On Tue, Jan 07, 2020 at 03:15:05PM +, Wilco Dijkstra wrote: > --- a/htdocs/gcc-10/porting_to.html > +++ b/htdocs/gcc-10/porting_to.html > @@ -29,9 +29,25 @@ and provide solutions. Let us know if you have suggestions > for improvements! > Preprocessor issues > --> > > - > + > +Default

[PATCH 1/2] analyzer: g++ testsuite support

2020-02-06 Thread David Malcolm
PR analyzer/93288 reports a C++-specific ICE with -fanalyzer. This patch creates the beginnings of a C++ test suite for the analyzer, so that there's a place to put test coverage for the fix. It adds a regression test for PR analyzer/93212, an ICE fixed in r10-5970-g32077b693df8e3ed0424031a322df23

[PATCH 2/2] analyzer: use ultimate alias target at calls (PR 93288)

2020-02-06 Thread David Malcolm
PR analyzer/93288 reports an ICE in a C++ testcase when calling a constructor. The issue is that when building the supergraph, we encounter the cgraph edge to "__ct_comp ", the DECL_COMPLETE_CONSTRUCTOR_P, and this node's DECL_STRUCT_FUNCTION has a NULL CFG, which the analyzer reads through, leadi

Re: [PATCH] middle-end/93519 - avoid folding stmts in obviously unreachable code

2020-02-06 Thread Martin Sebor
On 2/6/20 7:52 AM, Richard Biener wrote: The inliner folds stmts delayed, the following arranges things so to not fold stmts that are obviously not reachable to avoid warnings from those code regions. Bootstrapped and tested on x86_64-unknown-linux-gnu. It fixes the reported problem so it work

Patch to fix PR93561

2020-02-06 Thread Vladimir Makarov
The following patch fixes   https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93561 The patch was successfully bootstrapped on x86-64. commit d26f37a16e3ed3d75a93ffb1da10c44c36a8a36d (HEAD -> master) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1754aa76399..aec58a06529 100644 --- a/gcc/ChangeLog

Re: [wwwdocs] Mention common attribute in gcc-10/porting_to.html

2020-02-06 Thread Gerald Pfeifer
On Thu, 6 Feb 2020, Jakub Jelinek wrote: > + If tentative definitions of particular variable or variables need to be I believe that would be "a particular variable", but best to simplify to "of particular variables". > + placed in a common block, __attribute__((__common__)) can be > + used to

Re: [PATCH] add -mvsx to pr92923-1.c test requiring vsx

2020-02-06 Thread Segher Boessenkool
Hi Will, On Thu, Feb 06, 2020 at 11:41:47AM -0600, will schmidt wrote: > The existing testcase pr92923-1.c uses vector long long, and thus > requires vsx. > OK for master? Sure! Thanks for the patch. > * testsuite/gcc.target/powerpc/pr92923-1.c: Add -mvsx. The changelog is testsuit

Re: [PATCH] PR target/93569 [version 2], Fix PowerPC vsx-builtin-15d.c test case

2020-02-06 Thread Segher Boessenkool
On Thu, Feb 06, 2020 at 01:40:03PM -0500, Michael Meissner wrote: > This patch addresses the concern the Segher raised in the original submission > of the patch to fix PR target/93569. In addition to checking for D*-form > addresses in the traditional Altivec registers, this patch also checks for

Re: [PATCH] avoid issuing -Wrestrict from folder (PR 93519)

2020-02-06 Thread Martin Sebor
On 2/6/20 6:16 AM, Richard Biener wrote: On Thu, Feb 6, 2020 at 2:00 PM Jeff Law wrote: On Wed, 2020-02-05 at 09:19 +0100, Richard Biener wrote: On Tue, Feb 4, 2020 at 11:02 PM Martin Sebor wrote: On 2/4/20 2:31 PM, Jeff Law wrote: On Tue, 2020-02-04 at 13:08 -0700, Martin Sebor wrote: On

Re: [PATCH] Fix PowerPC -fstack-clash-protection -mprefixed-addr ICE (PR target/93122)

2020-02-06 Thread Segher Boessenkool
Hi again, On Thu, Feb 06, 2020 at 08:51:06PM +0100, Jakub Jelinek wrote: > On Thu, Feb 06, 2020 at 01:15:25PM -0600, Segher Boessenkool wrote: > > On Thu, Jan 30, 2020 at 05:14:08PM +0100, Jakub Jelinek wrote: > > > Here is what I meant as the alternative, i.e. don't check any predicates, > > > ju

Re: [PATCH 3/3] libstdc++: Implement C++20 range adaptors

2020-02-06 Thread Patrick Palka
On Thu, 6 Feb 2020, Jonathan Wakely wrote: > On 03/02/20 21:07 -0500, Patrick Palka wrote: > > This patch implements [range.adaptors]. It also includes the changes from > > P3280 > > and P3278 and P3323, without which many standard examples won't work. > > > > The implementation is mostly dictat

[PATCH] c++: Fix ICE with template codes in check_narrowing [PR91465]

2020-02-06 Thread Marek Polacek
In ed4f2c001a883b2456fc607a33f1c59f9c4ee65d I changed the call to fold_non_dependent_expr in check_narrowing to maybe_constant_value. That was the wrong thing to do as these tests show: check_narrowing bails out for dependent expressions but we can still have template codes like CAST_EXPR that don'

[committed] analyzer: fix reproducer for PR 93375

2020-02-06 Thread David Malcolm
Reproducing the ICE in PR analyzer/93375 required some kind of analyzer diagnostic occurring after a call with fewer arguments than required by the callee. The testcase used __builtin_memcpy with a NULL argument for this. On x86_64-pc-linux-gnu this happened to be already optimized into: _4 = M

[PATCH 4/3] Add [range.istream]

2020-02-06 Thread Patrick Palka
This patch adds ranges::basic_istream_view and ranges::istream_view. This seems to be the last missing part of the ranges header. libstdc++-v3/ChangeLog: * include/std/ranges (ranges::__detail::__stream_extractable, ranges::basic_istream_view, ranges::istream_view): Define.

Re: [PATCH 2/3] libstdc++: Implement C++20 constrained algorithms

2020-02-06 Thread Patrick Palka
On Thu, 6 Feb 2020, Jonathan Wakely wrote: > On 03/02/20 21:07 -0500, Patrick Palka wrote: > > +#ifndef _RANGES_ALGO_H > > +#define _RANGES_ALGO_H 1 > > + > > +#if __cplusplus > 201703L > > + > > +#include > > +#include > > +#include > > +// #include > > This line could be removed, or leave i

Re: [wwwdocs] Mention common attribute in gcc-10/porting_to.html

2020-02-06 Thread Sandra Loosemore
On 2/6/20 3:18 PM, Gerald Pfeifer wrote: On Thu, 6 Feb 2020, Jakub Jelinek wrote: + If tentative definitions of particular variable or variables need to be I believe that would be "a particular variable", but best to simplify to "of particular variables". + placed in a common block, __attr

RE: [PATCH][AARCH64] Fix for PR86901

2020-02-06 Thread Modi Mo via gcc-patches
> I did a quick bootstrap, this shows several failures like: > > gcc/builtins.c:9427:1: error: unrecognizable insn: > 9427 | } > | ^ > (insn 212 211 213 24 (set (reg:SI 207) > (zero_extract:SI (reg:SI 206) > (const_int 26 [0x1a]) > (const_int 6 [0x6]))) "/gcc

[PATCH] Use the section flag 'o' for __patchable_function_entries

2020-02-06 Thread H.J. Lu
This commit in GNU binutils 2.35: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=b7d072167715829eed0622616f6ae0182900de3e added the section flag 'o' to .section directive: .section __patchable_function_entries,"awo",@progbits,foo which specifies the symbol name which the se

Re: [PATCH] x86-64: Pass aggregates with only float/double in GPRs for MS_ABI

2020-02-06 Thread H.J. Lu
On Wed, Feb 05, 2020 at 09:51:14PM +0100, Uros Bizjak wrote: > On Wed, Feb 5, 2020 at 6:59 PM H.J. Lu wrote: > > > > MS_ABI requires passing aggregates with only float/double in integer > > registers. Checked gcc outputs against Clang and fixed: > > > > FAIL: libffi.bhaible/test-callback.c -W -Wa

PING^6: [PATCH] i386: Properly encode xmm16-xmm31/ymm16-ymm31 for vector move

2020-02-06 Thread H.J. Lu
On Mon, Jan 27, 2020 at 10:59 AM H.J. Lu wrote: > > On Mon, Jul 8, 2019 at 8:19 AM H.J. Lu wrote: > > > > On Tue, Jun 18, 2019 at 8:59 AM H.J. Lu wrote: > > > > > > On Fri, May 31, 2019 at 10:38 AM H.J. Lu wrote: > > > > > > > > On Tue, May 21, 2019 at 2:43 PM H.J. Lu wrote: > > > > > > > > >

Re: [PATCH, rs6000]: mark clobber for registers changed by untpyed_call

2020-02-06 Thread Jiufu Guo
Segher Boessenkool writes: > Hi! > > On Thu, Feb 06, 2020 at 10:49:36AM +0800, Jiufu Guo wrote: >> > emit_call_insn (gen_call (operands[0], const0_rtx, const0_rtx)); >> > >> > for (i = 0; i < XVECLEN (operands[2], 0); i++) >> > { >> > rtx set = XVECEXP (operands[2], 0, i); >> >

[PATCH] i386: Fix splitters that call extract_insn_cached [PR93611]

2020-02-06 Thread Jakub Jelinek
Hi! The following testcase ICEs. The generated split_insns starts with recog_data.insn = NULL and then tries to put various operands into recog_data.operand array and checks various splitter conditions. The problem is that some atom related tuning splitters indirectly call extract_insn_cached on