[PATCH 18/19][GCC-8] aarch64: Fix ICE due to aarch64_gen_compare_reg_maybe_ze [PR94435]

2020-04-16 Thread Andre Vieira (lists)
The following testcase ICEs, because aarch64_gen_compare_reg_maybe_ze emits invalid RTL. For y_mode [QH]Imode it expects y to be of that mode (or CONST_INT that fits into that mode) and x being SImode; for non-CONST_INT y it zero extends y into SImode and compares that against x, for CONST_INT y

[PATCH 17/19][GCC-8] aarch64: Fix bootstrap with old binutils [PR93053]

2020-04-16 Thread Andre Vieira (lists)
As reported in the PR, GCC 10 (and also 9.3.1 but not 9.3.0) fails to build when using older binutils which lack LSE support, because those instructions are used in libgcc. Thanks to Kyrylo's hint, the following patches (hopefully) allow it to build even with older binutils by using .inst

[PATCH 14/19][GCC-8] aarch64: Fix store-exclusive in load-operate LSE helpers

2020-04-16 Thread Andre Vieira (lists)
2020-04-16  Andre Vieira     Backport from mainline     2019-09-25  Richard Henderson     PR target/91834     * config/aarch64/lse.S (LDNM): Ensure STXR output does not     overlap the inputs. diff --git a/libgcc/config/aarch64/lse.S b/libgcc/config/aarch64/lse.S index

[PATCH 10/19][GCC-8] aarch64: Add out-of-line functions for LSE atomics

2020-04-16 Thread Andre Vieira (lists)
This is the libgcc part of the interface -- providing the functions. Rationale is provided at the top of libgcc/config/aarch64/lse.S. 2020-04-16  Andre Vieira     Backport from mainline     2019-09-19  Richard Henderson     * config/aarch64/lse-init.c: New file.     * config/aarch64/lse.S:

[PATCH 13/19][GCC-8] Aarch64: Fix shrinkwrapping interactions with atomics

2020-04-16 Thread Andre Vieira (lists)
2020-04-16  Andre Vieira     Backport from mainline     2020-01-17  Wilco Dijkstra     PR target/92692     * config/aarch64/atomics.md (aarch64_compare_and_swap)     Use epilogue_completed rather than reload_completed. diff --git a/gcc/config/aarch64/atomics.md

[PATCH 8/19][GCC-8] aarch64: Implement TImode compare-and-swap

2020-04-16 Thread Andre Vieira (lists)
2020-04-16  Andre Vieira     Backport from mainline.     2019-09-19  Richard Henderson     * config/aarch64/aarch64.c (aarch64_gen_compare_reg): Add support     for NE comparison of TImode values.     (aarch64_emit_load_exclusive): Add support for TImode.     (aarch64_emit_store_exclusive):

[PATCH 7/19][GCC-8] aarch64: Extend %R for integer registers

2020-04-16 Thread Andre Vieira (lists)
2020-04-16  Andre Vieira     Backport from mainline.     2019-09-19  Richard Henderson     * config/aarch64/aarch64.c (aarch64_print_operand): Allow integer     registers with %R. diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index

Re: [PATCH 0/19][GCC-8] aarch64: Backport outline atomics

2020-04-16 Thread Andre Vieira (lists)
On 16/04/2020 13:24, Andre Vieira (lists) wrote: Hi, This series backports all the patches and fixes regarding outline atomics to the gcc-8 branch. Bootstrapped the series for aarch64-linux-gnu and regression tested. Is this OK for gcc-8? Andre Vieira (19): aarch64: Add early clobber

[PATCH][GCC][Arm]MVE: Fix -Wall testisms

2020-04-07 Thread Andre Vieira (lists)
Hi, This patch fixes some testisms I found when testing using -Wall/-Werror. Is this OK for trunk? gcc/testsuite/ChangeLog: 2020-04-07  Andre Vieira      * gcc.target/arm/mve/intrinsics/vuninitializedq_float.c: Likewise.     * gcc.target/arm/mve/intrinsics/vuninitializedq_float1.c:

Re: [PATCH][GCC][Arm]: MVE: Fix v[id]wdup's

2020-04-07 Thread Andre Vieira (lists)
On 07/04/2020 11:57, Christophe Lyon wrote: On Tue, 7 Apr 2020 at 12:40, Andre Vieira (lists) wrote: Hi, This patch fixes v[id]wdup intrinsics. They had two issues: 1) the predicated versions did not link the incoming inactive vector parameter to the output 2) The backend didn't enforce

[PATCH][GCC][Arm]: MVE: Add C++ polymorphism and fix some more issues

2020-04-07 Thread Andre Vieira (lists)
Hi, This patch adds C++ polymorphism for the MVE intrinsics, by using the native C++ polymorphic functions when C++ is used. It also moves the PRESERVE name macro definitions to the right place so that the variants without the '__arm_' prefix are not available if we define the PRESERVE

[PATCH][GCC][Arm]: MVE Fix immediate constraints on some vector instructions

2020-04-07 Thread Andre Vieira (lists)
Hi, This patch fixes the immediate checks on vcvt and vqshr(u)n[bt] instrucitons.  It also removes the 'arm_mve_immediate_check' as the check was wrong and the error message is not much better than the constraint one, which albeit isn't great either. Regression tested on arm-none-eabi. Is

[PATCH][GCC][Arm]: MVE: Fix vec extracts to memory

2020-04-07 Thread Andre Vieira (lists)
Hi, This patch fixes vec extracts to memory that can arise from code as seen in the testcase added. The patch fixes this by allowing mem operands in the set of mve_vec_extract patterns, which given the only '=r' constraint will lead to the scalar value being written to a register and then

