[PATCH] match.pd: Fold x/sqrt(x) to sqrt(x)

2024-07-02 Thread Jennifer Schmitz
This patch adds a pattern in match.pd folding x/sqrt(x) to sqrt(x) for -funsafe-math-optimizations. Test cases were added for double, float, and long double. The patch was bootstrapped and regtested on aarch64-linux-gnu, no regression. Ok for mainline? Signed-off-by: Jennifer Schmitz gcc

Re: [PATCH] match.pd: Fold x/sqrt(x) to sqrt(x)

2024-07-03 Thread Jennifer Schmitz
> On 2 Jul 2024, at 15:01, Richard Biener wrote: > > External email: Use caution opening links or attachments > > > On Tue, 2 Jul 2024, Jennifer Schmitz wrote: > >> This patch adds a pattern in match.pd folding x/sqrt(x) to sqrt(x) for >> -funsafe-math-opt

[PATCH] testsuite: Tests the pattern folding x/sqrt(x) to sqrt(x) for Float16

2024-07-09 Thread Jennifer Schmitz
As a follow-up to adding a pattern that folds x/sqrt(x) to sqrt(x) in match.pd, this patch adds a test case for type Float16 for armv8.2-a+fp16. The patch was bootstrapped and regtested on aarch64-linux-gnu, no regression. Ok for mainline? Signed-off-by: Jennifer Schmitz gcc/testsuite

[RFC/RFA][PATCH 0/2] SVE intrinsics: Add strength reduction for division by constant.

2024-07-16 Thread Jennifer Schmitz
shifts, similar as for scalar division. This is planned to be implemented in the gimple_folder as well. Thoughts? Signed-off-by: Jennifer Schmitz smime.p7s Description: S/MIME cryptographic signature

[PATCH 1/2] SVE intrinsics: Add strength reduction for division by constant.

2024-07-17 Thread Jennifer Schmitz
? Signed-off-by: Jennifer Schmitz gcc/ * config/aarch64/aarch64-sve-builtins-base.cc (svdiv_impl): Implement fold and expand. gcc/testsuite/ * gcc.target/aarch64/sve/div_const_1.c: New test. * gcc.target/aarch64/sve/div_const_1_run.c: Likewise. * gcc.target

[PATCH 2/2] SVE intrinsics: Add strength reduction for division by constant.

2024-07-17 Thread Jennifer Schmitz
mainline? Signed-off-by: Jennifer Schmitz gcc/ * config/aarch64/aarch64-sve-builtins-base.cc (svdiv_impl): Extend fold and expand. gcc/testsuite/ * gcc.target/aarch64/sve/div_const_1.c: New test. * gcc.target/aarch64/sve/div_const_1_run.c: Likewise. 0002-SVE

[PATCH] PR tree-optimization/101390: Vectorize modulo operator

2024-08-13 Thread Jennifer Schmitz
-by: Jennifer Schmitz gcc/ PR tree-optimization/101390 * tree-vect-pattern.cc (vect_recog_mod_var_pattern): Add new pattern. gcc/testsuite/ PR tree-optimization/101390 * gcc.dg/vect/vect-mod-var.c: New test. 0001-PR-tree-optimization-101390-Vectorize-modulo

[PATCH 1/2] SVE intrinsics: Fold constant operands for svdiv

2024-08-19 Thread Jennifer Schmitz
planned for a future follow-up. The patch was bootstrapped and regtested on aarch64-linux-gnu, no regression. OK for mainline? Signed-off-by: Jennifer Schmitz gcc/ * config/aarch64/aarch64-sve-builtins-base.cc (svdiv_impl::fold): Add constant folding. * config/aarch64/aarch64

[PATCH 2/2] SVE intrinsics: Fold constant operands for svmul

2024-08-19 Thread Jennifer Schmitz
assembly for different predicates and signed and unsigned integers. The patch was bootstrapped and regtested on aarch64-linux-gnu, no regression. OK for mainline? Signed-off-by: Jennifer Schmitz gcc/ * config/aarch64/aarch64-sve-builtins-base.cc (svmul_impl::fold): Implement

Re: [RFC][PATCH] SVE intrinsics: Fold svdiv (svptrue, x, x) to ones

2024-08-19 Thread Jennifer Schmitz
Based on our discussion, I submitted two new patches for folding SVE intrinsics (svdiv and svmul): https://gcc.gnu.org/pipermail/gcc-patches/2024-August/660744.html https://gcc.gnu.org/pipermail/gcc-patches/2024-August/660745.html > On 13 Aug 2024, at 10:58, Richard Sandiford wrote: > > Exter

Re: [PATCH] PR tree-optimization/101390: Vectorize modulo operator

2024-08-19 Thread Jennifer Schmitz
n opening links or attachments > > > Jennifer Schmitz writes: >> This patch adds a new vectorization pattern that detects the modulo >> operation where the second operand is a variable. >> It replaces the statement by division, multiplication, and subtraction. >> &

[PATCH] PR target/116365: Add user-friendly arguments to --param aarch64-autovec-preference=N

2024-08-20 Thread Jennifer Schmitz
compatibility, the numerical values are retained, but are made aliases of the new user-readable strings. The patch was bootstrapped and regtested on aarch64-linux-gnu, no regression. Ok for mainline? Signed-off-by: Jennifer Schmitz gcc/ PR target/116365 * config/aarch64/aarch64-opts.h

Re: [PATCH 1/2] SVE intrinsics: Fold constant operands for svdiv

