Re: [PATCH] arc: Add --with-fpu support for ARCv2 cpus

2021-06-04 Thread Jeff Law via Gcc-patches
On 6/4/2021 1:29 AM, Claudiu Zissulescu via Gcc-patches wrote: Hi Jeff, I would like to add spport for selecting the ARCv2 FPU extension at configuration-time. The --with-fpu configuration option is ignored when -mfpu compiler option is specified. My concern is using `grep -P` when

[committed] Fix H8 split conditions

2021-06-04 Thread Jeff Law via Gcc-patches
The irony here is I had this in-flight when the discussion about tightening the split conditions in define_insn_and_split started.  What spurred it was an unexpected split with after reworking some patterns to allow them to be used for redundant test/compare elimination.  THat was ultimately

[PATCH] PR 99293: Optimize splat of vec_extract for V2DI/V2DF.

2021-06-04 Thread Michael Meissner via Gcc-patches
PR 99293: Optimize splat of vec_extract for V2DI/V2DF. We had optimizations for splat of a vector extract for the other vector types, but we missed having one for V2DI and V2DF. This patch adds a combiner insn to do this optimization. In looking at the source, we had similar optimizations for

[PATCH] [libstdc++] Fix Wrong param type in :atomic_ref<_Tp*>::wait [PR100889]

2021-06-04 Thread Thomas Rodgers
Fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100889 libstdc++-v3/ChangeLog: * include/bits/atomic_base.h (atomic_ref<_Tp*>::wait): Change parameter type from _Tp to _Tp*. * testsuite/29_atomics/atomic_ref/100889.cc: New test. ---

Re: [PATCH 4/5 ver4] RS6000, Add test 128-bit shifts for just the int128 type.

2021-06-04 Thread Segher Boessenkool
Hi! On Mon, Apr 26, 2021 at 09:36:26AM -0700, Carl Love wrote: > The previous patch added the vector 128-bit integer shift instruction > support for the V1TI type. This patch renames and moves the VSX_TI > iterator from vsx.md to VEC_TI in vector.md. The uses of VEC_TI are > also updated. Okay

Re: [PATCH 3/5 ver4] RS6000: Add TI to TD (128-bit DFP) and TD to TI support

2021-06-04 Thread Segher Boessenkool
Hi! Maybe use "Add floattitd2 and fixtdti2" or similar as title? On Mon, Apr 26, 2021 at 09:36:19AM -0700, Carl Love wrote: > gcc/ChangeLog > dje@gmail.com, gcc-patches@gcc.gnu.org, Bill Schmidt > , Peter Bergner , What Will said here. > 2021-04-26 Carl Love > *

Re: [PATCH] PR libstdc++/100889: Fix wrong param type in atomic_ref<_Tp*>::wait

2021-06-04 Thread Jonathan Wakely via Gcc-patches
On Sat, 5 Jun 2021, 00:05 Thomas Rodgers, wrote: > Fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100889 > > libstdc++-v3/ChangeLog: > > * include/bits/atomic_base.h (atomic_ref<_Tp*>::wait): > Change parameter type from _Tp to _Tp*. > *

Re: [PATCH 2/5 ver4] RS6000: Add 128-bit Integer Operations

