Re: [ping][vect-patterns] Refactor widen_plus/widen_minus as internal_fns

2023-04-25 Thread Andre Vieira (lists) via Gcc-patches
On 24/04/2023 12:57, Richard Biener wrote: On Thu, Apr 20, 2023 at 3:24 PM Andre Vieira (lists) via Gcc-patches wrote: Rebased all three patches and made some small changes to the second one: - removed sub and abd optabs from commutative_optab_p, I suspect this was a copy paste mistake

Re: [r13-7135 Regression] FAIL: gcc.dg/vect/vect-simd-clone-18f.c scan-tree-dump-times vect "[\\n\\r] [^\\n]* = foo\\.simdclone" 2 on Linux/x86_64

2023-04-14 Thread Andre Vieira (lists) via Gcc-patches
On 14/04/2023 10:09, Richard Biener wrote: On Fri, Apr 14, 2023 at 10:43 AM Andre Vieira (lists) wrote: Resending this to everyone (sorry for the double send Richard). On 14/04/2023 09:15, Andre Vieira (lists) wrote: > > > On 14/04/2023 07:55, Richard Biener wrote: >&

Re: [PATCH] aarch64: Add -mveclibabi=sleefgnu

2023-04-14 Thread Andre Vieira (lists) via Gcc-patches
I have (outdated) RFC's here: https://gcc.gnu.org/pipermail/gcc-patches/2023-March/613593.html I am working on this patch series for stage 1. The list of features I am working on are: * SVE support for #pragma omp declare simd * Support for simdclone usage in autovec from #pragma omp declare

Re: [PATCH] Fix vect-simd-clone testcase dump scanning

2023-04-14 Thread Andre Vieira (lists) via Gcc-patches
On the other thread I commented that inbranch simdclones are failing for AVX512F because it sets the mask_mode, for which inbranch hasn't been implemented, and so it is rejected. On 14/04/2023 11:25, Jakub Jelinek via Gcc-patches wrote: On Fri, Apr 14, 2023 at 10:15:06AM +, Richard Biener

Re: [ping][vect-patterns] Refactor widen_plus/widen_minus as internal_fns

2023-04-28 Thread Andre Vieira (lists) via Gcc-patches
On 25/04/2023 13:30, Richard Biener wrote: On Mon, 24 Apr 2023, Richard Sandiford wrote: Richard Biener writes: On Thu, Apr 20, 2023 at 3:24?PM Andre Vieira (lists) via Gcc-patches wrote: Rebased all three patches and made some small changes to the second one: - removed sub and abd

Re: [r13-7135 Regression] FAIL: gcc.dg/vect/vect-simd-clone-18f.c scan-tree-dump-times vect "[\\n\\r] [^\\n]* = foo\\.simdclone" 2 on Linux/x86_64

2023-04-14 Thread Andre Vieira (lists) via Gcc-patches
Resending this to everyone (sorry for the double send Richard). On 14/04/2023 09:15, Andre Vieira (lists) wrote: > > > On 14/04/2023 07:55, Richard Biener wrote: >> On Thu, Apr 13, 2023 at 4:25 PM Andre Vieira (lists) >> wrote: >>> >>> >>&g

Re: [PATCH] Fix vect-simd-clone testcase dump scanning

2023-04-14 Thread Andre Vieira (lists) via Gcc-patches
SGTM On 14/04/2023 12:00, Jakub Jelinek wrote: On Fri, Apr 14, 2023 at 11:59:02AM +0100, Andre Vieira (lists) wrote: On the other thread I commented that inbranch simdclones are failing for AVX512F because it sets the mask_mode, for which inbranch hasn't been implemented, and so it is rejected

Re: [r13-7135 Regression] FAIL: gcc.dg/vect/vect-simd-clone-18f.c scan-tree-dump-times vect "[\\n\\r] [^\\n]* = foo\\.simdclone" 2 on Linux/x86_64

2023-04-14 Thread Andre Vieira (lists) via Gcc-patches
On 14/04/2023 12:47, Richard Biener wrote: On Fri, Apr 14, 2023 at 11:42 AM Andre Vieira (lists) wrote: Ah, but then vect_get_smallest_scalar_type should simply ignore that pointer in MASK_CALL. It should only look at the arguments relevant for vectorization. So diff --git a/gcc/tree

Re: [PATCH] aarch64: Add -mveclibabi=sleefgnu

2023-04-14 Thread Andre Vieira (lists) via Gcc-patches
! Kind regards, Lou -Original Message- From: Andre Vieira (lists) Sent: Friday, April 14, 2023 12:30 To: Lou Knauer ; Andrew Pinski Cc: gcc-patches@gcc.gnu.org; Etienne Renault Subject: Re: [PATCH] aarch64: Add -mveclibabi=sleefgnu I have (outdated) RFC's here: https://gcc.gnu.org/pipermail