2024-08-21 Thread Jennifer Schmitz
t;>> wrote: >>> >>> External email: Use caution opening links or attachments >>> >>> >>> Jennifer Schmitz writes: >>>> This patch implements constant folding for svdiv. A new gimple_folder >>>> method was added th

Re: [PATCH] PR target/116365: Add user-friendly arguments to --param aarch64-autovec-preference=N

2024-08-21 Thread Jennifer Schmitz
On 21 Aug 2024, at 16:03, Richard Sandiford wrote: > > External email: Use caution opening links or attachments > > > Kyrylo Tkachov writes: >>> On 20 Aug 2024, at 19:11, Richard Sandiford >>> wrot>> Jennifer Schmitz writes: >>>> The para

Re: [PATCH] PR tree-optimization/101390: Vectorize modulo operator

2024-08-22 Thread Jennifer Schmitz
On 19 Aug 2024, at 21:02, Richard Sandiford wrote: > > External email: Use caution opening links or attachments > > > Jennifer Schmitz writes: >> Thanks for the comments. I updated the patch accordingly and bootstrapped >> and tested again. &g

Re: [PATCH] PR target/116365: Add user-friendly arguments to --param aarch64-autovec-preference=N

2024-08-22 Thread Jennifer Schmitz
On 22 Aug 2024, at 09:30, Kyrylo Tkachov wrote: > > Hi Jennifer, > >> On 22 Aug 2024, at 08:59, Jennifer Schmitz wrote: >> >> On 21 Aug 2024, at 16:03, Richard Sandiford >> wrote: >>> >>> External email: Use caution opening links

Re: [PATCH] PR tree-optimization/101390: Vectorize modulo operator

2024-08-22 Thread Jennifer Schmitz
> On 23 Aug 2024, at 06:21, Andrew Pinski wrote: > > External email: Use caution opening links or attachments > > > On Thu, Aug 22, 2024 at 11:28 AM Andrew Pinski wrote: >> >> On Thu, Aug 22, 2024 at 4:12 AM Richard Biener wrote: >>> >>

[RFC][PATCH] AArch64: Remove AARCH64_EXTRA_TUNE_USE_NEW_VECTOR_COSTS

2024-08-23 Thread Jennifer Schmitz
when flag_vect_cost_model == VECT_COST_MODEL_UNLIMITED. If you agree with that suggestion, I propose prepending the current patch by one that implements this logic and adding -fvect-cost-model=unlimited to the failing tests. Please advise. Signed-off-by: Jennifer Schmitz gcc/ * config

[PATCH] aarch64: Fuse CMP+CSEL and CMP+CSET for -mcpu=neoverse-v2

2024-07-23 Thread Jennifer Schmitz
regression. There was also no non-noise impact on SPEC CPU2017 benchmark. OK for mainline? Signed-off-by: Jennifer Schmitz gcc/ * config/aarch64/aarch64.cc (aarch_macro_fusion_pair_p): Implement fusion logic. * config/aarch64/aarch64-fusion-pairs.def (cmp+csel): New entry

Re: [PATCH] aarch64: Fuse CMP+CSEL and CMP+CSET for -mcpu=neoverse-v2

2024-07-24 Thread Jennifer Schmitz
23 Jul 2024, at 12:16, Jennifer Schmitz wrote: > > According to the Neoverse V2 Software Optimization Guide (section 4.14), the > instruction pairs CMP+CSEL and CMP+CSET can be fused, which had not been > implemented so far. This patch implements and tests the two fusion pairs. >

Re: [PATCH] aarch64: Fuse CMP+CSEL and CMP+CSET for -mcpu=neoverse-v2

2024-07-24 Thread Jennifer Schmitz
24 Jul 2024, at 13:34, Kyrylo Tkachov wrote: >>> >>> Hi Jennifer, >>> >>>> On 24 Jul 2024, at 10:52, Jennifer Schmitz wrote: >>>> >>>> The following typo was corrected, updated patch file below: >>>> >&

[PATCH] SVE Intrinsics: Change return type of redirect_call to gcall.

2024-07-24 Thread Jennifer Schmitz
function to gcall. These call sites were updated. The patch was bootstrapped and regtested on aarch64-linux-gnu, no regression. OK for mainline? Signed-off-by: Jennifer Schmitz gcc/ * config/aarch64/aarch64-sve-builtins.cc (gimple_folder::redirect_call): Update return type

Re: [RFC/RFA][PATCH 0/2] SVE intrinsics: Add strength reduction for division by constant.

2024-07-29 Thread Jennifer Schmitz
On 17 Jul 2024, at 09:29, Richard Sandiford wrote: > > External email: Use caution opening links or attachments > > > Jennifer Schmitz writes: >> This patch series is part of an ongoing effort to replace the SVE intrinsic >> svdiv >> by lower-strength inst

Re: [PATCH 1/2] SVE intrinsics: Add strength reduction for division by constant.

2024-07-29 Thread Jennifer Schmitz
-division-b.patch Description: Binary data > On 17 Jul 2024, at 09:57, Richard Sandiford wrote: > > External email: Use caution opening links or attachments > > > Jennifer Schmitz writes: >> This patch folds signed SVE division where all divisor elements are the same

[PATCH] AArch64: Set instruction attribute of TST to logics_imm

2024-07-30 Thread Jennifer Schmitz
ned-off-by: Jennifer Schmitz gcc/ * config/aarch64/aarch64.md (*and_compare0): Change attribute. 0001-AArch64-Set-instruction-attribute-of-TST-to-logics_i.patch Description: Binary data smime.p7s Description: S/MIME cryptographic signature

