Re: [PATCH] [PR120276] regcprop: Replace partial_subreg_p by ordered_p && maybe_lt

2025-05-18 Thread Jennifer Schmitz
> On 16 May 2025, at 18:54, Richard Sandiford wrote: > > External email: Use caution opening links or attachments > > > Jennifer Schmitz writes: >> [PATCH] [PR120276] regcprop: Return from copy_value for unordered modes >> >> The ICE in PR120276 resu

Re: [PATCH] [PR120276] regcprop: Replace partial_subreg_p by ordered_p && maybe_lt

2025-05-16 Thread Jennifer Schmitz
> On 16 May 2025, at 13:11, Kyrylo Tkachov wrote: > > > >> On 16 May 2025, at 12:35, Richard Sandiford >> wrote: >> >> Jennifer Schmitz writes: >>> The ICE in PR120276 resulted from a comparison of VNx4QI and V8QI using >>> partial_s

[PATCH] [PR120276] regcprop: Replace partial_subreg_p by ordered_p && maybe_lt

2025-05-16 Thread Jennifer Schmitz
(outer_prec, inner_prec); } Replacing the call to partial_subreg_p by ordered_p && maybe_lt resolves the ICE and passes bootstrap and testing without regression. OK for mainline? Signed-off-by: Jennifer Schmitz gcc/ PR middle-end/120276 * regcprop.cc (copy_value): Replace

Re: [PATCH] AArch64: Optimize SVE loads/stores with ptrue predicates to unpredicated instructions.

2025-05-09 Thread Jennifer Schmitz
> On 8 May 2025, at 12:28, Richard Sandiford wrote: > > External email: Use caution opening links or attachments > > > Sorry for the slow review. > > Jennifer Schmitz writes: >> SVE loads and stores where the predicate is all-true can be optimized to >

Re: [PATCH] [PR117978] AArch64: Fold SVE load/store with certain ptrue patterns to LDR/STR.

2025-05-07 Thread Jennifer Schmitz
> On 7 May 2025, at 13:35, Richard Sandiford wrote: > > External email: Use caution opening links or attachments > > > Jennifer Schmitz writes: >> @@ -3698,6 +3706,24 @@ aarch64_partial_ptrue_length (rtx_vector_builder >> &builder, >> return vl; &g

Re: [PATCH] [PR117978] AArch64: Fold SVE load/store with certain ptrue patterns to LDR/STR.

2025-05-07 Thread Jennifer Schmitz
> On 6 May 2025, at 23:02, Richard Sandiford wrote: > > External email: Use caution opening links or attachments > > > Jennifer Schmitz writes: >> About the tests: Non-power-of-2 patterns are already being tested in >> gcc.target/aarch64/sve/acle/general/whil

Re: [PATCH] [PR117978] AArch64: Fold SVE load/store with certain ptrue patterns to LDR/STR.

2025-05-05 Thread Jennifer Schmitz
> On 2 May 2025, at 18:01, Richard Sandiford wrote: > > External email: Use caution opening links or attachments > > > Jennifer Schmitz writes: >> SVE loads/stores using predicates that select the bottom 8, 16, 32, 64, >> or 128 bits of a register can be

Re: [PATCH] AArch64: Optimize SVE loads/stores with ptrue predicates to unpredicated instructions.

2025-05-02 Thread Jennifer Schmitz
Ping. Thanks, Jennifer > On 25 Apr 2025, at 17:08, Jennifer Schmitz wrote: > > SVE loads and stores where the predicate is all-true can be optimized to > unpredicated instructions. For example, > svuint8_t foo (uint8_t *x) > { > return svld1 (svptrue_b8 (), x); > }

Re: [PATCH] aarch64: Optimize SVE extract last to Neon lane extract for 128-bit VLS.

2025-05-02 Thread Jennifer Schmitz
> On 2 May 2025, at 10:05, Richard Sandiford wrote: > > External email: Use caution opening links or attachments > > > Jennifer Schmitz writes: >> I adjusted the patch to use && !val.is_constant () as check, such that the >> extraction >> of t

[PATCH] [PR117978] AArch64: Fold SVE load/store with certain ptrue patterns to LDR/STR.

2025-05-02 Thread Jennifer Schmitz
). Follow-up patches for LD2/3/4 and ST2/3/4 and potentially partial SVE vector modes are planned. The patch was bootstrapped and tested on aarch64-linux-gnu, no regression. OK for mainline? Signed-off-by: Jennifer Schmitz gcc/ PR target/117978 * config/aarch64/aarch64-protos.h: Declare