[PATCH][GCC][Arm]: MVE: Fixes for pointers used in intrinsics for c++

2020-04-07 Thread Andre Vieira (lists)
Hi, This patch fixes the passing of some pointers to builtins that expect slightly different types of pointers.  In C this didn't prove an issue, but when compiling for C++ gcc complains. Regression tested on arm-none-eabi. Is this OK for trunk? 2020-04-07  Andre Vieira      *

[PATCH][GCC][Arm]: MVE: Fix constant load pattern

2020-04-07 Thread Andre Vieira (lists)
Hi, This patch fixes the constant load pattern for MVE, this was not accounting correctly for label + offset cases. Added test that ICE'd before and removed the scan assemblers for the mve_vector* tests as they were too fragile. Bootstrapped on arm-linux-gnueabihf and regression tested on

[PATCH][GCC][Arm]: MVE Don't use lsll for 32-bit shifts scalar

2020-04-07 Thread Andre Vieira (lists)
Hi, After fixing the v[id]wdups using the "moving the wrap parameter" into the top-end of a DImode operand using a shift, I noticed we were using lsll for 32-bit shifts in scalars, where we don't need to, as we can simply do a move, which is much better if we don't need to use the bottom

[PATCH][GCC][Arm]: MVE: Fix v[id]wdup's

2020-04-07 Thread Andre Vieira (lists)
Hi, This patch fixes v[id]wdup intrinsics. They had two issues: 1) the predicated versions did not link the incoming inactive vector parameter to the output 2) The backend didn't enforce the wrap limit operand be in an odd register. 1) was fixed like we did for all other predicated intrinsics

Re: [PATCH][GCC][Arm]: MVE: Fix constant load pattern

2020-04-07 Thread Andre Vieira (lists)
/2020 11:52, Kyrylo Tkachov wrote: -Original Message- From: Andre Vieira (lists) Sent: 07 April 2020 11:35 To: gcc-patches@gcc.gnu.org; Kyrylo Tkachov Subject: [PATCH][GCC][Arm]: MVE: Fix constant load pattern Hi, This patch fixes the constant load pattern for MVE

Re: [testsuite][arm] Fix cmse-15.c expected output

2020-04-07 Thread Andre Vieira (lists)
On 06/04/2020 16:12, Christophe Lyon via Gcc-patches wrote: Hi, While checking Martin's fix for PR ipa/94445, he made me realize that the cmse-15.c testcase still fails at -Os because ICF means that we generate nonsecure2: b nonsecure0 which is OK, but does not match the

Re: [PATCH][GCC][Arm]: MVE: Fix polymorphism for scalars and constants

2020-04-07 Thread Andre Vieira (lists)
Now with the zipped patch so it reaches the mailing list. Sorry for that. On 07/04/2020 09:57, Kyrylo Tkachov wrote: -Original Message- From: Andre Vieira (lists) Sent: 07 April 2020 09:57 To: Kyrylo Tkachov ; gcc-patches@gcc.gnu.org Subject: Re: [PATCH][GCC][Arm]: MVE: Fix

Re: [PATCH 3/5] testsuite: [arm/mve] Fix mve_move_gpr_to_gpr.c

2020-04-14 Thread Andre Vieira (lists)
On 10/04/2020 14:55, Christophe Lyon via Gcc-patches wrote: This test can pass with a hard-float toolchain, provided we don't force -mfloat-abi=softfp. This patch removes this useless option, as well as -save-temps which is implied by arm_v8_1m_mve_fp. Hi Christophe, LGTM, but you need to

Re: [PATCH 5/5] testsuite: [arm/mve] Include arm_mve.h in arm_v8_1m_mve_ok

2020-04-14 Thread Andre Vieira (lists)
On 10/04/2020 14:55, Christophe Lyon via Gcc-patches wrote: Since arm_mve.h includes stdint.h, its use requires the presence of the right gnu/stub-*.h, so make sure to include it when checking the arm_v8_1m_mve_ok_nocache effective target, otherwise we can decide MVE is supported while it's

Re: [PATCH 4/5] testsuite: [arm/mve] Use dg-add-options arm_v8_1m_mve in MVE tests

2020-04-14 Thread Andre Vieira (lists)
On 10/04/2020 14:55, Christophe Lyon via Gcc-patches wrote: Several ARM/MVE tests can be compiled even if the toolchain does not support -mfloat-abi=hard (softfp is OK). Use dg-add-options arm_v8_1m_mve or arm_v8_1m_mve_fp instead of using dg-additional-options. Hi Christophe, I think a bunch

Re: [PATCH 1/5] testsuite: [arm] Add arm_softfp_ok and arm_hard_ok effective targets.

2020-04-14 Thread Andre Vieira (lists)
On 10/04/2020 14:55, Christophe Lyon via Gcc-patches wrote: For arm-linux-gnueabi* targets, a toolchain cannot support the float-abi opposite to the one it has been configured for: since glibc does not support such multilibs, we end up lacking gnu/stubs-*.h when including stdint.h for instance.

Re: [PATCH 2/5] testsuite: [arm/mve] Use arm_softfp and arm_hard as needed in MVE tests

2020-04-14 Thread Andre Vieira (lists)
On 10/04/2020 14:55, Christophe Lyon via Gcc-patches wrote: Some MVE tests explicitly test a -mfloat-abi=hard option, but we need to check that the toolchain actually supports it (which may not be the case for arm-linux-gnueabi* targets). We also make use of dg-add-options arm_v8_1m_mve_fp and

[committed][GCC][Arm]: MVE: Fix unintended change to tests