Re: [PATCH 1/2] SVE intrinsics: Add strength reduction for division by constant.

2024-07-30 Thread Jennifer Schmitz
mail: Use caution opening links or attachments > > > Thanks for doing this. > > Jennifer Schmitz writes: >> [...] >> diff --git a/gcc/testsuite/gcc.target/aarch64/sve/acle/asm/div_s32.c >> b/gcc/testsuite/gcc.target/aarch64/sve/acle/asm/div_s32.c >> in

Re: [PATCH] aarch64: Fuse CMP+CSEL and CMP+CSET for -mcpu=neoverse-v2

2024-07-31 Thread Jennifer Schmitz
Jul 2024, at 14:49, Kyrylo Tkachov wrote: > > > >> On 25 Jul 2024, at 13:58, Richard Sandiford >> wrote: >> >> External email: Use caution opening links or attachments >> >> >> Jennifer Schmitz writes: >>> Thank you for the

Re: [PATCH] aarch64: Fuse CMP+CSEL and CMP+CSET for -mcpu=neoverse-v2

2024-08-02 Thread Jennifer Schmitz
ote: > > External email: Use caution opening links or attachments > > > Jennifer Schmitz writes: >> Thanks for the feedback! I updated the patch based on your comments, more >> detailed comments inline below. The updated version was bootstrapped and >> tested again,

[RFC][PATCH] SVE intrinsics: Fold svdiv (svptrue, x, x) to ones

2024-08-02 Thread Jennifer Schmitz
h was bootstrapped and regtested on aarch64-linux-gnu, no regression. OK for mainline? Please also advise whether it makes sense to implement the same optimization for float types and if so, under which conditions? Signed-off-by: Jennifer Schmitz gcc/ * config/aarch64/aarch64-sve-builtins-ba

[MAINTAINERS] Add my email address to write after approval and DCO.

2024-08-05 Thread Jennifer Schmitz
Add my email address to write after approval and DCO. Pushed to trunk: 219b09215f530e4a4a3763746986b7068e00f000 Signed-off-by: Jennifer Schmitz mailto:jschm...@nvidia.com>> ChangeLog: * MAINTAINERS: Add myself. 0001-MAINTAINERS-Add-my-email-address-to-write-after-appr.patch Descr

Re: [PATCH] AArch64: Set instruction attribute of TST to logics_imm

2024-08-05 Thread Jennifer Schmitz
Pushed to trunk: 7268d7249b3ca31bf322de99b1d59baf06f83eb3 > On 30 Jul 2024, at 13:39, Richard Sandiford wrote: > > External email: Use caution opening links or attachments > > > Jennifer Schmitz mailto:jschm...@nvidia.com>> writes: >> As suggested in >&g

[PATCH 1/3] SVE intrinsics: Fold constant operands.

2024-08-30 Thread Jennifer Schmitz
aarch64_const_binop calls poly_int_binop, the latter was made public. The patch was bootstrapped and regtested on aarch64-linux-gnu, no regression. OK for mainline? Signed-off-by: Jennifer Schmitz gcc/ * config/aarch64/aarch64-sve-builtins.cc (aarch64_const_binop): New function to fold

[PATCH 2/3] SVE intrinsics: Fold constant operands for svdiv.

2024-08-30 Thread Jennifer Schmitz
: Jennifer Schmitz gcc/ * config/aarch64/aarch64-sve-builtins-base.cc (svdiv_impl::fold): Try constant folding. * config/aarch64/aarch64-sve-builtins.cc (aarch64_const_binop): Add special case for division by 0. gcc/testsuite/ * gcc.target/aarch64/sve

[PATCH 3/3] SVE intrinsics: Fold constant operands for svmul.

2024-08-30 Thread Jennifer Schmitz
, signed and unsigned integers, and the svmul_n_* case. The patch was bootstrapped and regtested on aarch64-linux-gnu, no regression. OK for mainline? Signed-off-by: Jennifer Schmitz gcc/ * config/aarch64/aarch64-sve-builtins-base.cc (svmul_impl::fold): Implement and try constant

Re: [PATCH 1/3] SVE intrinsics: Fold constant operands.

2024-09-02 Thread Jennifer Schmitz
> On 30 Aug 2024, at 14:05, Richard Sandiford wrote: > > External email: Use caution opening links or attachments > > > Jennifer Schmitz writes: >> This patch implements constant folding of binary operations for SVE >> intrinsics >> by calling the cons

Re: [PATCH 2/3] SVE intrinsics: Fold constant operands for svdiv.

2024-09-02 Thread Jennifer Schmitz
> On 30 Aug 2024, at 14:17, Richard Sandiford wrote: > > External email: Use caution opening links or attachments > > > Jennifer Schmitz writes: >> This patch implements constant folding for svdiv. If the predicate is >> ptrue or predication is _x, i

Re: [PATCH 3/3] SVE intrinsics: Fold constant operands for svmul.

2024-09-02 Thread Jennifer Schmitz
> On 30 Aug 2024, at 14:21, Richard Sandiford wrote: > > External email: Use caution opening links or attachments > > > Jennifer Schmitz writes: >> This patch implements constant folding for svmul. If the predicate is >> ptrue or predication is _x, i

Re: [PATCH 1/3] SVE intrinsics: Fold constant operands.

2024-09-03 Thread Jennifer Schmitz
> On 3 Sep 2024, at 10:39, Richard Biener wrote: > > External email: Use caution opening links or attachments > > > On Tue, 3 Sep 2024, Andrew Pinski wrote: > >> On Fri, Aug 30, 2024 at 4:41 AM Jennifer Schmitz wrote: >>> >>> This patch impleme