Re: [PATCH] aarch64: Optimize SVE extract last to Neon lane extract for 128-bit VLS.

2025-05-01 Thread Jennifer Schmitz
> On 28 Apr 2025, at 16:29, Richard Sandiford wrote: > > External email: Use caution opening links or attachments > > > Jennifer Schmitz writes: >>> On 27 Apr 2025, at 08:42, Tamar Christina wrote: >>> >>> External em

Re: [PATCH] AArch64: Fold LD1/ST1 with ptrue to LDR/STR for 128-bit VLS

2025-04-30 Thread Jennifer Schmitz
> On 29 Apr 2025, at 18:21, Richard Sandiford wrote: > > External email: Use caution opening links or attachments > > > Jennifer Schmitz writes: >> If -msve-vector-bits=128, SVE loads and stores (LD1 and ST1) with a >> ptrue predicate can be replaced by

Re: [PATCH] AArch64: Fold LD1/ST1 with ptrue to LDR/STR for 128-bit VLS

2025-04-29 Thread Jennifer Schmitz
> On 29 Apr 2025, at 14:03, Richard Sandiford wrote: > > External email: Use caution opening links or attachments > > > Jennifer Schmitz writes: >> diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc >> index f7bccf532f8..1c06b8528e9 1006

Re: [PATCH] AArch64: Fold LD1/ST1 with ptrue to LDR/STR for 128-bit VLS

2025-04-28 Thread Jennifer Schmitz
> On 28 Apr 2025, at 15:35, Richard Sandiford wrote: > > External email: Use caution opening links or attachments > > > Kyrylo Tkachov writes: >>> On 25 Apr 2025, at 19:55, Richard Sandiford >>> wrote: >>> >>> Jennifer Schmitz write

Re: [PATCH] AArch64: Fold LD1/ST1 with ptrue to LDR/STR for 128-bit VLS

2025-04-28 Thread Jennifer Schmitz
> On 28 Apr 2025, at 09:59, Richard Sandiford wrote: > > External email: Use caution opening links or attachments > > > Tamar Christina writes: >>> -Original Message- >>> From: Richard Sandiford >>> Sent: Friday, April 25, 2025 6:55 PM

Re: [PATCH] aarch64: Optimize SVE extract last to Neon lane extract for 128-bit VLS.

2025-04-28 Thread Jennifer Schmitz
> On 27 Apr 2025, at 08:42, Tamar Christina wrote: > > External email: Use caution opening links or attachments > > >> -Original Message- >> From: Richard Sandiford >> Sent: Friday, April 25, 2025 4:45 PM >> To: Jennifer Schmitz >> Cc: g

[PATCH] AArch64: Optimize SVE loads/stores with ptrue predicates to unpredicated instructions.

2025-04-25 Thread Jennifer Schmitz
LD1[BHWD], the pattern is guarded under reload_completed to only apply the transform once the address modes have been chosen during RA. The patch was bootstrapped and tested on aarch64-linux-gnu, no regression. OK for mainline? Signed-off-by: Jennifer Schmitz gcc/ * config/aarch64

[PATCH] AArch64: Fold LD1/ST1 with ptrue to LDR/STR for 128-bit VLS

2025-04-25 Thread Jennifer Schmitz
if (known_eq (BYTES_PER_SVE_VECTOR, 16) && known_eq (GET_MODE_SIZE (mode), 16)) which checks for 128-bit VLS and excludes partial modes with a mode size < 128 (e.g. VNx2QI). The patch was bootstrapped and tested on aarch64-linux-gnu, no regression. OK for mainline? Signed-off-b

[PATCH] aarch64: Optimize SVE extract last to Neon lane extract for 128-bit VLS.

2025-04-25 Thread Jennifer Schmitz
and tested on aarch64-linux-gnu, no regression. OK for mainline? Signed-off-by: Jennifer Schmitz gcc/ * config/aarch64/aarch64-sve.md (vec_extract): Prevent the emission of pfalse+lastb for 128-bit VLS. gcc/testsuite/ * gcc.target/aarch64/sve/extract_last_128.c: New test