2020-04-03 Thread Andre Vieira (lists)
When committing my last patch I accidentally removed -mfpu=auto from the following tests. This puts it back. 2020-04-03  Andre Vieira      * gcc.target/arm/mve/intrinsics/mve_vector_float.c: Put -mfpu=auto back.     * gcc.target/arm/mve/intrinsics/mve_vector_float1.c: Likewise.  

[PATCH][GCC][Arm]: Do not process rest of MVE header file after unsupported error

2020-04-02 Thread Andre Vieira (lists)
Hi, This patch makes sure the rest of the header file is not parsed if MVE is not supported.  The user should not be including this file if MVE is not supported, nevertheless making sure it doesn't parse the rest of the header file will save the user from a huge error output that would be

[PATCH][GCC-8][Aarch64]: Fix for PR target/9481

2020-04-28 Thread Andre Vieira (lists)
Hi, Backport of PR target/94518: Fix memmodel index in aarch64_store_exclusive_pair This fixes bootstrap with --enable-checking=yes,rtl for aarch64. OK for gcc-8? Cheers, Andre gcc/ChangeLog: 2020-04-28  Andre Vieira      PR target/94814     Backport from gcc-9.     2020-04-07  Kyrylo

[PATCH][GCC][Arm]: Fix bootstrap failure with rtl-checking

2020-04-27 Thread Andre Vieira (lists)
Hi, The code change that caused this regression was not meant to affect neon code-gen, however I missed the REG fall through.  This patch makes sure we only get the left-hand of the PLUS if it is indeed a PLUS expr. I suggest that in gcc-11 this code is cleaned up, as I do not think we even

[PATCH][wwwdocs] Add -moutline-atomics for AArch64 on gcc-9 and gcc-8

2020-04-24 Thread Andre Vieira (lists)
Add the backported functionality of -moutline-atomics for AArch64 to the gcc-9 and gcc-8 changes.html Validates. Is this OK? diff --git a/htdocs/gcc-8/changes.html b/htdocs/gcc-8/changes.html index 83dd1bc010a6e4debb76790b3fe62275bf0e0657..83e57db181294110f71a5d59960fb4d3fed7be98 100644 ---

Re: [PATCH 0/19][GCC-8] aarch64: Backport outline atomics

2020-04-22 Thread Andre Vieira (lists)
On 20/04/2020 09:42, Kyrylo Tkachov wrote: Hi Andre, -Original Message- From: Andre Vieira (lists) Sent: 16 April 2020 13:24 To: gcc-patches@gcc.gnu.org Cc: Kyrylo Tkachov ; Richard Sandiford ; s...@amazon.com Subject: [PATCH 0/19][GCC-8] aarch64: Backport outline atomics Hi

[committed][gcc-9] aarch64: Fix bootstrap with old binutils [PR93053]

2020-04-22 Thread Andre Vieira (lists)
operands where the macros are used.     * configure: Regenerated.     * config.in: Regenerated. On 22/04/2020 10:59, Kyrylo Tkachov wrote: Hi Andre, -Original Message- From: Andre Vieira (lists) Sent: 22 April 2020 09:26 To: Kyrylo Tkachov ; gcc-patches@gcc.gnu.org Cc: Richard Sandiford

[PATCH][GCC-8][Aarch64]: Backport Force TImode values into even registers

2020-04-29 Thread Andre Vieira (lists)
Hi, This is a backport from trunk/gcc-9 that I think we need now that we have backported the casp LSE instructions. Bootstrapped and regression tested on aarch64. Is this OK for gcc-8? Cheers, Andre The LSE CASP instruction requires values to be placed in even register pairs.  A solution

[PATCH, GCC, Arm]: Fix no_cond issue introduced by MVE

2020-03-19 Thread Andre Vieira (lists)
Hi, This was a matter of mistaken logic in (define_attr "conds" ..). This was setting the conds attribute for any neon instruction to no_cond which was messing up code generation. Bootsrapped and regression tested arm-linux-gnueabihf. Is this OK for trunk? 2020-03-19  Andre Vieira      *

[PATCH 2/2][GCC][Arm]: Fix testisms for MVE testsuite

2020-03-20 Thread Andre Vieira (lists)
Hi, This patch fixes some testism where -mfpu=auto was missing or where we could end up with -mfloat-abi=hard and soft on the same command-line. Tested on arm-none-eabi. Is this OK for trunk? gcc/testsuite/ChangeLog: 2020-03-20  Andre Vieira      *

[PATCH 1/2][GCC][Arm]: Fix MVE move from GPR -> GPR

2020-03-20 Thread Andre Vieira (lists)
Hi, This patch fixes the pattern mve_mov for the case where both MVE vectors are in R registers and the move does not get optimized away.  I use the same approach as we do for NEON, where we use four register moves. Bootstrapped on arm-linux-gnueabihf and ran mve testsuite on arm-none-eabi.

[PATCH 0/2][GCC][Arm]: MVE fixes for codegen and testsuite

2020-03-20 Thread Andre Vieira (lists)
Hi, I noticed some issues with the patches that landed on trunk and this patch series fixes them.  The first issue was revealed after I fixed the testisms (in patch 2/2). Andre Vieira (2): Fix MVE move from GPR -> GPR Fix testisms for MVE testsuite

[PATCH][GCC][Arm]: Revert changes to {get, set}_fpscr

2020-03-20 Thread Andre Vieira (lists)
Hi, MVE made changes to {get,set}_fpscr to enable the compiler to optimize unneccesary gets and sets when using these for intrinsics that use and/or write the carry bit.  However, these actually get and set the full FPSCR register and are used by fp env intrinsics to modify the fp context.  So