Re: [RFC 0/X] Implement GCC support for AArch64 libmvec

2023-04-21 Thread Andre Vieira (lists) via Gcc-patches
On 20/04/2023 17:13, Richard Sandiford wrote: "Andre Vieira (lists)" writes: On 20/04/2023 15:51, Richard Sandiford wrote: "Andre Vieira (lists)" writes: Hi all, This is a series of patches/RFCs to implement support in GCC to be able to target AArch64

Re: [PATCH] tree-optimization/108888 - call if-conversion

2023-04-05 Thread Andre Vieira (lists) via Gcc-patches
Hi, The original patch to fix this PR broke the if-conversion of calls into IFN_MASK_CALL. This patch restores that original behaviour and makes sure the tests added earlier specifically test inbranch SIMD clones. Bootstrapped and regression tested on aarch64-none-linux-gnu and

Re: [r13-7135 Regression] FAIL: gcc.dg/vect/vect-simd-clone-18f.c scan-tree-dump-times vect "[\\n\\r] [^\\n]* = foo\\.simdclone" 2 on Linux/x86_64

2023-04-13 Thread Andre Vieira (lists) via Gcc-patches
On 13/04/2023 11:01, Andrew Stubbs wrote: Hi Andre, I don't have a cascadelake device to test on, nor any knowledge about what makes it different from regular x86_64. Not sure you need one, but yeah I don't know either, it looks like it fails because: in-branch vector clones are not yet

Re: [r13-7135 Regression] FAIL: gcc.dg/vect/vect-simd-clone-18f.c scan-tree-dump-times vect "[\\n\\r] [^\\n]* = foo\\.simdclone" 2 on Linux/x86_64

2023-04-13 Thread Andre Vieira (lists) via Gcc-patches
On 13/04/2023 15:00, Richard Biener wrote: On Thu, Apr 13, 2023 at 3:00 PM Andre Vieira (lists) via Gcc-patches wrote: On 13/04/2023 11:01, Andrew Stubbs wrote: Hi Andre, I don't have a cascadelake device to test on, nor any knowledge about what makes it different from regular x86_64

[PATCH 3/3] Remove widen_plus/minus_expr tree codes

2023-04-28 Thread Andre Vieira (lists) via Gcc-patches
This is a rebase of Joel's previous patch. This patch removes the old widen plus/minus tree codes which have been replaced by internal functions. gcc/ChangeLog: 2023-04-28 Andre Vieira Joel Hutton * doc/generic.texi: Remove old tree codes. * expr.cc

[PATCH 2/3] Refactor widen_plus as internal_fn

2023-04-28 Thread Andre Vieira (lists) via Gcc-patches
This patch replaces the existing tree_code widen_plus and widen_minus patterns with internal_fn versions. DEF_INTERNAL_OPTAB_HILO_FN is like DEF_INTERNAL_OPTAB_FN except it provides convenience wrappers for defining conversions that require a hi/lo split, like widening and narrowing

[PATCH 1/3] Refactor to allow internal_fn's

2023-04-28 Thread Andre Vieira (lists) via Gcc-patches
Hi, I'm posting the patches separately now with ChangeLogs. I made the suggested changes and tried to simplify the code a bit further. Where internal to tree-vect-stmts I changed most functions to use code_helper to avoid having to check at places we didn't need to. I was trying to simplify

[PATCH] vect: Treat vector widening IFN calls as 'simple' [PR110436]

2023-07-03 Thread Andre Vieira (lists) via Gcc-patches
Hi, This patch makes the vectorizer treat any vector widening IFN as simple, like it did with the tree codes VEC_WIDEN_*. I wasn't sure whether I should make all IFN's simple and then exclude some (like GOMP_ ones), or include more than just the new widening IFNs. But since this is the only

[PATCH] Include insn-opinit.h in PLUGIN_H [PR110610]

2023-07-11 Thread Andre Vieira (lists) via Gcc-patches
Hi, This patch fixes PR110610 by including OPTABS_H in the INTERNAL_FN_H list, as insn-opinit.h is now required by internal-fn.h. This will lead to insn-opinit.h, among the other OPTABS_H header files, being installed in the plugin directory. Bootstrapped aarch64-unknown-linux-gnu. @Jakub:

Re: [PATCH] Include insn-opinit.h in PLUGIN_H [PR110610]