[PATCH] SVE intrinsics: Fold svdiv with all-zero operands to zero vector

2024-09-04 Thread Jennifer Schmitz
, the operation is folded as soon as one of the operands is a constant zero vector. Folding of divison by 0 to return 0 is in accordance with the semantics of sdiv and udiv. The patch was bootstrapped and regtested on aarch64-linux-gnu, no regression. OK for mainline? Signed-off-by: Jennifer

[PATCH][PR116569] match.pd: Check trunc_mod vector obtap before folding.

2024-09-06 Thread Jennifer Schmitz
target does not support vector mod optab, while still allowing the simplification during early gimple passes (as tested, for example, in gcc.dg/fold-minus-1.c). The patch was bootstrapped and regtested on aarch64-linux-gnu, no regression. OK for mainline? Signed-off-by: Jennifer Schmitz gcc

Re: [PATCH] SVE intrinsics: Fold svdiv with all-zero operands to zero vector

2024-09-16 Thread Jennifer Schmitz
> On 9 Sep 2024, at 10:58, Richard Sandiford wrote: > > External email: Use caution opening links or attachments > > > Jennifer Schmitz writes: >> This patch folds svdiv where one of the operands is all-zeros to a zero >> vector, if the predicate is ptrue

Re: [PATCH] SVE intrinsics: Fold svdiv with all-zero operands to zero vector

2024-09-16 Thread Jennifer Schmitz
> On 16 Sep 2024, at 18:28, Richard Sandiford wrote: > > External email: Use caution opening links or attachments > > > Jennifer Schmitz writes: >> From 287073b46e3eb9e7786f95c1d4bd90208db51f75 Mon Sep 17 00:00:00 2001 >> From: Jennifer Schmitz >>

[PATCH] SVE intrinsics: Fold svmul with all-zero operands to zero vector

2024-09-17 Thread Jennifer Schmitz
regression. OK for mainline? Signed-off-by: Jennifer Schmitz gcc/ * config/aarch64/aarch64-sve-builtins-base.cc (svmul_impl::fold): Add folding of all-zero operands to zero vector. gcc/testsuite/ * gcc.target/aarch64/sve/const_fold_mul_1.c: Adjust expected outcome

Re: [RFC][PATCH] AArch64: Remove AARCH64_EXTRA_TUNE_USE_NEW_VECTOR_COSTS

2024-10-15 Thread Jennifer Schmitz
> On 1 Oct 2024, at 21:30, Tamar Christina wrote: > > External email: Use caution opening links or attachments > > > Hi Jennifer, > >> -Original Message- >> From: Jennifer Schmitz >> Sent: Tuesday, September 24, 2024 9:23 AM >> To: g

[PATCH] SVE intrinsics: Add fold_active_lanes_to method to refactor svmul and svdiv.