[PATCH 1/2] arm: Add earlyclobber to MVE instructions that require it

2020-03-23 Thread Andre Vieira (lists)
Hi, This patch adds an earlyclobber to the MVE instructions that require it and were missing it. These are vrev64 and 32-bit element variants of vcadd, vhcadd vcmul, vmull[bt] and vqdmull[bt]. Regression tested on arm-none-eabi. Is this OK for trunk? Cheers, Andre 2020-03-23  Andre

[PATCH 0/2] arm: Enable assembling when testing MVE

2020-03-23 Thread Andre Vieira (lists)
Hi, This patch series changes all MVE tests into assembly tests so we check whether the generated assembly is syntactically correct. The first patch of the series fixes an issue this caught where the instructions don't allow destination and source registers to be the same. Andre Vieira (2):

[AArch64][GCC-8][GCC-9] Use __getauxval instead of getauxval in LSE detection code in libgcc

2020-05-28 Thread Andre Vieira (lists)
The patch applies cleanly on gcc-9 and gcc-8. I bootstrapped this on aarch64-none-linux-gnu and tested aarch64-none-elf for both. Is this OK for those backports? libgcc/ChangeLog: 2020-05-28  Andre Vieira      Backport from mainline.     2020-05-06  Kyrylo Tkachov      *

Re: [PATCH][GCC][Arm] PR target/95646: Do not clobber callee saved registers with CMSE

2020-06-30 Thread Andre Vieira (lists)
On 29/06/2020 11:15, Christophe Lyon wrote: On Mon, 29 Jun 2020 at 10:56, Andre Vieira (lists) wrote: On 23/06/2020 21:52, Christophe Lyon wrote: On Tue, 23 Jun 2020 at 15:28, Andre Vieira (lists) wrote: On 23/06/2020 13:10, Kyrylo Tkachov wrote: -Original Message- From: Andre

Re: [PATCH][GCC][Arm] PR target/95646: Do not clobber callee saved registers with CMSE

2020-07-06 Thread Andre Vieira (lists)
On 30/06/2020 14:50, Andre Vieira (lists) wrote: On 29/06/2020 11:15, Christophe Lyon wrote: On Mon, 29 Jun 2020 at 10:56, Andre Vieira (lists) wrote: On 23/06/2020 21:52, Christophe Lyon wrote: On Tue, 23 Jun 2020 at 15:28, Andre Vieira (lists) wrote: On 23/06/2020 13:10, Kyrylo

Re: [PATCH][GCC][Arm] PR target/95646: Do not clobber callee saved registers with CMSE

2020-06-23 Thread Andre Vieira (lists)
On 23/06/2020 13:10, Kyrylo Tkachov wrote: -Original Message- From: Andre Vieira (lists) Sent: 22 June 2020 09:52 To: gcc-patches@gcc.gnu.org Cc: Kyrylo Tkachov Subject: [PATCH][GCC][Arm] PR target/95646: Do not clobber callee saved registers with CMSE Hi, As reported in bugzilla

Re: [PATCH][GCC][Arm] PR target/95646: Do not clobber callee saved registers with CMSE