2023-07-17 Thread Andre Vieira (lists) via Gcc-patches
On 11/07/2023 23:28, Jeff Law wrote: On 7/11/23 04:37, Andre Vieira (lists) via Gcc-patches wrote: Hi, This patch fixes PR110610 by including OPTABS_H in the INTERNAL_FN_H list, as insn-opinit.h is now required by internal-fn.h. This will lead to insn-opinit.h, among the other OPTABS_H

Re: [PATCH 2/3] Refactor widen_plus as internal_fn

2023-06-01 Thread Andre Vieira (lists) via Gcc-patches
LUS is being used. * gcc.target/aarch64/vect-widen-sub.c: Test that new IFN_VEC_WIDEN_MINUS is being used. On 22/05/2023 14:06, Richard Biener wrote: On Thu, 18 May 2023, Andre Vieira (lists) wrote: How about this? Not sure about the DEF_INTERNAL documentation I rewrote in int

[PATCH] gimple-range: implement widen plus range

2023-06-01 Thread Andre Vieira (lists) via Gcc-patches
Hi, This patch adds gimple-range information for the new IFN_VEC_WIDEN_PLUS* internal functions, identical to what VEC_WIDEN_PLUS did. Bootstrapped and regression tested on aarch64-unknown-linux-gnu. gcc/ChangeLog: * gimple-range-op.cc (gimple_range_op_handler::maybe_non_standard):

[PATCH] inline: improve internal function costs

2023-06-01 Thread Andre Vieira (lists) via Gcc-patches
Hi, This is a follow-up of the internal function patch to add widening and narrowing patterns. This patch improves the inliner cost estimation for internal functions. Bootstrapped and regression tested on aarch64-unknown-linux-gnu. gcc/ChangeLog: * ipa-fnsummary.cc

Re: [PATCH] inline: improve internal function costs

2023-06-02 Thread Andre Vieira (lists) via Gcc-patches
On 02/06/2023 10:13, Richard Biener wrote: On Thu, 1 Jun 2023, Andre Vieira (lists) wrote: Hi, This is a follow-up of the internal function patch to add widening and narrowing patterns. This patch improves the inliner cost estimation for internal functions. I have no idea why calls

Re: [PATCH] modula2: Fix bootstrap

2023-06-07 Thread Andre Vieira (lists) via Gcc-patches
Thanks Jakub! I do need those includes and sorry I broke your bootstrap it didn't show up on my aarch64-unknown-linux-gnu bootstrap, I'm guessing the rules there were just run in a different order. Glad you were able to fix it :) On 06/06/2023 22:28, Jakub Jelinek wrote: Hi! internal-fn.h

vect: Don't pass subtype to vect_widened_op_tree where not needed [PR 110142]

2023-06-07 Thread Andre Vieira (lists) via Gcc-patches
Hi, This patch fixes an issue introduced by g:2f482a07365d9f4a94a56edd13b7f01b8f78b5a0, where a subtype was beeing passed to vect_widened_op_tree, when no subtype was to be used. This lead to an errorneous use of IFN_VEC_WIDEN_MINUS. gcc/ChangeLog: * tree-vect-patterns.cc

Re: [PATCH] inline: improve internal function costs

2023-06-12 Thread Andre Vieira (lists) via Gcc-patches
On 05/06/2023 04:04, Jan Hubicka wrote: On Thu, 1 Jun 2023, Andre Vieira (lists) wrote: Hi, This is a follow-up of the internal function patch to add widening and narrowing patterns. This patch improves the inliner cost estimation for internal functions. I have no idea why calls

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

2023-07-26 Thread Andre Vieira (lists) via Gcc-patches
Hi, This patch enables the use of mixed-types for simd clones for AArch64 and adds aarch64 as a target_vect_simd_clones. Bootstrapped and regression tested on aarch64-unknown-linux-gnu gcc/ChangeLog: * config/aarch64/aarch64.cc (currently_supported_simd_type): Remove.

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