2024-10-15 Thread Jennifer Schmitz
sel instructions with all-same operands and replacing sel instructions by mov instructions. The patch was bootstrapped and regtested on aarch64-linux-gnu, no regression. OK for mainline? Signed-off-by: Jennifer Schmitz gcc/ * config/aarch64/aarch64-sve-builtins-base.cc (svdiv_impl::fold

[PATCH] SVE intrinsics: Fold division and multiplication by -1 to neg.

2024-10-15 Thread Jennifer Schmitz
svneg_z have only 2 arguments. Tests were added or adjusted to check the produced assembly and runtime tests were added to check correctness. The patch was bootstrapped and regtested on aarch64-linux-gnu, no regression. OK for mainline? Signed-off-by: Jennifer Schmitz gcc/ * config

Re: [PATCH] [PR116831] match.pd: Check trunc_mod vector obtap before folding.

2024-10-09 Thread Jennifer Schmitz
> On 8 Oct 2024, at 10:31, Richard Biener wrote: > > External email: Use caution opening links or attachments > > > On Fri, 4 Oct 2024, Jennifer Schmitz wrote: > >> As in https://gcc.gnu.org/pipermail/gcc-patches/2024-September/663185.html, >> this patch gu

Re: [PATCH] [PR86710][PR116826] match.pd: Fold logarithmic identities.

2024-10-11 Thread Jennifer Schmitz
> On 8 Oct 2024, at 10:44, Richard Biener wrote: > > External email: Use caution opening links or attachments > > > On Thu, 3 Oct 2024, Jennifer Schmitz wrote: > >> >> >>> On 1 Oct 2024, at 14:27, Richard Biener wrote: >>> >>&

[PATCH] SVE intrinsics: Fold svmul with constant power-of-2 operand to svlsl

2024-10-11 Thread Jennifer Schmitz
also check correctness, runtime tests were added. The patch was bootstrapped and regtested on aarch64-linux-gnu, no regression. OK for mainline? Signed-off-by: Jennifer Schmitz gcc/ * config/aarch64/aarch64-sve-builtins-base.cc (svmul_impl::fold): Implement fold to svlsl for power

Re: [PATCH][PR113816] AArch64: Use SIMD+GPR for logical vector reductions

2024-10-11 Thread Jennifer Schmitz
M >>> To: Richard Sandiford >>> Cc: Jennifer Schmitz ; gcc-patches@gcc.gnu.org; Richard >>> Earnshaw ; Kyrylo Tkachov >>> ; Tamar Christina >>> Subject: Re: [PATCH][PR113816] AArch64: Use SIMD+GPR for logical vector >>> reductions >>

[PATCH] [PR116831] match.pd: Check trunc_mod vector obtap before folding.

2024-10-04 Thread Jennifer Schmitz
tch was bootstrapped and tested with no regression on aarch64-linux-gnu and x86_64-linux-gnu. OK for mainline? Signed-off-by: Jennifer Schmitz gcc/ PR tree-optimization/116831 * match.pd: Guard simplification to trunc_mod with check for mod optab support. gcc/testsu

[PATCH] SVE intrinsics: Add constant folding for svindex.

2024-10-16 Thread Jennifer Schmitz
checking - the application of the transform during gimple for constant arguments, - the interaction with another gimple-level optimization. The patch was bootstrapped and regtested on aarch64-linux-gnu, no regression. OK for mainline? Signed-off-by: Jennifer Schmitz gcc/ * config

Re: [PATCH] SVE intrinsics: Add fold_active_lanes_to method to refactor svmul and svdiv.

2024-10-18 Thread Jennifer Schmitz
> On 18 Oct 2024, at 10:46, Tamar Christina wrote: > > External email: Use caution opening links or attachments > > >> -Original Message- >> From: Richard Sandiford >> Sent: Thursday, October 17, 2024 6:05 PM >> To: Jennifer Schmitz >>

[PATCH] SVE intrinsics: Add constant folding for svindex.

2024-10-16 Thread Jennifer Schmitz
checking - the application of the transform during gimple for constant arguments, - the interaction with another gimple-level optimization. The patch was bootstrapped and regtested on aarch64-linux-gnu, no regression. OK for mainline? Signed-off-by: Jennifer Schmitz gcc/ * config

Re: [PATCH] SVE intrinsics: Add constant folding for svindex.

2024-10-16 Thread Jennifer Schmitz
I resubmitted an corrected version of this patch in https://gcc.gnu.org/pipermail/gcc-patches/2024-October/665648.html > On 16 Oct 2024, at 10:32, Jennifer Schmitz wrote: > > This patch folds svindex with constant arguments into a vector series. > We implemented this in svinde

[PATCH] match.pd: Add std::pow folding optimizations.

2024-10-18 Thread Jennifer Schmitz
!HONOR_INFINITIES. Tests were added to confirm the application of the transform for float, double, and long double. The patch was bootstrapped and regtested on aarch64-linux-gnu and x86_64-linux-gnu, no regression. OK for mainline? Signed-off-by: Jennifer Schmitz gcc/ * match.pd: Fold pow (1.0

Re: [PATCH] SVE intrinsics: Add fold_active_lanes_to method to refactor svmul and svdiv.

2024-10-16 Thread Jennifer Schmitz
> On 16 Oct 2024, at 21:16, Richard Sandiford wrote: > > External email: Use caution opening links or attachments > > > Jennifer Schmitz writes: >> As suggested in >> https://gcc.gnu.org/pipermail/gcc-patches/2024-September/663275.html, >> this

[PATCH] SVE intrinsics: Fold svsra with op1 all zeros to svlsr/svasr.

2024-10-18 Thread Jennifer Schmitz
assembly for use of LSR/ASR. The patch was bootstrapped and regtested on aarch64-linux-gnu, no regression. OK for mainline? Signed-off-by: Jennifer Schmitz gcc/ * config/aarch64/aarch64-sve-builtins-sve2.cc (svsra_impl::fold): Fold svsra to svlsr/svasr if op1 is all zeros

Re: [PATCH] [PR113816] AArch64: Use SVE bit op reduction for vector reductions

2024-10-10 Thread Jennifer Schmitz
> On 2 Oct 2024, at 14:34, Tamar Christina wrote: > > External email: Use caution opening links or attachments > > >> -Original Message- >> From: Kyrylo Tkachov >> Sent: Wednesday, October 2, 2024 1:09 PM >> To: Richard Sandiford >> Cc

[PATCH][PR113816] AArch64: Use SIMD+GPR for logical vector reductions

2024-10-10 Thread Jennifer Schmitz
uc-or_2.c. The patch was bootstrapped and regtested on aarch64-linux-gnu, no regression. OK for mainline? Signed-off-by: Jennifer Schmitz gcc/ PR target/113816 * config/aarch64/aarch64-simd.md (reduc__scal_): Implement for logical bitwise operations for VDQV_E. gcc/te

Re: [PATCH] [PR116831] match.pd: Check trunc_mod vector obtap before folding.

2024-10-10 Thread Jennifer Schmitz
> On 10 Oct 2024, at 09:03, Richard Biener wrote: > > External email: Use caution opening links or attachments > > > On Wed, 9 Oct 2024, Jennifer Schmitz wrote: > >> >>> On 8 Oct 2024, at 10:31, Richard Biener wrote: >>> >>> Ex

[PATCH] testsuite: Add test directive checking removal of link_error

2024-10-22 Thread Jennifer Schmitz
This test needs a directive checking the removal of the link_error. Committed as obvious: bf11ecbb02b517dff0034f02adacf9269a11a095 Signed-off-by: Jennifer Schmitz gcc/testsuite/ * gcc.dg/tree-ssa/log_ident.c: Add scan for removal of link_error in optimized tree dump. --- gcc

Re: [PATCH] match.pd: Add std::pow folding optimizations.

2024-10-23 Thread Jennifer Schmitz
> On 22 Oct 2024, at 13:14, Richard Biener wrote: > > External email: Use caution opening links or attachments > > > On Tue, 22 Oct 2024, Jennifer Schmitz wrote: > >> >> >>> On 22 Oct 2024, at 11:05, Richard Biener wrote: >>> >>&

Re: [PATCH] [PR86710][PR116826] match.pd: Fold logarithmic identities.

2024-10-11 Thread Jennifer Schmitz
> On 11 Oct 2024, at 13:18, Kyrylo Tkachov wrote: > > Hi Jennifer, > >> On 11 Oct 2024, at 10:00, Jennifer Schmitz wrote: >> >> >> >>> On 8 Oct 2024, at 10:44, Richard Biener wrote: >>> >>> External email: Use cautio

Re: [PATCH] match.pd: Add std::pow folding optimizations.

2024-10-22 Thread Jennifer Schmitz
> On 22 Oct 2024, at 11:05, Richard Biener wrote: > > External email: Use caution opening links or attachments > > > On Tue, 22 Oct 2024, Jennifer Schmitz wrote: > >> >> >>> On 21 Oct 2024, at 10:51, Richard Biener wrote: >>> >>&

Re: [RFC][PATCH] AArch64: Remove AARCH64_EXTRA_TUNE_USE_NEW_VECTOR_COSTS

2024-10-22 Thread Jennifer Schmitz
> On 18 Oct 2024, at 09:11, Richard Biener wrote: > > External email: Use caution opening links or attachments > > > On Thu, 17 Oct 2024, Richard Sandiford wrote: > >> Jennifer Schmitz writes: >>> [...] >>> Looking at the diff of the v

Re: [PATCH] SVE intrinsics: Add constant folding for svindex.

2024-10-22 Thread Jennifer Schmitz
Ping. Thanks, Jennifer > On 16 Oct 2024, at 17:38, Jennifer Schmitz wrote: > > This patch folds svindex with constant arguments into a vector series. > We implemented this in svindex_impl::fold using the function build_vec_series. > For example, > svuint64_t f1 () > { >

Re: [PATCH] SVE intrinsics: Fold division and multiplication by -1 to neg.

2024-10-22 Thread Jennifer Schmitz
Ping. Thanks, Jennifer > On 15 Oct 2024, at 09:40, Jennifer Schmitz wrote: > > Because a neg instruction has lower latency and higher throughput than > sdiv and mul, svdiv and svmul by -1 can be folded to svneg. For svdiv, > this is already implemented on the RTL level;

Re: [PATCH] SVE intrinsics: Fold svsra with op1 all zeros to svlsr/svasr.

2024-10-22 Thread Jennifer Schmitz
Ping. Thanks, Jennifer > On 18 Oct 2024, at 09:30, Jennifer Schmitz wrote: > > A common idiom in intrinsics loops is to have accumulator intrinsics > in an unrolled loop with an accumulator initialized to zero at the beginning. > Propagating the initial zero accumulator into the

Re: [PATCH] match.pd: Add std::pow folding optimizations.

2024-10-22 Thread Jennifer Schmitz
> On 21 Oct 2024, at 10:51, Richard Biener wrote: > > External email: Use caution opening links or attachments > > > On Fri, 18 Oct 2024, Jennifer Schmitz wrote: > >> This patch adds the following two simplifications in match.pd: >> - pow (1.0/x, y) to p

Re: [PATCH] SVE intrinsics: Fold svaba with op1 all zeros to svabd.

2024-10-24 Thread Jennifer Schmitz
> On 24 Oct 2024, at 21:55, Richard Sandiford wrote: > > External email: Use caution opening links or attachments > > > Jennifer Schmitz writes: >> Similar to >> https://gcc.gnu.org/pipermail/gcc-patches/2024-October/665780.html, >> this patch implements

[PATCH] SVE intrinsics: Fold svaba with op1 all zeros to svabd.

2024-10-25 Thread Jennifer Schmitz
the _n case. The patch was bootstrapped and regtested on aarch64-linux-gnu, no regression. OK for mainline? Signed-off-by: Jennifer Schmitz gcc/ * config/aarch64/aarch64-sve-builtins-sve2.cc (svaba_impl::fold): Fold svaba to svabd if op1 is all zeros. gcc/testsuite

[PATCH][RFC][PR117093] match.pd: Fold vec_perm with view_convert

2024-11-05 Thread Jennifer Schmitz
We are working on a patch to improve the codegen for the following test case: uint64x2_t foo (uint64x2_t r) { uint32x4_t a = vreinterpretq_u32_u64 (r); uint32_t t; t = a[0]; a[0] = a[1]; a[1] = t; t = a[2]; a[2] = a[3]; a[3] = t; return vreinterpretq_u64_u32 (a); } that GCC curr

[PATCH] SVE intrinsics: Fold svmul and svdiv by -1 to svneg for unsigned types

2024-11-11 Thread Jennifer Schmitz
function is only suitable for folding calls whose arguments are all of the same type. If necessary, this could be extended to convert the arguments to different types differentially. The patch was bootstrapped and tested on aarch64-linux-gnu, no regression. OK for mainline? Signed-off-by: Jennifer

Re: [PATCH] match.pd: Add std::pow folding optimizations.

2024-10-25 Thread Jennifer Schmitz
> On 25 Oct 2024, at 14:39, Richard Biener wrote: > > External email: Use caution opening links or attachments > > > On Wed, 23 Oct 2024, Jennifer Schmitz wrote: > >> >> >>> On 22 Oct 2024, at 13:14, Richard Biener wrote: >>> >>&

[PATCH] [PR106329] SVE intrinsics: Fold calls with pfalse predicate.

2024-10-31 Thread Jennifer Schmitz
his patch, we only implemented function_shape::fold_pfalse for binary shapes. But we plan to cover more shapes in follow-up patches, after getting feedback on this patch. The patch was bootstrapped and regtested on aarch64-linux-gnu, no regression. OK for mainline? Signed-off-by: Jennifer Schmitz

Re: [RFC][PATCH] AArch64: Remove AARCH64_EXTRA_TUNE_USE_NEW_VECTOR_COSTS

2024-09-24 Thread Jennifer Schmitz
Tkachov >>> Sent: Wednesday, August 28, 2024 8:55 AM >>> To: Tamar Christina >>> Cc: Richard Sandiford ; Jennifer Schmitz >>> ; gcc-patches@gcc.gnu.org; Kyrylo Tkachov >>> >>> Subject: Re: [RFC][PATCH] AArch64: Remove >>> AARCH64_E

[PATCH] [PR113816] AArch64: Use SVE bit op reduction for vector reductions

2024-09-25 Thread Jennifer Schmitz
sted on aarch64-linux-gnu, no regression. OK for mainline? Signed-off-by: Jennifer Schmitz gcc/ PR target/113816 * config/aarch64/aarch64-sve.md (reduc__scal_): For logical reductions, match operand 1 with VQ_I. (*aarch64_pred_reduc__): Likewise. * config/

SVE intrinsics: Fold svmul with constant power-of-2 operand to svlsl

2024-09-20 Thread Jennifer Schmitz
aarch64-linux-gnu, no regression. OK for mainline? Signed-off-by: Jennifer Schmitz gcc/ * config/aarch64/aarch64-sve-builtins-base.cc (svmul_impl::fold): Implement fold to svlsl for power-of-2 operands. gcc/testsuite/ * gcc.target/aarch64/sve/acle/asm/mul_s8.c: New test

[PATCH] [PR86710][PR116826] match.pd: Fold logarithmic identities.

2024-10-01 Thread Jennifer Schmitz
orm does not seem to be triggered, we also see no non-noise impact on performance. OK for mainline? Signed-off-by: Jennifer Schmitz gcc/ * match.pd: Fold logN(1.0/a) -> -logN(a), logN(C/a) -> logN(C) - logN(a), logN(a) + logN(b) -> logN(a*b), and logN(a) - logN(

Re: [PATCH][PR116569] match.pd: Check trunc_mod vector obtap before folding.

2024-09-18 Thread Jennifer Schmitz
> On 6 Sep 2024, at 16:20, Jakub Jelinek wrote: > > External email: Use caution opening links or attachments > > > On Fri, Sep 06, 2024 at 02:10:19PM +, Kyrylo Tkachov wrote: >>> This is certainly wrong. >>> PROP_gimple_any is set already at the end of gimplification, so certainly >>> doe

Re: [PATCH] SVE intrinsics: Fold svmul with all-zero operands to zero vector

2024-09-19 Thread Jennifer Schmitz
> On 18 Sep 2024, at 20:33, Richard Sandiford wrote: > > External email: Use caution opening links or attachments > > > Jennifer Schmitz writes: >> From 05e010a4ad5ef8df082b3e03b253aad85e2a270c Mon Sep 17 00:00:00 2001 >> From: Jennifer Schmitz >> D

Re: [PATCH] [PR86710][PR116826] match.pd: Fold logarithmic identities.

2024-10-03 Thread Jennifer Schmitz
> On 1 Oct 2024, at 14:27, Richard Biener wrote: > > External email: Use caution opening links or attachments > > > On Tue, 1 Oct 2024, Jennifer Schmitz wrote: > >> This patch implements 4 rules for logarithmic identities in match.pd >> under -funsafe-mat

Re: SVE intrinsics: Fold svmul with constant power-of-2 operand to svlsl

2024-10-03 Thread Jennifer Schmitz
Ping. > On 20 Sep 2024, at 11:28, Jennifer Schmitz wrote: > > For svmul, if one of the operands is a constant vector with a uniform > power of 2, this patch folds the multiplication to a left-shift by > immediate (svlsl). > Because the shift amount in svlsl is the second ope

Re: [PATCH] SVE intrinsics: Fold svsra with op1 all zeros to svlsr/svasr.

2024-10-24 Thread Jennifer Schmitz
> On 24 Oct 2024, at 11:28, Richard Sandiford wrote: > > External email: Use caution opening links or attachments > > > Jennifer Schmitz writes: >>> On 22 Oct 2024, at 18:21, Richard Sandiford >>> wrote: >>> >>> Ex

Re: [PATCH] SVE intrinsics: Add constant folding for svindex.

2024-10-24 Thread Jennifer Schmitz
> On 23 Oct 2024, at 16:49, Richard Sandiford wrote: > > External email: Use caution opening links or attachments > > > Jennifer Schmitz writes: >> This patch folds svindex with constant arguments into a vector series. >> We implemented this in svindex

Re: [PATCH] SVE intrinsics: Fold division and multiplication by -1 to neg.

2024-10-24 Thread Jennifer Schmitz
> On 23 Oct 2024, at 16:40, Richard Sandiford wrote: > > External email: Use caution opening links or attachments > > > Jennifer Schmitz writes: >> Because a neg instruction has lower latency and higher throughput than >> sdiv and mul, svdiv and svmul by -1 can

Re: [PATCH] SVE intrinsics: Fold svsra with op1 all zeros to svlsr/svasr.

2024-10-24 Thread Jennifer Schmitz
> On 22 Oct 2024, at 18:21, Richard Sandiford wrote: > > External email: Use caution opening links or attachments > > > Jennifer Schmitz writes: >> A common idiom in intrinsics loops is to have accumulator intrinsics >> in an unrolled loop with an accumula

[PATCH][PR117704] testsuite: Fix test failure on x86_32 by adding -mfpmath=sse+387

2024-11-28 Thread Jennifer Schmitz
--target_board={unix/-m32}. OK for mainline? Signed-off-by: Jennifer Schmitz gcc/testsuite/ PR testsuite/117704 * gcc.dg/tree-ssa/pow_fold_1.c: Add -msse -mfpmath=sse+387 for i?86-*-*. --- gcc/testsuite/gcc.dg/tree-ssa/pow_fold_1.c | 1 + 1 file changed, 1 insertion(

Re: [PATCH] SVE intrinsics: Fold svmul and svdiv by -1 to svneg for unsigned types

2024-11-20 Thread Jennifer Schmitz
> On 13 Nov 2024, at 12:54, Richard Sandiford wrote: > > External email: Use caution opening links or attachments > > > Jennifer Schmitz writes: >> As follow-up to >> https://gcc.gnu.org/pipermail/gcc-patches/2024-October/665472.html, >> this patch impl

Re: [PATCH][RFC][PR117093] match.pd: Fold vec_perm with view_convert

2024-11-15 Thread Jennifer Schmitz
> On 7 Nov 2024, at 13:47, Richard Biener wrote: > > External email: Use caution opening links or attachments > > > On Tue, 5 Nov 2024, Jennifer Schmitz wrote: > >> We are working on a patch to improve the codegen for the following test case: >

Re: [PATCH][RFC][PR117093] match.pd: Fold vec_perm with view_convert

2024-11-15 Thread Jennifer Schmitz
> On 15 Nov 2024, at 12:05, Richard Biener wrote: > > External email: Use caution opening links or attachments > > > On Fri, 15 Nov 2024, Jennifer Schmitz wrote: > >> >> >>> On 7 Nov 2024, at 13:47, Richard Biener wrote: >>> >>&

[PATCH] [PR117093] testsuite: Move test pr117093.c into gcc.target/aarch64.

2024-11-18 Thread Jennifer Schmitz
The test file pr117093.c failed on platforms other than aarch64, because it uses arm_neon.h. We moved it into gcc.target/aarch64. The patch was bootstrapped and tested on aarch64-linux-gnu and x86_64-linux-gnu, no regression. Committed as obvious. Signed-off-by: Jennifer Schmitz gcc/testsuite

Re: [PATCH] SVE intrinsics: Fold svmul and svdiv by -1 to svneg for unsigned types

2024-11-26 Thread Jennifer Schmitz
> On 20 Nov 2024, at 13:43, Richard Sandiford wrote: > > External email: Use caution opening links or attachments > > > Jennifer Schmitz writes: >>> On 13 Nov 2024, at 12:54, Richard Sandiford >>> wrote: >>> >>> Ex

Re: [PATCH] SVE intrinsics: Fold svmul and svdiv by -1 to svneg for unsigned types

2024-12-03 Thread Jennifer Schmitz
Ping. Thanks, Jennifer > On 26 Nov 2024, at 09:18, Jennifer Schmitz wrote: > > > >> On 20 Nov 2024, at 13:43, Richard Sandiford >> wrote: >> >> External email: Use caution opening links or attachments >> >> >> Jennifer Schmitz wr

Re: [RFC][PATCH] AArch64: Remove AARCH64_EXTRA_TUNE_USE_NEW_VECTOR_COSTS

2024-12-05 Thread Jennifer Schmitz
> On 5 Dec 2024, at 11:44, Richard Biener wrote: > > External email: Use caution opening links or attachments > > > On Thu, 5 Dec 2024, Jennifer Schmitz wrote: > >> >> >>> On 17 Oct 2024, at 19:23, Richard Sandiford >>> wrote: &g

Re: [RFC][PATCH] AArch64: Remove AARCH64_EXTRA_TUNE_USE_NEW_VECTOR_COSTS

2024-12-05 Thread Jennifer Schmitz
> On 17 Oct 2024, at 19:23, Richard Sandiford wrote: > > External email: Use caution opening links or attachments > > > Jennifer Schmitz writes: >> [...] >> Looking at the diff of the vect dumps (below is a section of the diff for >> strided_store_2.

Re: [RFC][PATCH] AArch64: Remove AARCH64_EXTRA_TUNE_USE_NEW_VECTOR_COSTS

2024-12-05 Thread Jennifer Schmitz
> On 5 Dec 2024, at 20:07, Richard Sandiford wrote: > > External email: Use caution opening links or attachments > > > Jennifer Schmitz writes: >>> On 5 Dec 2024, at 11:44, Richard Biener wrote: >>> >>> External email: Use caution opening lin

Re: [PATCH] [PR106329] SVE intrinsics: Fold calls with pfalse predicate.

2024-12-05 Thread Jennifer Schmitz
> On 5 Dec 2024, at 16:56, Richard Sandiford wrote: > > External email: Use caution opening links or attachments > > > Jennifer Schmitz writes: >> @@ -3622,6 +3631,57 @@ gimple_folder::redirect_pred_x () >> return redirect_call (instance); >> } >>

Re: [RFC][PATCH] AArch64: Remove AARCH64_EXTRA_TUNE_USE_NEW_VECTOR_COSTS

2025-01-06 Thread Jennifer Schmitz
> On 19 Dec 2024, at 14:10, Jennifer Schmitz wrote: > > > >> On 19 Dec 2024, at 11:14, Richard Sandiford >> wrote: >> >> External email: Use caution opening links or attachments >> >> >> Jennifer Schmitz writes: >>

  1   2   >