2020-06-29 Thread Andre Vieira (lists)
On 23/06/2020 21:52, Christophe Lyon wrote: On Tue, 23 Jun 2020 at 15:28, Andre Vieira (lists) wrote: On 23/06/2020 13:10, Kyrylo Tkachov wrote: -Original Message- From: Andre Vieira (lists) Sent: 22 June 2020 09:52 To: gcc-patches@gcc.gnu.org Cc: Kyrylo Tkachov Subject: [PATCH

Re: [PATCH][GCC][Arm] PR target/95646: Do not clobber callee saved registers with CMSE

2020-06-29 Thread Andre Vieira (lists)
On 23/06/2020 21:52, Christophe Lyon wrote: On Tue, 23 Jun 2020 at 15:28, Andre Vieira (lists) wrote: On 23/06/2020 13:10, Kyrylo Tkachov wrote: -Original Message- From: Andre Vieira (lists) Sent: 22 June 2020 09:52 To: gcc-patches@gcc.gnu.org Cc: Kyrylo Tkachov Subject: [PATCH

[PATCH][GCC][Arm] PR target/95646: Do not clobber callee saved registers with CMSE

2020-06-22 Thread Andre Vieira (lists)
Hi, As reported in bugzilla when the -mcmse option is used while compiling for size (-Os) with a thumb-1 target the generated code will clear the registers r7-r10. These however are callee saved and should be preserved accross ABI boundaries. The reason this happens is because these

[RFC][vect] BB SLP reduction prototype

2020-06-09 Thread Andre Vieira (lists)
Hi, So this is my rework of the code you sent me, I have not included the 'permute' code you included as I can't figure out what it is meant to be doing. Maybe something to look at later. I have also included three tests that show it working for some simple cases and even a nested one.

Re: [RFC][vect] BB SLP reduction prototype

2020-06-09 Thread Andre Vieira (lists)
The 'you' here is Richi, which Richi is probably aware but maybe not the rest of the list :') On 09/06/2020 15:29, Andre Vieira (lists) wrote: Hi, So this is my rework of the code you sent me, I have not included the 'permute' code you included as I can't figure out what it is meant

Re: [PATCH][GCC][Arm] PR target/95646: Do not clobber callee saved registers with CMSE

2020-07-20 Thread Andre Vieira (lists)
On 08/07/2020 09:04, Andre Simoes Dias Vieira wrote: On 07/07/2020 13:43, Christophe Lyon wrote: Hi, On Mon, 6 Jul 2020 at 16:31, Andre Vieira (lists) wrote: On 30/06/2020 14:50, Andre Vieira (lists) wrote: On 29/06/2020 11:15, Christophe Lyon wrote: On Mon, 29 Jun 2020 at 10:56

Re: [PATCH] aarch64: enable mixed-types for aarch64 simdclones

2023-10-16 Thread Andre Vieira (lists)
Hey, Just a minor update to the patch, I had missed the libgomp testsuite, so had to make some adjustments there too. gcc/ChangeLog: * config/aarch64/aarch64.cc (lane_size): New function. (aarch64_simd_clone_compute_vecsize_and_simdlen): Determine simdlen according to NDS

Re: Check that passes do not forget to define profile

2023-10-17 Thread Andre Vieira (lists)
So OK to commit this? This patch makes sure the profile_count information is initialized for the new bb created in move_sese_region_to_fn. gcc/ChangeLog: * tree-cfg.cc (move_sese_region_to_fn): Initialize profile_count for new basic block. Bootstrapped and regression tested

[PATCH] vect: allow using inbranch simdclones for masked loops

2023-11-02 Thread Andre Vieira (lists)
Hi, In a previous patch I did most of the work for this, but forgot to change the check for number of arguments matching between call and simdclone. This check should accept calls without a mask to be matched against simdclones with mask arguments. I also added tests to verify this feature

Re: [PATCH] vect: allow using inbranch simdclones for masked loops

2023-11-03 Thread Andre Vieira (lists)
On 03/11/2023 07:31, Richard Biener wrote: OK. I do wonder about the gfortran testsuite adjustments though. !GCC$ builtin (sin) attributes simd (inbranch) ! this should not be using simd clone y4 = sin(x8) previously we wouldn't vectorize this as no notinbranch simd function is

[RFC] vect: disable multiple calls of poly simdclones

2023-11-03 Thread Andre Vieira (lists)
Hi, The current codegen code to support VF's that are multiples of a simdclone simdlen rely on BIT_FIELD_REF to create multiple input vectors. This does not work for non-constant simdclones, so we should disable using such clones when the VF is a multiple of the non-constant simdlen until we

Re: [PATCH6/8] omp: Reorder call for TARGET_SIMD_CLONE_ADJUST (was Re: [PATCH7/8] vect: Add TARGET_SIMD_CLONE_ADJUST_RET_OR_PARAM)

2023-10-30 Thread Andre Vieira (lists)
the array for the return value. Kind regards, Andre On 18/10/2023 15:41, Andre Vieira (lists) wrote: This patch moves the call to TARGET_SIMD_CLONE_ADJUST until after the arguments and return types have been transformed into vector types.  It also constructs the adjuments and retval

Re: [PING][PATCH 2/2] arm: Add support for MVE Tail-Predicated Low Overhead Loops

2023-09-28 Thread Andre Vieira (lists)
Hi, On 14/09/2023 13:10, Kyrylo Tkachov via Gcc-patches wrote: Hi Stam, The arm parts look sensible but we'd need review for the df-core.h and df-core.cc changes. Maybe Jeff can help or can recommend someone to take a look? Thanks, Kyrill FWIW the changes LGTM, if we don't want these

Re: [PATCH 6/8] vect: Add vector_mode paramater to simd_clone_usable

2023-09-28 Thread Andre Vieira (lists)
On 31/08/2023 07:39, Richard Biener wrote: On Wed, Aug 30, 2023 at 5:02 PM Andre Vieira (lists) wrote: On 30/08/2023 14:01, Richard Biener wrote: On Wed, Aug 30, 2023 at 11:15 AM Andre Vieira (lists) via Gcc-patches wrote: This patch adds a machine_mode parameter

Re: [PATCH] vect, omp: inbranch simdclone dropping const

2023-09-26 Thread Andre Vieira (lists)
On 26/09/2023 17:48, Jakub Jelinek wrote: On Tue, Sep 26, 2023 at 05:24:26PM +0100, Andre Vieira (lists) wrote: @@ -5816,6 +5817,18 @@ get_references_in_stmt (gimple *stmt, vec *references) } case IFN_MASK_LOAD: case IFN_MASK_STORE: + case

Re: [PATCH] vect, omp: inbranch simdclone dropping const

2023-09-27 Thread Andre Vieira (lists)
On 26/09/2023 17:37, Andrew Stubbs wrote: I don't have authority to approve anything, but here's a review anyway. Thanks for working on this. Thank you for reviewing and apologies for the mess of a patch, may have rushed it ;) diff --git a/gcc/testsuite/gcc.dg/vect/vect-simd-clone-19.c

Re: [PATCH] vect, omp: inbranch simdclone dropping const

2023-09-26 Thread Andre Vieira (lists)
On 26/09/2023 21:26, Bernhard Reutner-Fischer wrote: On 26 September 2023 18:46:11 CEST, Tobias Burnus wrote: On 26.09.23 18:37, Andrew Stubbs wrote: If the fall-through is deliberate please add a /* FALLTHROUGH */ comment (or whatever spelling disables the warning). It's:

Re: Check that passes do not forget to define profile

2023-10-03 Thread Andre Vieira (lists)
Hi Honza, My current patch set for AArch64 VLA omp codegen started failing on gcc.dg/gomp/pr87898.c after this. I traced it back to 'move_sese_region_to_fn' in tree/cfg.cc not setting count for the bb created. I was able to 'fix' it locally by setting the count of the new bb to the

Re: [PATCH7/8] vect: Add TARGET_SIMD_CLONE_ADJUST_RET_OR_PARAM

2023-10-04 Thread Andre Vieira (lists)
On 30/08/2023 14:04, Richard Biener wrote: On Wed, 30 Aug 2023, Andre Vieira (lists) wrote: This patch adds a new target hook to enable us to adapt the types of return and parameters of simd clones. We use this in two ways, the first one is to make sure we can create valid SVE types