2021-06-04 Thread Segher Boessenkool
Hi! On Mon, Apr 26, 2021 at 09:36:12AM -0700, Carl Love wrote: > This patch adds the 128-bit integer support for divide, modulo, shift, > compare of 128-bit integers instructions and builtin support. > (rs6000_gimple_fold_builtin) [P10V_BUILTIN_VCMPEQUT, > P10_BUILTIN_CMPNET,

[PATCH] PR libstdc++/100889: Fix wrong param type in atomic_ref<_Tp*>::wait

2021-06-04 Thread Thomas Rodgers
Fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100889 libstdc++-v3/ChangeLog: * include/bits/atomic_base.h (atomic_ref<_Tp*>::wait): Change parameter type from _Tp to _Tp*. * testsuite/29_atomics/atomic_ref/deduction.cc: Add reproducer case from PR. ---

[PATCH] [libstdc++] Cleanup atomic timed wait implementation

2021-06-04 Thread Thomas Rodgers
This cleans up the implementation of atomic_timed_wait.h and fixes the accidental pessimization of spinning after waiting in __timed_waiter_pool::_M_do_wait_until. libstdc++-v3/ChangeLog: * include/bits/atomic_timed_wait.h (__wait_clock_t): Define conditionally.

Re: [PATCH] x86-64: Remove HAVE_LD_PIE_COPYRELOC

2021-06-04 Thread Fāng-ruì Sòng via Gcc-patches
PING^2 https://gcc.gnu.org/pipermail/gcc-patches/2021-May/570139.html On Mon, May 24, 2021 at 9:43 AM Fāng-ruì Sòng wrote: > > Ping https://gcc.gnu.org/pipermail/gcc-patches/2021-May/570139.html > > On Tue, May 11, 2021 at 8:29 PM Fangrui Song wrote: > > > > This was introduced in 2014-12 to

[PATCH 13/13] v2 Add regression tests for PR 74765 and 74762

2021-06-04 Thread Martin Sebor via Gcc-patches
The attached patch adds regression tests for two closely related bugs resolved by the patch series. Regression tests for TREE_NO_WARNING enhancement to warning groups. PR middle-end/74765 - missing uninitialized warning (parenthesis, TREE_NO_WARNING abuse) PR middle-end/74762 - [9/10/11/12

[PATCH 12/13] v2 Remove TREE_NO_WARNING and gimple*no_warning* APIs

2021-06-04 Thread Martin Sebor via Gcc-patches
The attached patch removes the definitions of the TREE_NO_WARNING macro and the gimple_get_no_warning_p() and gimple_set_no_warning() functions. Remove legacy TREE_NO_WARNING amd gimple_*no_warning* APIs. gcc/ChangeLog: * tree.h (TREE_NO_WARNING): Remove. * gimple.h (gimple_no_warning_p):

[PATCH 11/13] v2 Use new per-location warning APIs in the Objective-C front end

2021-06-04 Thread Martin Sebor via Gcc-patches
The attached patch replaces the uses of TREE_NO_WARNING in the Objective-C front end with the new suppress_warning(), warning_suppressed_p(), and copy_warning() APIs. Add support for per-location warning groups. gcc/objc/ChangeLog: * objc-act.c (objc_maybe_build_modify_expr): Replace direct

[PATCH 10/13] v2 Use new per-location warning APIs in the middle end

2021-06-04 Thread Martin Sebor via Gcc-patches
The attached patch introduces declarations of the new suppress_warning(), warning_suppressed_p(), and copy_warning() APIs, and replaces the uses of TREE_NO_WARNING in the middle end with them. Add support for per-location warning groups. gcc/ChangeLog: * builtins.c (warn_string_no_nul):

[PATCH 9/13] v2 Use new per-location warning APIs in LTO

2021-06-04 Thread Martin Sebor via Gcc-patches
The attached patch replaces the uses of TREE_NO_WARNING in the LTO front end with the new suppress_warning() API. It adds a couple of FIXMEs that I plan to take care of in a follow up. Add support for per-location warning groups. gcc/lto/ChangeLog: * gimple-streamer-out.c

[PATCH 8/13] v2 Use new per-location warning APIs in libcc1

2021-06-04 Thread Martin Sebor via Gcc-patches
The attached patch replaces the uses of TREE_NO_WARNING in libcc1 with the new suppress_warning() API. Add support for per-location warning groups. libcc1/ChangeLog: * libcp1plugin.cc (record_decl_address): Replace a direct use of TREE_NO_WARNING with suppress_warning. diff --git

[PATCH 7/13] v2 Use new per-location warning APIs in the FORTRAN front end

2021-06-04 Thread Martin Sebor via Gcc-patches
The attached patch replaces the uses of TREE_NO_WARNING in the FORTRAN front end with the new suppress_warning() API. Add support for per-location warning groups. gcc/fortran/ChangeLog: * trans-array.c (trans_array_constructor): Replace direct uses of TREE_NO_WARNING with

[PATCH 6/13] v2 Use new per-location warning APIs in the C++ front end

2021-06-04 Thread Martin Sebor via Gcc-patches
The attached patch replaces the uses of TREE_NO_WARNING in the C++ front end with the new suppress_warning(), warning_suppressed_p(), and copy_warning() APIs. Add support for per-location warning groups. * call.c (build_over_call): Replace direct uses of TREE_NO_WARNING with

[PATCH 5/13] v2 Use new per-location warning APIs in the RL78 back end

2021-06-04 Thread Martin Sebor via Gcc-patches
The attached patch replaces the uses of TREE_NO_WARNING in the RL78 back end with the new suppress_warning() and warning_suppressed_p() APIs. Add support for per-location warning groups. gcc/ChangeLog: * config/rl78/rl78.c (rl78_handle_naked_attribute): Replace a direct use of TREE_NO_WARNING

[PATCH 4/13] v2 Use new per-location warning APIs in C family code

2021-06-04 Thread Martin Sebor via Gcc-patches
The attached patch replaces the uses of TREE_NO_WARNING in the shared C family front end with the new suppress_warning(), warning_suppressed_p(), and copy_warning() APIs. Add support for per-location warning groups. gcc/c-family/ChangeLog: * c-common.c (c_wrap_maybe_const): Remove

[PATCH 3/13] v2 Use new per-location warning APIs in C front end

2021-06-04 Thread Martin Sebor via Gcc-patches
The attached patch replaces the uses of TREE_NO_WARNING in the C front end with the new suppress_warning(), warning_suppressed_p(), and copy_warning() APIs. Add support for per-location warning groups. gcc/c/ChangeLog: * c-decl.c (pop_scope): Replace direct uses of TREE_NO_WARNING with

[PATCH 1/13] v2 [PATCH 1/13] Add support for per-location warning groups (PR 74765)

2021-06-04 Thread Martin Sebor via Gcc-patches
The attached patch introduces the suppress_warning(), warning_suppressed(), and copy_no_warning() APIs without making use of them in the rest of GCC. They are in three files: diagnostic-spec.{h,c}: Location-centric overloads. warning-control.cc: Tree- and gimple*-centric overloads. The

[PATCH 2/13] v2 Use new per-location warning APIs in Ada.

2021-06-04 Thread Martin Sebor via Gcc-patches
The attached patch replaces the uses of TREE_NO_WARNING in the Ada front end with the new suppress_warning(), warning_suppressed_p(), and copy_warning() APIs. Add support for per-location warning groups. gcc/ada/ChangeLog: * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu):

[PATCH 0/13] v2 warning control by group and location (PR 74765)

2021-06-04 Thread Martin Sebor via Gcc-patches
This is a revised patch series to add warning control by group and location, updated based on feedback on the initial series. v2 changes include: 1) Use opt_code rather than int for the option argument to the new APIs. This let me find and fix a bug in the original Ada change. 2) Use