2023-08-09 Thread Andre Vieira (lists) via Gcc-patches
/pr87887-1.c: Add warning test. * gcc.dg/gomp/pr89246-1.c: Likewise. * gcc.dg/gomp/pr99542.c: Update warning test. On 08/08/2023 11:51, Richard Sandiford wrote: "Andre Vieira (lists)" writes: warning_at (DECL_SOURCE_LOCATION (node

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

2023-08-09 Thread Andre Vieira (lists) via Gcc-patches
On 09/08/2023 17:55, Richard Sandiford wrote: "Andre Vieira (lists)" writes: On 08/08/2023 11:51, Richard Sandiford wrote: "Andre Vieira (lists)" writes: warning_at (DECL_SOURCE_LOCATION (node->decl), 0, - "unsupported ret

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

2023-06-22 Thread Andre Vieira (lists) via Gcc-patches
Some comments below, all quite minor. I'll continue to review tomorrow, I need a fresher brain for arm_mve_check_df_chain_back_for_implic_predic ;) +static int +arm_mve_get_vctp_lanes (rtx x) +{ + if (GET_CODE (x) == SET && GET_CODE (XEXP (x, 1)) == UNSPEC + && (XINT (XEXP (x, 1), 1) ==

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

2023-06-23 Thread Andre Vieira (lists) via Gcc-patches
+ if (insn != arm_mve_get_loop_vctp (body)) +{ probably a good idea to invert the condition here and return false, helps reducing the indenting in this function. + /* Starting from the current insn, scan backwards through the insn + chain until BB_HEAD: "for each insn in

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

2023-06-23 Thread Andre Vieira (lists) via Gcc-patches
+ /* In order to find out if the loop is of type A or B above look for the + loop counter: it will either be incrementing by one per iteration or + it will be decrementing by num_of_lanes. We can find the loop counter + in the condition at the end of the loop. */ + rtx_insn

Re: [PATCH 3/3] Remove widen_plus/minus_expr tree codes

2023-05-10 Thread Andre Vieira (lists) via Gcc-patches
On 03/05/2023 13:29, Richard Biener wrote: On Fri, 28 Apr 2023, Andre Vieira (lists) wrote: This is a rebase of Joel's previous patch. This patch removes the old widen plus/minus tree codes which have been replaced by internal functions. I guess that's obvious then. I wonder what we do

Re: [PATCH 2/3] Refactor widen_plus as internal_fn

2023-05-15 Thread Andre Vieira (lists) via Gcc-patches
On 15/05/2023 12:01, Richard Biener wrote: On Mon, 15 May 2023, Richard Sandiford wrote: Richard Biener writes: On Fri, 12 May 2023, Richard Sandiford wrote: Richard Biener writes: On Fri, 12 May 2023, Andre Vieira (lists) wrote: I have dealt with, I think..., most of your comments

Re: [PATCH 1/3] Refactor to allow internal_fn's

2023-05-04 Thread Andre Vieira (lists) via Gcc-patches
On 03/05/2023 12:55, Richard Biener wrote: On Fri, 28 Apr 2023, Andre Vieira (lists) wrote: Hi, I'm posting the patches separately now with ChangeLogs. I made the suggested changes and tried to simplify the code a bit further. Where internal to tree-vect-stmts I changed most functions

Re: [PATCH 2/3] Refactor widen_plus as internal_fn

2023-05-12 Thread Andre Vieira (lists) via Gcc-patches
On 12/05/2023 14:28, Richard Biener wrote: On Fri, 12 May 2023, Andre Vieira (lists) wrote: I have dealt with, I think..., most of your comments. There's quite a few changes, I think it's all a bit simpler now. I made some other changes to the costing in tree-inline.cc and gimple-range

Re: [PATCH 3/3] Remove widen_plus/minus_expr tree codes

2023-05-12 Thread Andre Vieira (lists) via Gcc-patches
Moved the 'changes' from this patch back to the second so it's all just about removing code that we no longer use. I don't really know why Joel formatted the patches this way, but I thought I'd keep it as is for now. cover letter: This patch removes the old widen plus/minus tree codes which

Re: [PATCH 1/3] Refactor to allow internal_fn's

2023-05-12 Thread Andre Vieira (lists) via Gcc-patches
Hi, I think I tackled all of your comments, let me know if I missed something. gcc/ChangeLog: 2023-05-12 Andre Vieira Joel Hutton * tree-vect-patterns.cc (vect_gimple_build): New Function. (vect_recog_widen_op_pattern): Refactor to use code_helper. *

Re: [PATCH 2/3] Refactor widen_plus as internal_fn

2023-05-12 Thread Andre Vieira (lists) via Gcc-patches
I have dealt with, I think..., most of your comments. There's quite a few changes, I think it's all a bit simpler now. I made some other changes to the costing in tree-inline.cc and gimple-range-op.cc in which I try to preserve the same behaviour as we had with the tree codes before. Also

Re: [PATCH 2/3] Refactor widen_plus as internal_fn

2023-05-18 Thread Andre Vieira (lists) via Gcc-patches
How about this? Not sure about the DEF_INTERNAL documentation I rewrote in internal-fn.def, was struggling to word these, so improvements welcome! gcc/ChangeLog: 2023-04-25 Andre Vieira Joel Hutton Tamar Christina * config/aarch64/aarch64-simd.md

<    2   3   4   5   6   7