Re: [PATCH7/8] vect: Add TARGET_SIMD_CLONE_ADJUST_RET_OR_PARAM

2023-10-04 Thread Andre Vieira (lists)
On 04/10/2023 11:41, Richard Biener wrote: On Wed, 4 Oct 2023, Andre Vieira (lists) wrote: On 30/08/2023 14:04, Richard Biener wrote: On Wed, 30 Aug 2023, Andre Vieira (lists) wrote: This patch adds a new target hook to enable us to adapt the types of return and parameters of simd

[PATCH] vect, omp: inbranch simdclone dropping const

2023-09-26 Thread Andre Vieira (lists)
The const attribute is ignored when simdclone's are used inbranch. This is due to the fact that when analyzing a MASK_CALL we were not looking at the targeted function for flags, but instead only at the internal function call itself. This patch adds code to make sure we look at the target

Re: aarch64, vect, omp: Add SVE support for simd clones [PR 96342]

2023-10-18 Thread Andre Vieira (lists)
confusing with removing and adding patches to the series. On 30/08/2023 09:49, Andre Vieira (lists) via Gcc-patches wrote: Hi, This patch series aims to implement support for SVE simd clones when not specifying a 'simdlen' clause for AArch64. This patch depends on my earlier patch: '[PATCH] aarch64

Re: [PATCH 1/8] parloops: Copy target and optimizations when creating a function clone

2023-10-18 Thread Andre Vieira (lists)
Just posting a rebase for completion. On 30/08/2023 13:31, Richard Biener wrote: On Wed, 30 Aug 2023, Andre Vieira (lists) wrote: SVE simd clones require to be compiled with a SVE target enabled or the argument types will not be created properly. To achieve this we need to copy

Re: [Patch 2/8] parloops: Allow poly nit and bound

2023-10-18 Thread Andre Vieira (lists)
Posting the changed patch for completion, already reviewed. On 30/08/2023 13:32, Richard Biener wrote: On Wed, 30 Aug 2023, Andre Vieira (lists) wrote: Teach parloops how to handle a poly nit and bound e ahead of the changes to enable non-constant simdlen. Can you use poly_int_tree_p

Re: [PATCH 8/8] aarch64: Add SVE support for simd clones [PR 96342]

2023-10-18 Thread Andre Vieira (lists)
Rebased, no major changes, still needs review. On 30/08/2023 10:19, Andre Vieira (lists) via Gcc-patches wrote: This patch finalizes adding support for the generation of SVE simd clones when no simdlen is provided, following the ABI rules where the widest data type determines the minimum

[PATCH6/8] omp: Reorder call for TARGET_SIMD_CLONE_ADJUST (was Re: [PATCH7/8] vect: Add TARGET_SIMD_CLONE_ADJUST_RET_OR_PARAM)

2023-10-18 Thread Andre Vieira (lists)
and argument types have been vectorized. On 04/10/2023 13:40, Andre Vieira (lists) wrote: On 04/10/2023 11:41, Richard Biener wrote: On Wed, 4 Oct 2023, Andre Vieira (lists) wrote: On 30/08/2023 14:04, Richard Biener wrote: On Wed, 30 Aug 2023, Andre Vieira (lists) wrote

Re: [PATCH 5/8] vect: Use inbranch simdclones in masked loops

2023-10-18 Thread Andre Vieira (lists)
Rebased, needs review. On 30/08/2023 10:13, Andre Vieira (lists) via Gcc-patches wrote: This patch enables the compiler to use inbranch simdclones when generating masked loops in autovectorization. gcc/ChangeLog: * omp-simd-clone.cc (simd_clone_adjust_argument_types): Make function

Re: [Patch 3/8] vect: Fix vect_get_smallest_scalar_type for simd clones

2023-10-18 Thread Andre Vieira (lists)
helper function. On 30/08/2023 13:54, Richard Biener wrote: On Wed, 30 Aug 2023, Andre Vieira (lists) wrote: The vect_get_smallest_scalar_type helper function was using any argument to a simd clone call when trying to determine the smallest scalar type that would be vectorized. This included

[PATCH 0/8] omp: Replace simd_clone_subparts with TYPE_VECTOR_SUBPARTS

2023-10-18 Thread Andre Vieira (lists)
Refactor simd clone handling code ahead of support for poly simdlen. gcc/ChangeLog: * omp-simd-clone.cc (simd_clone_subparts): Remove. (simd_clone_init_simd_arrays): Replace simd_clone_supbarts with TYPE_VECTOR_SUBPARTS. (ipa_simd_modify_function_body):

Re: [PATCH 4/8] vect: don't allow fully masked loops with non-masked simd clones [PR 110485]

2023-10-18 Thread Andre Vieira (lists)
Rebased on top of trunk, minor change to check if loop_vinfo since we now do some slp vectorization for simd_clones. I assume the previous OK still holds. On 30/08/2023 13:54, Richard Biener wrote: On Wed, 30 Aug 2023, Andre Vieira (lists) wrote: When analyzing a loop and choosing

[PATCH] ifcvt: Don't lower bitfields with non-constant offsets [PR 111882]

2023-10-20 Thread Andre Vieira (lists)
Hi, This patch stops lowering of bitfields by ifcvt when they have non-constant offsets as we are not likely to be able to do anything useful with those during vectorization. That also fixes the issue reported in PR 111882, which was being caused by an offset with a side-effect being lowered,

Re: [PATCH] ifcvt: Don't lower bitfields with non-constant offsets [PR 111882]