[PATCH] PR fortran/95502 - ICE in gfc_check_do_variable, at fortran/parse.c:4446

2021-06-04 Thread Harald Anlauf via Gcc-patches
ICE-on-invalid issues during error recovery. Testcase by Gerhard, initial patch by Steve. I found another variant which needed an additional fix for a NULL pointer dereference. Regtested on x86_64-pc-linux-gnu. OK for mainline / 11-branch? Thanks, Harald Fortran - ICE in

[PATCH] c++: access of dtor named by qualified template-id [PR100918]

2021-06-04 Thread Patrick Palka via Gcc-patches
Here, when resolving the destructor named by Inner::~Inner (which is valid only before C++20) we end up in cp_parser_lookup_name to look up the name Inner relative to the scope Inner. The lookup naturally finds the injected-class-name Inner, and because is_template is true, we adjust this lookup

Re: [committed] libstdc++: Fix value categories used by ranges access CPOs [PR 100824]

2021-06-04 Thread Jonathan Wakely via Gcc-patches
On 04/06/21 21:44 +0100, Jonathan Wakely wrote: On 04/06/21 18:03 +0100, Jonathan Wakely wrote: The implementation of P2091R0 was incomplete, so that some range access CPOs used perfect forwarding where they should not. This fixes it by consistently operating on lvalues. Some additional

Re: [committed] libstdc++: Fix value categories used by ranges access CPOs [PR 100824]

2021-06-04 Thread Jonathan Wakely via Gcc-patches
On 04/06/21 18:03 +0100, Jonathan Wakely wrote: The implementation of P2091R0 was incomplete, so that some range access CPOs used perfect forwarding where they should not. This fixes it by consistently operating on lvalues. Some additional changes that are not necessary to fix the bug: Modify

Re: [PATCH] PR libstdc++/98842: Fixed Constraints on operator<=>(optional, U)

2021-06-04 Thread Jonathan Wakely via Gcc-patches
On Thu, 3 Jun 2021 at 17:27, Seija K. via Libstdc++ wrote: > The original operator was underconstrained. _Up needs to fulfill > compare_three_way_result, > as mentioned in this bug report > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98842 > Thanks, I'll get the patch applied next week. >

Re: [PATCH] [libstdc++] Remove unused hasher instance.

2021-06-04 Thread Jonathan Wakely via Gcc-patches
On Fri, 4 Jun 2021 at 20:54, Thomas Rodgers wrote: > This is a remnant of poorly executed refactoring. > OK for trunk and gcc-11, thanks. > libstdc++-v3/ChangeLog: > > * include/std/barrier (__tree_barrier::_M_arrive): Remove > unnecessary hasher instantiation. > --- >

Re: [PATCH 2/5 ver4] RS6000: Add 128-bit Integer Operations