Re: [PATCH] [PR119706] aarch64: Add test case.

2025-04-10 Thread Jennifer Schmitz
> On 10 Apr 2025, at 19:31, Richard Biener wrote: > > External email: Use caution opening links or attachments > > >> Am 10.04.2025 um 17:27 schrieb Jennifer Schmitz : >> >> This patch adds a test case to the testsuite for PR119706. >> The bug was

[PATCH] [PR119706] aarch64: Add test case.

2025-04-10 Thread Jennifer Schmitz
This patch adds a test case to the testsuite for PR119706. The bug was already fixed by https://gcc.gnu.org/pipermail/gcc-patches/2025-April/680573.html. OK for mainline? Signed-off-by: Jennifer Schmitz gcc/testsuite/ PR tree-optimization/119706 * g++.target/aarch64/sve

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

2025-01-07 Thread Jennifer Schmitz
> On 6 Jan 2025, at 18:58, Tamar Christina wrote: > > External email: Use caution opening links or attachments > > >> -Original Message- >> From: Richard Sandiford >> Sent: Monday, January 6, 2025 5:54 PM >> To: Jennifer Schmitz >> C

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: >>

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

2024-12-19 Thread Jennifer Schmitz
> On 19 Dec 2024, at 12:24, Richard Sandiford wrote: > > External email: Use caution opening links or attachments > > > Jennifer Schmitz writes: >> @@ -3672,6 +3673,48 @@ gimple_folder::fold_pfalse () >> return nullptr; >> } >> >> +/*

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

2024-12-19 Thread Jennifer Schmitz
> On 19 Dec 2024, at 11:14, Richard Sandiford wrote: > > External email: Use caution opening links or attachments > > > Jennifer Schmitz writes: >> @@ -8834,22 +8834,7 @@ vectorizable_store (vec_info *vinfo, >> { &

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

2024-12-18 Thread Jennifer Schmitz
> On 17 Dec 2024, at 18:57, Richard Biener wrote: > > External email: Use caution opening links or attachments > > >> Am 16.12.2024 um 09:10 schrieb Jennifer Schmitz : >> >>  >> >>> On 14 Dec 2024, at 09:32, Richard Biener wrote: >&

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

2024-12-16 Thread Jennifer Schmitz
> On 14 Dec 2024, at 09:32, Richard Biener wrote: > > External email: Use caution opening links or attachments > > >> Am 13.12.2024 um 18:00 schrieb Jennifer Schmitz : >> >>  >> >>> On 13 Dec 2024, at 13:40, Richard Biener wrote: >&

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

2024-12-13 Thread Jennifer Schmitz
> On 13 Dec 2024, at 13:40, Richard Biener wrote: > > External email: Use caution opening links or attachments > > > On Thu, Dec 12, 2024 at 5:27 PM Jennifer Schmitz wrote: >> >> >> >>> On 6 Dec 2024, at 08:41, Jennifer Schmitz wrote: >>

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

2024-12-13 Thread Jennifer Schmitz
> On 11 Dec 2024, at 13:01, 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 implem

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

2024-12-12 Thread Jennifer Schmitz
> On 6 Dec 2024, at 08:41, Jennifer Schmitz wrote: > > > >> 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

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

2024-12-09 Thread Jennifer Schmitz
Ping. Thanks, Jennifer > On 3 Dec 2024, at 09:14, Jennifer Schmitz wrote: > > Ping. > Thanks, > Jennifer > >> On 26 Nov 2024, at 09:18, Jennifer Schmitz wrote: >> >> >> >>> On 20 Nov 2024, at 13:43, Richard Sandiford >>>

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

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: [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

[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-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-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

[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][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: >>> >>&

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: >

[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

[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] [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: [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] 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

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

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: 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

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: 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] 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] 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] 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: 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: [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

[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-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: [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: 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] 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

[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] 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

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] 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

[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: [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: 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

[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

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][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] 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] [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: >>> >>&

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

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-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

[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

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

[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(

[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/

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

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

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][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

[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: [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 >>

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

[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

[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

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

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 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 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

[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

[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 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

[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

  1   2   >