2023-10-20 Thread Andre Vieira (lists)
On 20/10/2023 14:41, Richard Biener wrote: On Fri, 20 Oct 2023, Andre Vieira (lists) wrote: Hi, This patch stops lowering of bitfields by ifcvt when they have non-constant offsets as we are not likely to be able to do anything useful with those during vectorization. That also fixes

Re: [PING][PATCH 2/2] arm: Add support for MVE Tail-Predicated Low Overhead Loops

2023-10-23 Thread Andre Vieira (lists)
py for you to change this once approved by a maintainer. Kind regards, Andre On 11/10/2023 12:34, Stamatis Markianos-Wright wrote: Hi all, On 28/09/2023 13:51, Andre Vieira (lists) wrote: Hi, On 14/09/2023 13:10, Kyrylo Tkachov via Gcc-patches wrote: Hi Stam, The arm parts look sensible bu

Re: veclower: improve selection of vector mode when lowering [PR 112787]

2024-02-19 Thread Andre Vieira (lists)
Regards, Andre On 20/12/2023 14:30, Richard Biener wrote: On Wed, 20 Dec 2023, Andre Vieira (lists) wrote: Thanks, fully agree with all comments. gcc/ChangeLog: PR target/112787 * tree-vect-generic (type_for_widest_vector_mode): Change function to use original vector

[comitted] bitint: Fix testism where __seg_gs was being used for all targets

2024-02-19 Thread Andre Vieira (lists)
Replaced uses of __seg_gs with the MACRO SEG defined in the testcase to pick (if any) the right __seg_{gs,fs} keyword based on target. gcc/testsuite/ChangeLog: * gcc.dg/bitint-86.c (__seg_gs): Replace with SEG MACRO.diff --git a/gcc/testsuite/gcc.dg/bitint-86.c

Re: [comitted] bitint: Fix testism where __seg_gs was being used for all targets

2024-02-19 Thread Andre Vieira (lists)
On 19/02/2024 16:17, Jakub Jelinek wrote: On Mon, Feb 19, 2024 at 04:13:29PM +, Andre Vieira (lists) wrote: Replaced uses of __seg_gs with the MACRO SEG defined in the testcase to pick (if any) the right __seg_{gs,fs} keyword based on target. gcc/testsuite/ChangeLog: * gcc.dg

[PATCH] Fix tests for gomp

2023-12-13 Thread Andre Vieira (lists)
Hi, Apologies for the delay and this mixup. I need to do something different This is to fix testisms initially introduced by: commit f5fc001a84a7dbb942a6252b3162dd38b4aae311 Author: Andre Vieira Date: Mon Dec 11 14:24:41 2023 + aarch64: enable mixed-types for aarch64 simdclones

Re: [PATCH] Fix tests for gomp

2023-12-13 Thread Andre Vieira (lists)
On 13/12/2023 10:55, Jakub Jelinek wrote: On Wed, Dec 13, 2023 at 10:43:16AM +, Andre Vieira (lists) wrote: Hi, Apologies for the delay and this mixup. I need to do something different This is to fix testisms initially introduced by: commit f5fc001a84a7dbb942a6252b3162dd38b4aae311

Re: veclower: improve selection of vector mode when lowering [PR 112787]

2023-12-20 Thread Andre Vieira (lists)
): Pass original vector type rather than the element type to type_for_widest_vector_mode and remove now obsolete check for the number of elements. On 07/12/2023 07:45, Richard Biener wrote: On Wed, 6 Dec 2023, Andre Vieira (lists) wrote: Hi, This patch addresses the issue

omp: Fix simdclone arguments with veclen lower than simdlen [PR113040]

2023-12-20 Thread Andre Vieira (lists)
This patch fixes an issue introduced by: commit ea4a3d08f11a59319df7b750a955ac613a3f438a Author: Andre Vieira Date: Wed Nov 1 17:02:41 2023 + omp: Reorder call for TARGET_SIMD_CLONE_ADJUST The problem was that after this patch we no longer added multiple arguments for vector

Re: [PATCH 2/2] arm: Add support for MVE Tail-Predicated Low Overhead Loops

2023-12-20 Thread Andre Vieira (lists)
Squashed the definition and changes to predicated_doloop_end_internal and dlstp*_insn into this patch to make sure the first patch builds independently On 18/12/2023 11:53, Andre Vieira wrote: Reworked Stam's patch after comments in:

Re: [PATCH 1/2] arm: Add define_attr to to create a mapping between MVE predicated and unpredicated insns

2023-12-20 Thread Andre Vieira (lists)
Reworked patch after Richard's comments and moved predicated_doloop_end_internal and dlstp*_insn to the next patch in the series to make sure this one builds on its own. On 18/12/2023 11:53, Andre Vieira wrote: Re-sending Stam's first patch, same as:

Re: [PATCH] aarch64: enable mixed-types for aarch64 simdclones

2023-12-12 Thread Andre Vieira (lists)
On 11/12/2023 21:42, Thomas Schwinge wrote: Hi Andre! On 2023-10-16T16:03:26+0100, "Andre Vieira (lists)" wrote: Just a minor update to the patch, I had missed the libgomp testsuite, so had to make some adjustments there too. Unfortunately, there appear to be a number

[RFC] aarch64: Add support for __BitInt

2024-01-10 Thread Andre Vieira (lists)
Hi, This patch is still work in progress, but posting to show failure with bitint-7 test where handle_stmt called from lower_mergeable_stmt ICE's because the idx (3) is out of range for the __BitInt(135) with a limb_prec of 64. I hacked gcc locally to work around this issue and still have