2021-06-04 Thread Segher Boessenkool
On Tue, Apr 27, 2021 at 06:46:16PM -0500, will schmidt wrote: > On Mon, 2021-04-26 at 09:36 -0700, Carl Love wrote: > > (rs6000_gimple_fold_builtin) [P10V_BUILTIN_VCMPEQUT, > > P10_BUILTIN_CMPNET, P10_BUILTIN_CMPGE_1TI, > > P10_BUILTIN_CMPGE_U1TI, P10_BUILTIN_VCMPGTUT, > >

[PATCH] [libstdc++] Remove unused hasher instance.

2021-06-04 Thread Thomas Rodgers
This is a remnant of poorly executed refactoring. libstdc++-v3/ChangeLog: * include/std/barrier (__tree_barrier::_M_arrive): Remove unnecessary hasher instantiation. --- libstdc++-v3/include/std/barrier | 1 - 1 file changed, 1 deletion(-) diff --git

Re: [PATCH 01/11] gen: Emit error msg for empty split condition

2021-06-04 Thread Segher Boessenkool
On Fri, Jun 04, 2021 at 01:03:34PM -0600, Martin Sebor wrote: > Also, "insn" is not a word, and even though it's common abbreviation > in GCC speak it's not necessarily something all users are familiar > with, and doesn't lend itself to translation. Please spell out > the word instead. This is a

Re: [PATCH 01/11] gen: Emit error msg for empty split condition

2021-06-04 Thread Martin Sebor via Gcc-patches
On 6/1/21 11:04 PM, Kewen Lin via Gcc-patches wrote: As Segher suggested, this patch is to emit the error message if the split condition of define_insn_and_split is empty while the insn condition isn't. gcc/ChangeLog: * gensupport.c (process_rtx): Emit error message for empty

Re: [PATCH 02/57] Support scanning of build-time GC roots in gengtype

2021-06-04 Thread Bill Schmidt via Gcc-patches
On 5/20/21 5:24 PM, Segher Boessenkool wrote: On Tue, May 11, 2021 at 11:01:22AM -0500, Bill Schmidt wrote: Hi!  I'd like to ping this specific patch from the series, which is the only one remaining that affects common code.  I confess that I don't know whom to ask for a review for gengtype; I

[committed] d: Fix ICE in gimplify_var_or_parm_decl, at gimplify.c:2755 (PR100882)

2021-06-04 Thread Iain Buclaw via Gcc-patches
Hi, Constructor calls for temporaries were reusing the TARGET_EXPR_SLOT of a TARGET_EXPR for an assignment, which later got passed to `build_assign', which stripped away the outer TARGET_EXPR, leaving a reference to a lone temporary with no declaration. This stripping away of the TARGET_EXPR

Re: [Patch] OpenMP: Handle bind clause in tree-nested.c [PR100905]

2021-06-04 Thread Jakub Jelinek via Gcc-patches
On Fri, Jun 04, 2021 at 07:47:50PM +0200, Tobias Burnus wrote: > Fails due to the (explicit or implicitly added) 'bind' clause as > tree-nested.c did not handle them. > > In convert_nonlocal_omp_clauses, the following clauses are > missing: OMP_CLAUSE_AFFINITY, OMP_CLAUSE_DEVICE_TYPE, >

arm_arch8_5 and arm_arch8_6 target baselines in arm.c

2021-06-04 Thread John Paul Adrian Glaubitz
Please keep me CC'ed as I'm currently not subscribed! Hi! I'm currently fixing some minor portability issues in gccrs and stumbled over the following error [1] which indicates a reference to an ARMv8 target extension in the ARM backend which doesn't seem to exist:

[Patch] OpenMP: Handle bind clause in tree-nested.c [PR100905]

2021-06-04 Thread Tobias Burnus
Fails due to the (explicit or implicitly added) 'bind' clause as tree-nested.c did not handle them. In convert_nonlocal_omp_clauses, the following clauses are missing: OMP_CLAUSE_AFFINITY, OMP_CLAUSE_DEVICE_TYPE, OMP_CLAUSE_EXCLUSIVE, OMP_CLAUSE_INCLUSIVE. I am not sure which of them should or

Re: [committed] libstdc++: Add feature test macro for heterogeneous lookup in unordered containers

2021-06-04 Thread Jonathan Wakely via Gcc-patches
On 04/06/21 16:01 +0100, Jonathan Wakely wrote: Also update the C++20 status docs. Signed-off-by: Jonathan Wakely libstdc++-v3/ChangeLog: * doc/xml/manual/status_cxx2020.xml: * doc/html/*: Regenerate. * include/bits/hashtable.h (__cpp_lib_generic_unordered_lookup):

Re: [committed] libstdc++: Optimize std::any_cast by replacing indirect call

2021-06-04 Thread Jonathan Wakely via Gcc-patches
Apparently my mailer decided to sent this email as From: Tim, rather than me. Sorry for any confusion. The patch is from Tim, but the email to the lists was sent by me (jwakely). Hopefully this one will have the right From: header on it! On 04/06/21 18:02 +0100, Tim Adye wrote: This

[committed] libstdc++: Fix value categories used by ranges access CPOs [PR 100824]

2021-06-04 Thread Jonathan Wakely via Gcc-patches
The implementation of P2091R0 was incomplete, so that some range access CPOs used perfect forwarding where they should not. This fixes it by consistently operating on lvalues. Some additional changes that are not necessary to fix the bug: Modify the __as_const helper to simplify its usage.

[committed] libstdc++: Optimize std::any_cast by replacing indirect call

2021-06-04 Thread Tim Adye
This significantly improves the performance of std::any_cast, by avoiding an indirect call to the _S_manage function through a function pointer. Before we make that indirect call we've already established that the contained value has the expected type, which means we also know the manager type,

[committed] Fortran/OpenMP: Fix -fdump-parse-tree for 'omp loop'

2021-06-04 Thread Tobias Burnus
Committed as r12-1220-gcb6e6d5faa3f817435b6f203226fa5969d7a7264 - Mentor Graphics (Deutschland) GmbH, Arnulfstrasse 201, 80634 München Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Frank Thürauf commit cb6e6d5faa3f817435b6f203226fa5969d7a7264 Author:

[Ping, Patch, Fortran] PR100337 Should be able to pass non-present optional arguments to CO_BROADCAST

2021-06-04 Thread Andre Vehreschild via Gcc-patches
Ping! On Fri, 21 May 2021 15:33:11 +0200 Andre Vehreschild wrote: > Hi, > > the attached patch fixes an issue when calling CO_BROADCAST in > -fcoarray=single mode, where the optional but non-present (in the calling > scope) stat variable was assigned to before checking for it being not present.

Re: [PATCH] c++: tsubst_function_decl and excess arg levels [PR100102]

2021-06-04 Thread Jason Merrill via Gcc-patches
On 6/3/21 11:46 PM, Patrick Palka wrote: Here, when instantiating the dependent alias template duration::__is_harmonic with args={{T,U},{int}}, we find ourselves substituting the function decl _S_gcd. Since we have more arg levels than _S_gcd has parm levels, an old special case in

Re: PING [PATCH] PR fortran/99839 - [9/10/11/12 Regression] ICE in inline_matmul_assign, at fortran/frontend-passes.c:4234

2021-06-04 Thread Paul Richard Thomas via Gcc-patches
Hi Harald, Looks good to me - OK for as many branches as you have sufficient fortitude for. Regards Paul On Thu, 3 Jun 2021 at 21:22, Harald Anlauf via Fortran wrote: > *PING* > > > Gesendet: Donnerstag, 27. Mai 2021 um 22:20 Uhr > > Von: "Harald Anlauf" > > An: "fortran" , "gcc-patches" <

Re: Generate 128-bit divide/modulus

2021-06-04 Thread will schmidt via Gcc-patches
On Fri, 2021-06-04 at 11:10 -0400, Michael Meissner wrote: Hi, > Generate 128-bit divide/modulus. > > This patch adds support for the VDIVSQ, VDIVUQ, VMODSQ, and VMODUQ > instructions to do 128-bit arithmetic. vdivsq,vdivuq,vmodsq,vmoduq should be lowercase ? > > I have tested this on 3

[PATCH] i386: Add init pattern for V2HI vectors [PR100637]

2021-06-04 Thread Uros Bizjak via Gcc-patches
2021-06-03 Uroš Bizjak gcc/ PR target/100637 * config/i386/i386-expand.c (ix86_expand_vector_init_duplicate): Handle V2HI mode. (ix86_expand_vector_init_general): Ditto. Use SImode instead of word_mode for logic operations when GET_MODE_SIZE (mode) < UNITS_PER_WORD.

Re: [Patch] Fortran: Fix OpenMP/OpenACC continue-line parsing

2021-06-04 Thread Jakub Jelinek via Gcc-patches
On Fri, Jun 04, 2021 at 05:28:37PM +0200, Tobias Burnus wrote: > Fortran: Fix OpenMP/OpenACC continue-line parsing > > gcc/fortran/ChangeLog: > > * scanner.c (skip_fixed_omp_sentinel): Set openacc_flag if > this is not an (OpenMP) continuation line. >

[Patch] Fortran: Fix OpenMP/OpenACC continue-line parsing

2021-06-04 Thread Tobias Burnus
Hi all, hi Jakub & Thomas, I did run into this issue with the previous patch where !$omp parallel & !$acc& loop did no longer report an error – hence, I changed 'loop' to 'kernels loop' as buffered 'gfc_error' might not be output. Having no error is very unfortunate. There is no ideal

Re: [Patch, fortran] PR fortran/100120/100816/100818/100819/100821 problems raised by aggregate data types

2021-06-04 Thread Paul Richard Thomas via Gcc-patches
Hi José, I can second Dominique's thanks. I applied it to my tree when you first posted, set the regtest in motion and have not been able to return to gfortran matters since. OK for master. I am especially happy that you have tackled this area and have rationalised it to a substantial degree.

Generate 128-bit divide/modulus

2021-06-04 Thread Michael Meissner via Gcc-patches
Generate 128-bit divide/modulus. This patch adds support for the VDIVSQ, VDIVUQ, VMODSQ, and VMODUQ instructions to do 128-bit arithmetic. I have tested this on 3 compilers: * Power9 little endian, --with-cpu=power9 * Power8 big endian, --with-cpu=power8, both 32/64-bit tested *

Re: GCC documentation: porting to Sphinx

2021-06-04 Thread Martin Sebor via Gcc-patches
On 6/3/21 4:56 AM, Martin Liška wrote: On 6/2/21 10:41 PM, Martin Sebor wrote: On 5/31/21 7:25 AM, Martin Liška wrote: Hello. I've made quite some progress with the porting of the documentation and I would like to present it to the community now: https://splichal.eu/scripts/sphinx/ Hello.

[committed] libstdc++: Add feature test macro for heterogeneous lookup in unordered containers

2021-06-04 Thread Jonathan Wakely via Gcc-patches
Also update the C++20 status docs. Signed-off-by: Jonathan Wakely libstdc++-v3/ChangeLog: * doc/xml/manual/status_cxx2020.xml: * doc/html/*: Regenerate. * include/bits/hashtable.h (__cpp_lib_generic_unordered_lookup): Define. * include/std/version

Re: [PATCH] fold-const: Fix up fold_read_from_vector [PR100887]

2021-06-04 Thread Jakub Jelinek via Gcc-patches
On Fri, Jun 04, 2021 at 04:21:41PM +0200, Jakub Jelinek wrote: > but if the permutation was e.g. > { 0, 13, 2, 3, 4, 5, 6, 7 } > then it would be called with 5 as index and it could see that > it is in the second half (aka. the { 0, 0, 0, 0 } constructor) and > read the 5-4 element from there.

Re: RFC: Sphinx for GCC documentation

2021-06-04 Thread Koning, Paul via Gcc-patches
> On Jun 4, 2021, at 3:55 AM, Tobias Burnus wrote: > > Hello, > > On 13.05.21 13:45, Martin Liška wrote: >> On 4/1/21 3:30 PM, Martin Liška wrote: >>> That said, I'm asking the GCC community for a green light before I >>> invest >>> more time on it? >> So far, I've received just a small

Re: [PATCH] fold-const: Fix up fold_read_from_vector [PR100887]

2021-06-04 Thread Jakub Jelinek via Gcc-patches
On Fri, Jun 04, 2021 at 04:06:43PM +0200, Richard Biener wrote: > On June 4, 2021 10:44:42 AM GMT+02:00, Jakub Jelinek wrote: > >Hi! > > > >The callers of fold_read_from_vector expect that the index they pass is > >an index of an element in the vector and the function does that most of > >the >

Re: [PATCH] fold-const: Fix up fold_read_from_vector [PR100887]

2021-06-04 Thread Richard Biener
On June 4, 2021 10:44:42 AM GMT+02:00, Jakub Jelinek wrote: >Hi! > >The callers of fold_read_from_vector expect that the index they pass is >an index of an element in the vector and the function does that most of >the >time. But we allow CONSTRUCTORs with VECTOR_TYPE to have VECTOR_TYPE

[PATCH v3] AArch64: Improve GOT addressing

2021-06-04 Thread Wilco Dijkstra via Gcc-patches
Hi Richard, This merges the v1 and v2 patches and removes the spurious MEM from ldr_got_small_si/di. This has been rebased after [1], and the performance gain has now doubled. [1] https://gcc.gnu.org/pipermail/gcc-patches/2021-June/571708.html Improve GOT addressing by treating the instructions

Re: [PATCH] arm: Auto-vectorization for MVE and Neon: vhadd/vrhadd

2021-06-04 Thread Christophe Lyon via Gcc-patches
On Wed, 2 Jun 2021 at 20:19, Richard Sandiford wrote: > > Christophe Lyon writes: > > This patch adds support for auto-vectorization of average value > > computation using vhadd or vrhadd, for both MVE and Neon. > > > > The patch adds the needed [u]avg3_[floor|ceil] patterns to > >

Re: [PATCH] x86: Convert CONST_WIDE_INT to broadcast in move expanders

2021-06-04 Thread H.J. Lu via Gcc-patches
On Thu, Jun 3, 2021 at 11:21 PM Uros Bizjak wrote: > > On Fri, Jun 4, 2021 at 12:39 AM H.J. Lu wrote: > > > > On Thu, Jun 3, 2021 at 12:39 AM Uros Bizjak wrote: > > > > > > On Thu, Jun 3, 2021 at 5:49 AM H.J. Lu wrote: > > > > > > > > Update move expanders to convert the CONST_WIDE_INT operand

[PATCH] openmp: Call c_omp_adjust_map_clauses even for combined target [PR100902]

2021-06-04 Thread Jakub Jelinek via Gcc-patches
Hi! When looking at in_reduction support for target, I've noticed that c_omp_adjust_map_clauses is not called for the combined target case. The following patch fixes it, will commit once tested. Unfortunately, there are other issues. One is (also mentioned in the PR) that currently the pointer

Re: [committed] gfortran.dg/gomp/pr99928-*.f90: Use implicit none, remove one xfail

2021-06-04 Thread Tobias Burnus
On 04.06.21 13:20, Tobias Burnus wrote: This adds a bunch of 'implicit none' to the testcases, a missing 'integer i' and fixes a typo in a loop variable, which permitted to remove an xfail. Or actually it didn't, as I seemingly did a last-minute change in the wrong way after running the

[committed] gfortran.dg/gomp/pr99928-*.f90: Use implicit none, remove one xfail

2021-06-04 Thread Tobias Burnus
This adds a bunch of 'implicit none' to the testcases, a missing 'integer i' and fixes a typo in a loop variable, which permitted to remove an xfail. Currently, there are two classes of xfail: * !$omp parallel master taskloop (simd) → parallel misses shared(...) for

Re: [PATCH] libgcc: Fix _Unwind_Backtrace() for SEH

2021-06-04 Thread Eric Botcazou
> Forgot to assign to gcc_context.cfa and gcc_context.ra. Note this fix can > be backported to earlier editions of gcc as well It's already done by: 2020-11-03 Martin Storsjö * unwind-seh.c (_Unwind_Backtrace): Set the ra and cfa pointers before calling the callback.

RE: [PATCH 1/4]middle-end Vect: Add support for dot-product where the sign for the multiplicant changes.

2021-06-04 Thread Tamar Christina via Gcc-patches
Hi Richi, Attached is re-spun patch. tree_nop_conversion_p was very handy in cleaning up the patch, Thanks! Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. Ok for master if Richard S has no comments? Thanks, Tamar gcc/ChangeLog: * optabs.def (usdot_prod_optab): New.

Re: [PATCH] x86: Fix ix86_expand_vector_init for V*TImode [PR100887]

2021-06-04 Thread Uros Bizjak via Gcc-patches
On Fri, Jun 4, 2021 at 11:00 AM Jakub Jelinek wrote: > > Hi! > > We have vec_initv4tiv2ti and vec_initv2titi patterns which call > ix86_expand_vector_init and assume it works for those modes. For the > case of construction from two half-sized vectors, the code assumes it > will always succeed,

[committed] openmp: Assorted depend/affinity/iterator related fixes [PR100859]

2021-06-04 Thread Jakub Jelinek via Gcc-patches
Hi! The depend-iterator-3.C testcase shows various bugs. 1) tsubst_omp_clauses didn't handle OMP_CLAUSE_AFFINITY (should be handled like OMP_CLAUSE_DEPEND) 2) because locators can be arbitrary lvalue expressions, we need to allow for C++ array section base (especially when array section

Re: [PATCH] arc: Add --with-fpu support for ARCv2 cpus

2021-06-04 Thread Bernhard Reutner-Fischer via Gcc-patches
On Fri, 4 Jun 2021 10:29:09 +0300 Claudiu Zissulescu via Gcc-patches wrote: > Hi Jeff, > > I would like to add spport for selecting the ARCv2 FPU extension at > configuration-time. > > The --with-fpu configuration option is ignored when -mfpu compiler > option is specified. > > My concern is

[PATCH] x86: Fix ix86_expand_vector_init for V*TImode [PR100887]

2021-06-04 Thread Jakub Jelinek via Gcc-patches
Hi! We have vec_initv4tiv2ti and vec_initv2titi patterns which call ix86_expand_vector_init and assume it works for those modes. For the case of construction from two half-sized vectors, the code assumes it will always succeed, but we have only insn patterns with SImode and DImode element types.

[PATCH] fold-const: Fix up fold_read_from_vector [PR100887]

2021-06-04 Thread Jakub Jelinek via Gcc-patches
Hi! The callers of fold_read_from_vector expect that the index they pass is an index of an element in the vector and the function does that most of the time. But we allow CONSTRUCTORs with VECTOR_TYPE to have VECTOR_TYPE elements and in that case every CONSTRUCTOR element represents not just one

Re: [PATCH 2/2, rs6000] Remove mode promotion for pseudos

2021-06-04 Thread HAO CHEN GUI via Gcc-patches
Segher,    I committed two patches (r12-1201 and r12-1202) into trunk. Thanks for your review and advice. On 4/6/2021 上午 1:36, Segher Boessenkool wrote: Hi! On Thu, May 20, 2021 at 05:49:49PM +0800, HAO CHEN GUI wrote: rs6000 has instructions that can do almost everything 32 bit

Re: [PATCH] Simplify (view_convert ~a) < 0 to (view_convert a) >= 0 [PR middle-end/100738]

2021-06-04 Thread Marc Glisse
On Fri, 4 Jun 2021, Hongtao Liu via Gcc-patches wrote: On Tue, Jun 1, 2021 at 6:17 PM Marc Glisse wrote: On Tue, 1 Jun 2021, Hongtao Liu via Gcc-patches wrote: Hi: This patch is about to simplify (view_convert:type ~a) < 0 to (view_convert:type a) >= 0 when type is signed integer. Similar

Re: [PATCH] Simplify (view_convert ~a) < 0 to (view_convert a) >= 0 [PR middle-end/100738]

2021-06-04 Thread Hongtao Liu via Gcc-patches
On Fri, Jun 4, 2021 at 1:01 PM Hongtao Liu wrote: > > On Tue, Jun 1, 2021 at 6:17 PM Marc Glisse wrote: > > > > On Tue, 1 Jun 2021, Hongtao Liu via Gcc-patches wrote: > > > > > Hi: > > > This patch is about to simplify (view_convert:type ~a) < 0 to > > > (view_convert:type a) >= 0 when type is

[PATCH V3] Split loop for NE condition.

2021-06-04 Thread Jiufu Guo via Gcc-patches
Update the patch since v2: . Check index and bound from gcond before checking if wrap. . Update test case, and add an executable case. . Refine code comments. . Enhance the checking for i++/++i in the loop header. . Enhance code to handle equal condition on exit Bootstrap and regtest pass on

Re: RFC: Sphinx for GCC documentation

2021-06-04 Thread Tobias Burnus
Hello, On 13.05.21 13:45, Martin Liška wrote: On 4/1/21 3:30 PM, Martin Liška wrote: That said, I'm asking the GCC community for a green light before I invest more time on it? So far, I've received just a small feedback about the transition. In most cases positive. [1]

Re: [PATCH 1/2] CALL_INSN may not be a real function call.

2021-06-04 Thread Jakub Jelinek via Gcc-patches
On Thu, Jun 03, 2021 at 02:54:07PM +0800, liuhongt wrote: > Use "used" flag for CALL_INSN to indicate it's a fake call. If it's a > fake call, it won't have its own function stack. > > gcc/ChangeLog > > PR target/82735 > * df-scan.c (df_get_call_refs): When call_insn is a fake call,

Re: [PATCH] [i386] Fix ICE of insn does not satisfy its constraints.

2021-06-04 Thread Jakub Jelinek via Gcc-patches
On Fri, Jun 04, 2021 at 01:03:58AM +, Liu, Hongtao wrote: > Thanks for the review. > Yes, you're right, AVX512VL parts are already guaranteed by > ix86_hard_regno_mode_ok. > > Here is updated patch. One remaining thing, could you try to modify the testcase back to #include and using

Re: [ARM] PR98435: Missed optimization in expanding vector constructor

2021-06-04 Thread Christophe Lyon via Gcc-patches
On Fri, 4 Jun 2021 at 09:27, Prathamesh Kulkarni via Gcc-patches wrote: > > Hi, > As mentioned in PR, for the following test-case: > > #include > > bfloat16x4_t f1 (bfloat16_t a) > { > return vdup_n_bf16 (a); > } > > bfloat16x4_t f2 (bfloat16_t a) > { > return (bfloat16x4_t) {a, a, a, a}; >

[PATCH] arc: Add --with-fpu support for ARCv2 cpus

2021-06-04 Thread Claudiu Zissulescu via Gcc-patches
Hi Jeff, I would like to add spport for selecting the ARCv2 FPU extension at configuration-time. The --with-fpu configuration option is ignored when -mfpu compiler option is specified. My concern is using `grep -P` when configuring. Is that ok? Thanks, Claudiu gcc/ -mm-dd Claudiu

Re: GCC documentation: porting to Sphinx

2021-06-04 Thread Martin Liška
On 6/3/21 7:16 PM, Joseph Myers wrote: On Thu, 3 Jun 2021, Martin Liška wrote: On 6/2/21 6:44 PM, Joseph Myers wrote: On Wed, 2 Jun 2021, Joel Sherrill wrote: For RTEMS, we switched from texinfo to Sphinx and the dependency on Python3 for Sphinx has caused a bit of hassle. Is this going to

[ARM] PR98435: Missed optimization in expanding vector constructor

2021-06-04 Thread Prathamesh Kulkarni via Gcc-patches
Hi, As mentioned in PR, for the following test-case: #include bfloat16x4_t f1 (bfloat16_t a) { return vdup_n_bf16 (a); } bfloat16x4_t f2 (bfloat16_t a) { return (bfloat16x4_t) {a, a, a, a}; } Compiling with arm-linux-gnueabi -O3 -mfpu=neon -mfloat-abi=softfp -march=armv8.2-a+bf16+fp16

[committed] arc: Don't allow millicode thunks with reduced register set CPUs.

2021-06-04 Thread Claudiu Zissulescu via Gcc-patches
The millicode thunks are not reduced register set safe. Disable them for CPUs having this option on. gcc/ 2021-06-04 Claudiu Zissulescu * config/arc/arc.c (arc_override_options): Disable millicode thunks when RF16 is on. Signed-off-by: Claudiu Zissulescu ---

[PATCH] libstdc++: add missing typename for dependent type in std::ranges::elements_view [PR100900]

2021-06-04 Thread Avi Kivity
Clang complains about the missing typename. I believe it's not required in a more complete implementation of C++, but it's nicer to support less complete implementations. --- libstdc++-v3/include/std/ranges | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PING] [PATCH] For obj-c stage-final re-use the checksum from the previous stage

2021-06-04 Thread Bernd Edlinger
Ping... On 5/28/21 9:47 AM, Bernd Edlinger wrote: > Hi Richard, > > I've replicated your PR to make the objective-c checksum compare equal > > commit fb2647aaf55b453b37badfd40c14c59486a74584 > Author: Richard Biener > Date: Tue May 3 08:14:27 2016 + > > Make-lang.in

Re: [PATCH] rtl: constm64_rtx..const64_rtx

2021-06-04 Thread Richard Sandiford via Gcc-patches
Segher Boessenkool writes: > On Wed, Jun 02, 2021 at 06:07:28PM +0100, Richard Sandiford wrote: >> Segher Boessenkool writes: >> > Since times immemorial there has been const_int_rtx for all values from >> > -64 to 64, but only constm1_rtx..const2_rtx have been available for >> > convenient use.

Re: [PATCH 2/2] Fix _mm256_zeroupper by representing the instructions as call_insns in which the call has a special vzeroupper ABI.

2021-06-04 Thread Hongtao Liu via Gcc-patches
On Fri, Jun 4, 2021 at 2:27 PM Uros Bizjak via Gcc-patches wrote: > > On Thu, Jun 3, 2021 at 8:54 AM liuhongt wrote: > > > > When __builtin_ia32_vzeroupper is called explicitly, the corresponding > > vzeroupper pattern does not carry any CLOBBERS or SETs before LRA, > > which leads to incorrect

Re: [PATCH 2/2] Fix _mm256_zeroupper by representing the instructions as call_insns in which the call has a special vzeroupper ABI.

2021-06-04 Thread Uros Bizjak via Gcc-patches
On Thu, Jun 3, 2021 at 8:54 AM liuhongt wrote: > > When __builtin_ia32_vzeroupper is called explicitly, the corresponding > vzeroupper pattern does not carry any CLOBBERS or SETs before LRA, > which leads to incorrect optimization in pass_reload. In order to > solve this problem, this patch

Re: [PATCH] x86: Convert CONST_WIDE_INT to broadcast in move expanders

2021-06-04 Thread Uros Bizjak via Gcc-patches
On Fri, Jun 4, 2021 at 12:39 AM H.J. Lu wrote: > > On Thu, Jun 3, 2021 at 12:39 AM Uros Bizjak wrote: > > > > On Thu, Jun 3, 2021 at 5:49 AM H.J. Lu wrote: > > > > > > Update move expanders to convert the CONST_WIDE_INT operand to vector > > > broadcast from a byte with AVX2. Add

Re: [PATCH 1/2] [i386] Fold blendv builtins into gimple.

2021-06-04 Thread Hongtao Liu via Gcc-patches
ping On Mon, May 24, 2021 at 12:56 PM Hongtao Liu wrote: > > Hi: > This patch is about to Fold __builtin_ia32_pblendvb128 (a, b, c) as > VEC_COND_EXPR (c < 0, b, a), similar for float version but with > mask operand VIEW_CONVERT_EXPR to same sized integer vectype. > > After folding, blendv