Re: [PATCH 8/8] aarch64: Add SVE support for simd clones [PR 96342]

2023-12-01 Thread Andre Vieira (lists)
On 29/11/2023 17:01, Richard Sandiford wrote: "Andre Vieira (lists)" writes: Rebased, no major changes, still needs review. On 30/08/2023 10:19, Andre Vieira (lists) via Gcc-patches wrote: This patch finalizes adding support for the generation of SVE simd clones when

Re: [PING][PATCH 2/2] arm: Add support for MVE Tail-Predicated Low Overhead Loops

2023-12-07 Thread Andre Vieira (lists)
for the comments, see latest revision attached. On 27/11/2023 12:47, Andre Vieira (lists) wrote: Hi Stam, Just some comments. +/* Recursively scan through the DF chain backwards within the basic block and +   determine if any of the USEs of the original insn (or the USEs of the insns s/Recursively scan

Re: [PING][PATCH 2/2] arm: Add support for MVE Tail-Predicated Low Overhead Loops

2023-11-27 Thread Andre Vieira (lists)
Hi Stam, Just some comments. +/* Recursively scan through the DF chain backwards within the basic block and + determine if any of the USEs of the original insn (or the USEs of the insns s/Recursively scan/Scan/ as you no longer recurse, thanks for that by the way :) + where thy were

Re: [RFC] vect: disable multiple calls of poly simdclones

2023-11-27 Thread Andre Vieira (lists)
On 06/11/2023 07:52, Richard Biener wrote: On Fri, 3 Nov 2023, Andre Vieira (lists) wrote: Hi, The current codegen code to support VF's that are multiples of a simdclone simdlen rely on BIT_FIELD_REF to create multiple input vectors. This does not work for non-constant simdclones, so we

veclower: improve selection of vector mode when lowering [PR 112787]

2023-12-06 Thread Andre Vieira (lists)
Hi, This patch addresses the issue reported in PR target/112787 by improving the compute type selection. We do this by not considering types with more elements than the type we are lowering since we'd reject such types anyway. gcc/ChangeLog: PR target/112787 *

Re: [PATCH 1/3] vect: Pass stmt_vec_info to TARGET_SIMD_CLONE_USABLE

2024-01-31 Thread Andre Vieira (lists)
On 31/01/2024 14:35, Richard Biener wrote: On Wed, 31 Jan 2024, Andre Vieira (lists) wrote: On 31/01/2024 13:58, Richard Biener wrote: On Wed, 31 Jan 2024, Andre Vieira (lists) wrote: On 31/01/2024 12:13, Richard Biener wrote: On Wed, 31 Jan 2024, Richard Biener wrote: On Tue, 30

Re: [PATCH 1/3] vect: Pass stmt_vec_info to TARGET_SIMD_CLONE_USABLE

2024-02-01 Thread Andre Vieira (lists)
On 01/02/2024 07:19, Richard Biener wrote: On Wed, 31 Jan 2024, Andre Vieira (lists) wrote: The patch didn't come with a testcase so it's really hard to tell what goes wrong now and how it is fixed ... My bad! I had a testcase locally but never added it... However... now I look

Re: [PATCH 1/3] vect: Pass stmt_vec_info to TARGET_SIMD_CLONE_USABLE

2024-01-31 Thread Andre Vieira (lists)
On 31/01/2024 12:13, Richard Biener wrote: On Wed, 31 Jan 2024, Richard Biener wrote: On Tue, 30 Jan 2024, Andre Vieira wrote: This patch adds stmt_vec_info to TARGET_SIMD_CLONE_USABLE to make sure the target can reject a simd_clone based on the vector mode it is using. This is needed

Re: [PATCH 1/3] vect: Pass stmt_vec_info to TARGET_SIMD_CLONE_USABLE

2024-01-31 Thread Andre Vieira (lists)
On 31/01/2024 13:58, Richard Biener wrote: On Wed, 31 Jan 2024, Andre Vieira (lists) wrote: On 31/01/2024 12:13, Richard Biener wrote: On Wed, 31 Jan 2024, Richard Biener wrote: On Tue, 30 Jan 2024, Andre Vieira wrote: This patch adds stmt_vec_info to TARGET_SIMD_CLONE_USABLE

Re: [PATCH 1/3] vect: Pass stmt_vec_info to TARGET_SIMD_CLONE_USABLE

2024-01-31 Thread Andre Vieira (lists)
On 31/01/2024 14:03, Richard Biener wrote: On Wed, 31 Jan 2024, Richard Biener wrote: On Wed, 31 Jan 2024, Andre Vieira (lists) wrote: On 31/01/2024 12:13, Richard Biener wrote: On Wed, 31 Jan 2024, Richard Biener wrote: On Tue, 30 Jan 2024, Andre Vieira wrote: This patch adds

Re: [PATCH 1/3] vect: Pass stmt_vec_info to TARGET_SIMD_CLONE_USABLE

2024-02-26 Thread Andre Vieira (lists)
On 05/02/2024 09:56, Richard Biener wrote: On Thu, 1 Feb 2024, Andre Vieira (lists) wrote: On 01/02/2024 07:19, Richard Biener wrote: On Wed, 31 Jan 2024, Andre Vieira (lists) wrote: The patch didn't come with a testcase so it's really hard to tell what goes wrong now and how

Re: [PATCH 2/2] aarch64: Add support for _BitInt

2024-02-27 Thread Andre Vieira (lists)
Hey, Dropped the first patch and dealt with the comments above, hopefully I didn't miss any this time. -- This patch adds support for C23's _BitInt for the AArch64 port when compiling for little endianness. Big Endianness requires further target-agnostic

<    1   2   3   4   5   6   7   >