Re: [PATCH v2] Target-independent store forwarding avoidance.

2024-06-11 Thread Philipp Tomsich
On Tue, 11 Jun 2024 at 15:37, Jeff Law wrote: > > > > On 6/11/24 1:22 AM, Richard Biener wrote: > > >> Absolutely. But forwarding from a smaller store to a wider load is > >> painful > >> from a hardware standpoint and if we can avoid it from a codegen > >> standpoint, > >> we should. > > > >

Re: [PATCH v2] Target-independent store forwarding avoidance.

2024-06-10 Thread Philipp Tomsich
On Mon, 10 Jun 2024 at 20:03, Jeff Law wrote: > > > > On 6/10/24 1:55 AM, Manolis Tsamis wrote: > > >> > > There was an older submission of a load-pair specific pass but this is > > a complete reimplementation and indeed significantly more general. > > Apart from being target independant, it

Re: [PATCH v2] MATCH: Look through VIEW_CONVERT when folding VEC_PERM_EXPRs.

2024-05-24 Thread Philipp Tomsich
On Fri, 24 May 2024 at 13:02, Richard Biener wrote: > > On Fri, 24 May 2024, Manolis Tsamis wrote: > > > The match.pd patterns to merge two vector permutes into one fail when a > > potentially no-op view convert expressions is between the two permutes. > > This change lifts this restriction. > >

[gcc r15-818] MATCH: Look through VIEW_CONVERT when folding VEC_PERM_EXPRs.

2024-05-24 Thread Philipp Tomsich via Gcc-cvs
https://gcc.gnu.org/g:6d6f324bda1ccb51cd43ff9d4d017eb71bb2d690 commit r15-818-g6d6f324bda1ccb51cd43ff9d4d017eb71bb2d690 Author: Manolis Tsamis Date: Wed Nov 1 12:27:28 2023 +0100 MATCH: Look through VIEW_CONVERT when folding VEC_PERM_EXPRs. The match.pd patterns to merge two

Re: [PATCH] [RFC] Target-independent store forwarding avoidance. [PR48696] Target-independent store forwarding avoidance.

2024-05-23 Thread Philipp Tomsich
On Thu, 23 May 2024 at 18:18, Andrew Pinski wrote: > > On Thu, May 23, 2024 at 8:01 AM Manolis Tsamis > wrote: > > > > This pass detects cases of expensive store forwarding and tries to avoid > > them > > by reordering the stores and using suitable bit insertion sequences. > > For example it

Re: [PATCH v3] RISC-V: Replace zero_extendsidi2_shifted with generalized split

2024-04-06 Thread Philipp Tomsich
On Sat 6. Apr 2024 at 06:52, Jeff Law wrote: > > > On 3/27/24 4:55 AM, Philipp Tomsich wrote: > > Jeff, > > > > just a heads-up that that trunk (i.e., the soon-to-be GCC14) still > > generates the suboptimal sequence: > >https://godbolt.org/z/K9YYEPs

Re: [PATCH v3] RISC-V: Replace zero_extendsidi2_shifted with generalized split

2024-03-27 Thread Philipp Tomsich
Jeff, just a heads-up that that trunk (i.e., the soon-to-be GCC14) still generates the suboptimal sequence: https://godbolt.org/z/K9YYEPsvY Thanks, Philipp. On Mon, 21 Nov 2022 at 18:00, Philipp Tomsich wrote: > > On Sun, 20 Nov 2022 at 17:38, Jeff Law wrote: > > > > &g

Re: [PATCH] aarch64: Check the ldp/stp policy model correctly when mem ops are reversed.

2024-01-29 Thread Philipp Tomsich
Applied to master, thanks! --Philipp. On Wed, 24 Jan 2024 at 12:43, Richard Sandiford wrote: > Manos Anagnostakis writes: > > The current ldp/stp policy framework implementation was missing cases, > where > > the memory operands were reversed. Therefore the call to the framework > function > >

Re: [PATCH v6] aarch64: New RTL optimization pass avoid-store-forwarding.

2023-12-06 Thread Philipp Tomsich
* config/aarch64/aarch64-store-forwarding.cc: New file. > > > > gcc/testsuite/ChangeLog: > > > > * gcc.target/aarch64/ldp_ssll_no_overlap_address.c: New test. > > * gcc.target/aarch64/ldp_ssll_no_overlap_offset.c: New test. > > * gc

Re: [PATCH v2] aarch64: Add support for Ampere-1B (-mcpu=ampere1b) CPU

2023-11-29 Thread Philipp Tomsich
Applied to master, thanks! Philipp. On Tue, 28 Nov 2023 at 12:57, Richard Sandiford wrote: > > Philipp Tomsich writes: > > On Tue, 28 Nov 2023 at 12:21, Richard Sandiford > > wrote: > >> > >> Philipp Tomsich writes: > >> > Th

Re: [RFC PATCH] RISC-V: Remove f{r,s}flags builtins

2023-11-29 Thread Philipp Tomsich
These build-ins are used internally for the TARGET_ATOMIC_ASSIGN_EXPAND_FENV expansion (and therefore can not be removed): /* Implement TARGET_ATOMIC_ASSIGN_EXPAND_FENV. */ void riscv_atomic_assign_expand_fenv (tree *hold, tree *clear, tree *update) { if (!(TARGET_HARD_FLOAT || TARGET_ZFINX))

Re: T-Head Vector for GCC-14? (was Re: RISC-V: Support XTheadVector extensions)

2023-11-28 Thread Philipp Tomsich
On Tue, 28 Nov 2023 at 20:31, Palmer Dabbelt wrote: > > On Wed, 22 Nov 2023 14:27:50 PST (-0800), jeffreya...@gmail.com wrote: > > ... > > [Trimming everything else, as this is a big change. I'm also making it > a new subject/thread, so folks can see.] > > > More generally, I think I need to

Re: [PATCH v2] aarch64: Add support for Ampere-1B (-mcpu=ampere1b) CPU

2023-11-28 Thread Philipp Tomsich
On Tue, 28 Nov 2023 at 12:21, Richard Sandiford wrote: > > Philipp Tomsich writes: > > This patch adds initial support for Ampere-1B core. > > > > The Ampere-1B core implements ARMv8.7 with the following (compiler > > visible) extensions: > > - CSS

Re: [PATCH v2] ifcvt: Remove obsolete code for subreg handling in noce_convert_multiple_sets

2023-11-22 Thread Philipp Tomsich
Applied to master, thanks! Philipp, On Thu, 23 Nov 2023 at 04:48, Jeff Law wrote: > > > > On 11/21/23 11:04, Manolis Tsamis wrote: > > This code used to handle SUBREG for register replacement when ifcvt was > > doing > > the replacements manually. This special handling is not needed anymore >

[PATCH v2] aarch64: Add support for Ampere-1B (-mcpu=ampere1b) CPU

2023-11-22 Thread Philipp Tomsich
/aarch64/tuning_models/ampere1b.h: New file. Signed-off-by: Philipp Tomsich --- Changes in v2: - moved ampere1b model to a separated file - regenerated aarch64-tune.md after rebase gcc/config/aarch64/aarch64-cores.def| 1 + gcc/config/aarch64/aarch64-cost-tables.h| 107

Re: RISC-V: Support XTheadVector extensions

2023-11-18 Thread Philipp Tomsich
On Fri, 17 Nov 2023 at 22:47, Jeff Law wrote: > > > > On 11/17/23 04:39, juzhe.zh...@rivai.ai wrote: > > 90% theadvector extension reusing current RVV 1.0 instructions patterns: > > Just change ASM, For example: > > > > @@ -2923,7 +2923,7 @@ (define_insn "*pred_mulh_scalar" > >

Re: [PATCH] aarch64: costs: update for TARGET_CSSC

2023-11-16 Thread Philipp Tomsich
: > > > > > -Original Message- > > From: Richard Earnshaw > > Sent: Thursday, November 16, 2023 8:53 AM > > To: Philipp Tomsich ; gcc-patches@gcc.gnu.org > > Cc: Kyrylo Tkachov > > Subject: Re: [PATCH] aarch64: costs: update for TARGET_CSSC > > >

[PATCH] aarch64: Add support for Ampere-1B (-mcpu=ampere1b) CPU

2023-11-15 Thread Philipp Tomsich
: Document -mcpu=ampere1b Signed-off-by: Philipp Tomsich --- gcc/config/aarch64/aarch64-cores.def | 1 + gcc/config/aarch64/aarch64-cost-tables.h | 107 +++ gcc/config/aarch64/aarch64-tune.md | 2 +- gcc/config/aarch64/aarch64.cc| 89

[PATCH] aarch64: costs: update for TARGET_CSSC

2023-11-15 Thread Philipp Tomsich
instruction. gcc/ChangeLog: * config/aarch64/aarch64.cc (aarch64_rtx_costs): Support idioms matching to CSSC instructions, if target CSSC is present Signed-off-by: Philipp Tomsich --- gcc/config/aarch64/aarch64.cc | 34 -- 1 file changed, 24

Re: [PATCH v2] aarch64: Improve on ldp-stp policies code structure.

2023-09-29 Thread Philipp Tomsich
Applied to master. Thanks! --Philipp. On Fri, 29 Sept 2023 at 12:34, Richard Sandiford wrote: > > Manos Anagnostakis writes: > > Improves on: 834fc2bf > > > > This improves the code structure of the ldp-stp policies > > patch introduced in 834fc2bf > > > > Bootstrapped and regtested on

Re: [PATCH v2] aarch64: Fine-grained ldp and stp policies with test-cases.

2023-09-28 Thread Philipp Tomsich
Manos, Please submit a follow-on patch implementing the requested improvements of the code structure (as this reduces the maintenance burden). Thanks, Philipp. On Thu, 28 Sept 2023 at 15:33, Manos Anagnostakis wrote: > > Hey Richard, > > Thanks for taking the time to review this, but it has

Re: [PATCH v4] aarch64: Fine-grained policies to control ldp-stp formation.

2023-09-27 Thread Philipp Tomsich
rg > > Cc: Kyrylo Tkachov ; Tamar Christina > > ; Philipp Tomsich ; > > Manos Anagnostakis > > Subject: [PATCH v4] aarch64: Fine-grained policies to control ldp-stp > > formation. > > > > This patch implements the following TODO in gcc/config/aarch64

Re: [PATCH v3] aarch64: Fine-grained policies to control ldp-stp formation.

2023-09-25 Thread Philipp Tomsich
On Mon, 25 Sept 2023 at 21:54, Andrew Pinski wrote: > > On Mon, Sep 25, 2023 at 12:50 PM Manos Anagnostakis > wrote: > > > > This patch implements the following TODO in gcc/config/aarch64/aarch64.cc > > to provide the requested behaviour for handling ldp and stp: > > > > /* Allow the tuning

Re: [PATCH v2 1/2] riscv: Add support for strlen inline expansion

2023-09-12 Thread Philipp Tomsich
Applied to master. Thanks! Philipp. On Wed, 6 Sept 2023 at 18:07, Christoph Muellner wrote: > > From: Christoph Müllner > > This patch implements the expansion of the strlen builtin for RV32/RV64 > for xlen-aligned aligned strings if Zbb or XTheadBb instructions are > available. > The

Re: [PATCH v2 2/2] riscv: Add support for str(n)cmp inline expansion

2023-09-12 Thread Philipp Tomsich
Applied to master. Thanks! Philipp. On Tue, 12 Sept 2023 at 05:34, Jeff Law wrote: > > > > On 9/6/23 10:07, Christoph Muellner wrote: > > From: Christoph Müllner > > > > This patch implements expansions for the cmpstrsi and cmpstrnsi > > builtins for RV32/RV64 for xlen-aligned strings if Zbb or

Re: [PATCH] riscv: xtheadbb: Fix extendqi insn

2023-09-08 Thread Philipp Tomsich
Applied to master. Thanks! Philipp. On Fri, 8 Sept 2023 at 14:17, Kito Cheng wrote: > LGTM > > Christoph Muellner 於 2023年9月8日 週五,14:00寫道: > >> From: Christoph Müllner >> >> Recently three SPEC CPU 2017 benchmarks broke when using xtheadbb: >> * 500.perlbench_r >> * 525.x264_r >> * 557.xz_r >>

Re: [PATCH] riscv: thead: Fix mode attribute for extension patterns

2023-09-08 Thread Philipp Tomsich
Applied to master. Thanks! Philipp. On Fri, 8 Sept 2023 at 10:13, Kito Cheng wrote: > LGTM > > Christoph Muellner 於 2023年9月8日 週五 14:16 寫道: > >> From: Christoph Müllner >> >> The mode attribute of an extension pattern is usually set to the target >> type. >> Let's follow this convention

Re: [PATCH] riscv: bitmanip: Remove duplicate zero_extendhi2 pattern

2023-09-08 Thread Philipp Tomsich
Committed as 'obvious' to master. Thanks! Philipp. On Fri, 8 Sept 2023 at 08:53, Christoph Muellner < christoph.muell...@vrull.eu> wrote: > From: Christoph Müllner > > We currently have two identical zero_extendhi2 patterns: > * '*zero_extendhi2_zbb' > * '*zero_extendhi2_bitmanip' > > This

Re: [PATCH] riscv: xtheadbb: Fix xtheadbb-li-rotr test for rv32

2023-09-06 Thread Philipp Tomsich
Committed as "obvious" to master. --Philipp. On Wed, 6 Sept 2023 at 12:04, Christoph Muellner < christoph.muell...@vrull.eu> wrote: > From: Christoph Müllner > > The test was introduced recently and tests a RV64-only feature. > However, when testing an RV32 compiler, the test gets executed as

Re: [PATCH] riscv: Synthesize all 11-bit-rotate constants with rori

2023-09-05 Thread Philipp Tomsich
Applied to master. Thanks! Philipp. On Tue, 5 Sept 2023 at 23:57, Jeff Law wrote: > > > On 9/5/23 15:15, Christoph Muellner wrote: > > From: Christoph Müllner > > > > Some constants can be built up using LI+RORI instructions. > > The current implementation requires one of the upper 32-bits > >

Re: [PATCH] riscv: xtheadbb: Enable constant synthesis with th.srri

2023-09-05 Thread Philipp Tomsich
Applied to master. Thanks! Philipp. On Tue, 5 Sept 2023 at 18:10, Jeff Law wrote: > > > On 9/5/23 09:42, Christoph Muellner wrote: > > From: Christoph Müllner > > > > Some constants can be built up using rotate-right instructions. > > The code that enables this can be found in

Re: [PATCH] riscv: xtheadcondmov: Don't run tests with -Oz

2023-09-05 Thread Philipp Tomsich
Applied to master. Thanks! Philipp. On Tue, 5 Sept 2023 at 08:22, Jeff Law wrote: > > > On 9/1/23 04:20, Christoph Muellner wrote: > > From: Christoph Müllner > > > > Recently, these xtheadcondmov tests regressed with -Oz: > > * FAIL: gcc.target/riscv/xtheadcondmov-mveqz-imm-eqz.c > > * FAIL:

Re: RISC-V: Added support for CRC.

2023-08-16 Thread Philipp Tomsich
On Wed, 16 Aug 2023 at 21:10, Alexander Monakov wrote: > > > On Tue, 15 Aug 2023, Jeff Law wrote: > > > Because if the compiler can optimize it automatically, then the projects > > have > > to do literally nothing to take advantage of it. They just compile normally > > and their bitwise CRC

Re: [RFC PATCH v2 1/2] RISC-V: __builtin_riscv_pause for all environment

2023-08-16 Thread Philipp Tomsich
On Wed, 16 Aug 2023 at 03:27, Jeff Law via Gcc-patches wrote: > > > > On 8/9/23 20:25, Tsukasa OI wrote: > > From: Tsukasa OI > > > > The "pause" RISC-V hint instruction requires the 'Zihintpause' extension > > (in the assembler). However, GCC emits "pause" unconditionally, making > > an

Re: [RFC PATCH 0/2] RISC-V: __builtin_riscv_pause for all environment

2023-08-13 Thread Philipp Tomsich
On Sat, 12 Aug 2023 at 01:31, Jeff Law via Gcc-patches wrote: > > > > On 8/9/23 16:39, Tsukasa OI wrote: > > On 2023/08/10 5:05, Jeff Law wrote: > > >> I'd tend to think we do not want to expose the intrinsic unless the > >> right extensions are enabled -- even though the encoding is a no-op and

Re: [PATCH] cprop_hardreg: Allow more propagation of the stack pointer.

2023-08-07 Thread Philipp Tomsich
Applied to master, thanks! --Philipp. On Mon, 7 Aug 2023 at 19:20, Jeff Law wrote: > > > > On 8/7/23 05:31, Manolis Tsamis wrote: > > The stack pointer propagation fix 736f8fd3 turned out to be more restrictive > > than needed by rejecting propagation of the stack pointer when REG_POINTER > >

Re: RISC-V: Folding memory for FP + constant case

2023-08-01 Thread Philipp Tomsich
Very helpful! Looks as if regprop for stack_pointer is now either too conservative — or one of our patches is missing in everyone's test setup; we'll take a closer look. On Wed, 2 Aug 2023 at 01:03, Vineet Gupta wrote: > > > > On 8/1/23 15:07, Philipp Tomsich wrote: > &g

Re: RISC-V: Folding memory for FP + constant case

2023-08-01 Thread Philipp Tomsich
+Manolis Tsamis On Tue, 1 Aug 2023 at 23:56, Jeff Law via Gcc-patches wrote: > > > > On 8/1/23 13:14, Vineet Gupta wrote: > > > > > I have some numbers for f-m-o v3 vs this. Attached here (vs. inline to > > avoid the Thunderbird mangling the test formatting) > Thanks. Of particular importance

Re: [PATCH] RISC-V: optim const DF +0.0 store to mem [PR/110748]

2023-07-21 Thread Philipp Tomsich
On Fri, 21 Jul 2023 at 19:56, Vineet Gupta wrote: > > DF +0.0 is bitwise all zeros so int x0 store to mem can be used to optimize > it. > > void zd(double *) { *d = 0.0; } > > currently: > > | fmv.d.x fa5,zero > | fsd fa5,0(a0) > | ret > > With patch > > | sd zero,0(a0) > | ret > This

Re: [PATCH] riscv: thead: Fix failing XTheadCondMov tests (indirect-rv[32|64])

2023-07-12 Thread Philipp Tomsich
Thanks, applied to trunk! Philipp. On Wed, 12 Jul 2023 at 16:08, Jeff Law wrote: > > > On 7/12/23 08:07, Philipp Tomsich wrote: > > > > > > On Wed, 12 Jul 2023 at 16:05, Jeff Law > <mailto:jeffreya...@gmail.com>> wrote: > > > > &g

Re: [PATCH] riscv: thead: Fix failing XTheadCondMov tests (indirect-rv[32|64])

2023-07-12 Thread Philipp Tomsich
On Wed, 12 Jul 2023 at 16:05, Jeff Law wrote: > > > On 7/12/23 06:48, Christoph Müllner wrote: > > On Wed, Jul 12, 2023 at 4:05 AM Jeff Law wrote: > >> > >> > >> > >> On 7/10/23 22:44, Christoph Muellner wrote: > >>> From: Christoph Müllner > >>> > >>> Recently, two identical XTheadCondMov

Re: [PATCH 1/1] riscv: thead: Fix ICE when enable XTheadMemPair ISA extension.

2023-07-12 Thread Philipp Tomsich
Awesome, thanks! On Wed, 12 Jul 2023 at 09:18, Kito Cheng wrote: > Yeah, I've applied patches on my local tree and running the testsuite. > > On Wed, Jul 12, 2023 at 3:11 PM Philipp Tomsich > wrote: > > > > Looks like I missed the OK on this one. > > I can pic

Re: [PATCH 1/1] riscv: thead: Fix ICE when enable XTheadMemPair ISA extension.

2023-07-12 Thread Philipp Tomsich
Looks like I missed the OK on this one. I can pick it up today, unless you Kito already has it in flight? Thanks, Philipp. On Tue, 11 Jul 2023 at 17:51, Kito Cheng wrote: > Hi Christoph: > > Ooops, I thought Philipp will push those patches, does here any other > patches got approved but not

Re: [PATCH v2] tree-optimization/110279- Check for nested FMA chains in reassoc

2023-07-11 Thread Philipp Tomsich
Jakub, it looks like you did a lot of work on reassoc in the past — could you have a quick look and comment? Thanks, Philipp. On Tue, 11 Jul 2023 at 04:59, Di Zhao OS wrote: > > Attached is an updated version of the patch. > > Based on Philipp's review, some changes: > > 1. Defined new enum

Re: [PING][PATCH] tree-optimization/110279- Check for nested FMA chains in reassoc

2023-07-07 Thread Philipp Tomsich
On Fri, 7 Jul 2023 at 10:28, Di Zhao OS via Gcc-patches wrote: > > Update the patch so it can apply. > > Tested on spec2017 fprate cases again. With option "-funroll-loops -Ofast > -flto", > the improvements of 1-copy run are: > > Ampere1: > 508.namd_r 4.26% > 510.parest_r2.55%

Re: [PATCH v2] RISC-V: Add support for vector crypto extensions

2023-07-03 Thread Philipp Tomsich
Thanks, applied to master. --Philipp. On Mon, 3 Jul 2023 at 15:42, Kito Cheng wrote: > Thanks, LGTM :) > > Christoph Muellner 於 2023年7月3日 週一,19:08寫道: > >> From: Christoph Müllner >> >> This series adds basic support for the vector crypto extensions: >> * Zvbb >> * Zvbc >> * Zvkg >> * Zvkned >>

Re: [PATCH] cprop_hardreg: fix ORIGINAL_REGNO/REG_ATTRS/REG_POINTER handling

2023-06-28 Thread Philipp Tomsich
/22/23 05:11, Philipp Tomsich wrote: > > From: Manolis Tsamis > > > > Fixes: 6a2e8dcbbd4bab3 > > > > Propagation for the stack pointer in regcprop was enabled in > > 6a2e8dcbbd4bab3, but set ORIGINAL_REGNO/REG_ATTRS/REG_POINTER for > > stack_pointer_r

[COMMITTED, PR 110308] cprop_hardreg: fix ORIGINAL_REGNO/REG_ATTRS/REG_POINTER handling

2023-06-28 Thread Philipp Tomsich
mode. (maybe_copy_reg_attrs): New function. (find_oldest_value_reg): Use maybe_copy_reg_attrs. (copyprop_hardreg_forward_1): Ditto. gcc/testsuite/ChangeLog: * g++.dg/torture/pr110308.C: New test. Signed-off-by: Manolis Tsamis Signed-off-by: Philipp Tomsich

Re: [PATCH] Change fma_reassoc_width tuning for ampere1

2023-06-22 Thread Philipp Tomsich
Richard, OK for backport to GCC-13? Thanks, Philipp. On Thu, 22 Jun 2023 at 16:18, Richard Sandiford via Gcc-patches wrote: > > Di Zhao OS via Gcc-patches writes: > > This patch enables reassociation of floating-point additions on ampere1. > > This brings about 1% overall benefit on spec2017

[PATCH] cprop_hardreg: fix ORIGINAL_REGNO/REG_ATTRS/REG_POINTER handling

2023-06-22 Thread Philipp Tomsich
. (find_oldest_value_reg): Special handling of stack_pointer_rtx. (copyprop_hardreg_forward_1): Ditto. gcc/testsuite/ChangeLog: * g++.dg/torture/pr110308.C: New test. Signed-off-by: Manolis Tsamis Signed-off-by: Philipp Tomsich --- This addresses both the PRs (110308

Re: [PATCH 2/2] cprop_hardreg: Enable propagation of the stack pointer if possible.

2023-06-22 Thread Philipp Tomsich
This should be covered by PR110308 (proposed fix attached there) and PR110313. Our bootstrap runs are still in progress to confirm. On Thu, 22 Jun 2023 at 09:40, Richard Biener wrote: > > On Thu, Jun 22, 2023 at 1:42 AM Thiago Jung Bauermann > wrote: > > > > > > Hello, > > > > Jeff Law

Re: [PATCH 2/2] cprop_hardreg: Enable propagation of the stack pointer if possible.

2023-06-15 Thread Philipp Tomsich
Rebased, retested, and applied to trunk. Thanks! --Philipp. On Thu, 8 Jun 2023 at 00:18, Jeff Law wrote: > > > > On 5/25/23 06:35, Manolis Tsamis wrote: > > Propagation of the stack pointer in cprop_hardreg is currenty forbidden > > in all cases, due to maybe_mode_change returning NULL. Relax

Re: [PATCH] RISC-V: Add Veyron V1 pipeline description

2023-06-08 Thread Philipp Tomsich
mcpu for temporary before binutils support, otherwise it just a broken > > support for that CPU on trunk gcc. > I pushed the binutils bits into the repo a couple months ago: > > > commit 1656d3f8ef56a16745689c03269412988ebcaa54 > > Author: Philipp Tomsich > >

Re: [PATCH] RISC-V: Add Veyron V1 pipeline description

2023-06-08 Thread Philipp Tomsich
On Thu 8. Jun 2023 at 09:35, Kito Cheng via Gcc-patches < gcc-patches@gcc.gnu.org> wrote: > > diff --git a/gcc/config/riscv/riscv-cores.def > b/gcc/config/riscv/riscv-cores.def > > index 7d87ab7ce28..4078439e562 100644 > > --- a/gcc/config/riscv/riscv-cores.def > > +++

Re: FW: [RFC] RISC-V: Support risc-v bfloat16 This patch support bfloat16 in riscv like x86_64 and arm.

2023-06-01 Thread Philipp Tomsich
On Thu, 1 Jun 2023 at 18:49, Jeff Law via Gcc-patches wrote: > > > > On 6/1/23 01:01, juzhe.zh...@rivai.ai wrote: > > I plan to implement BF16 vector in GCC but still waiting for ISA > > ratified since GCC policy doesn't allow un-ratified ISA. > Right. So those specs need to move along further

Re: [PATCH] RISC-V: Synthesize power-of-two constants.

2023-05-30 Thread Philipp Tomsich
Assuming a fully pipelined vector unit (and from experience on AArch64), an u-arch's scalar-to-vector move cost is likely to play a significant role in whether this will be profitable or not. --Philipp. On Wed, 31 May 2023 at 00:10, Jeff Law via Gcc-patches wrote: > > > > On 5/30/23 16:01, 钟居哲

Re: [PATCH] RISC-V: Optimize TARGET_XTHEADCONDMOV

2023-05-26 Thread Philipp Tomsich
LGTM. Happy to move this forward, once it receives an OK from one of you. --Philipp. On Fri, 26 May 2023 at 02:53, Die Li wrote: > > This patch allows less instructions to be used when TARGET_XTHEADCONDMOV is > enabled. > > Provide an example from the existing testcases. > > Testcase: > int

Re: [PATCH 1/2] Implementation of new RISCV optimizations pass: fold-mem-offsets.

2023-05-25 Thread Philipp Tomsich
On Thu, 25 May 2023 at 16:14, Jeff Law via Gcc-patches wrote: > > > > On 5/25/23 07:50, Richard Biener wrote: > > On Thu, May 25, 2023 at 3:32 PM Jeff Law via Gcc-patches > > wrote: > >> > >> > >> > >> On 5/25/23 07:01, Richard Biener via Gcc-patches wrote: > >>> On Thu, May 25, 2023 at 2:36 PM

Re: [PATCH] RISC-V: Add rounding mode operand for fixed-point patterns

2023-05-15 Thread Philipp Tomsich
On Mon, 15 May 2023 at 10:18, wrote: > > From: Juzhe-Zhong > > Since we are going to have fixed-point intrinsics that are modeling rounding > mode > https://github.com/riscv-non-isa/rvv-intrinsic-doc/pull/222 > > We should have operand to specify rounding mode in fixed-point instructions. > We

Re: [PATCH v3] Add pattern to convert vector shift + bitwise and + multiply to vector compare in some cases.

2023-05-11 Thread Philipp Tomsich
Bootstrapped and reg-tested overnight for x86 and aarch64. Applied to master, thanks! Philipp. On Tue, 9 May 2023 at 09:13, Richard Biener wrote: > > On Tue, Dec 20, 2022 at 1:23 PM Manolis Tsamis > wrote: > > > > When using SWAR (SIMD in a register) techniques a comparison operation > >

Re: [RFC PATCH v1 09/10] RISC-V: Recognize xventanacondops extension

2023-04-25 Thread Philipp Tomsich
uld accept this on gcc trunk without binutils > support? > > On Sat, Apr 22, 2023 at 3:58 AM Jeff Law via Gcc-patches > wrote: > > > > > > > > On 2/10/23 15:41, Philipp Tomsich wrote: > > > This adds the xventanacondops extension to the option parsing

Re: [PATCH v1] [RFC] Improve folding for comparisons with zero in tree-ssa-forwprop.

2023-04-21 Thread Philipp Tomsich
Any guidance on the next steps for this patch? I believe that we answered all open questions, but may have missed something. With trunk open for new development, we would like to revise and land this… Thanks, Philipp. On Mon, 20 Mar 2023 at 15:02, Manolis Tsamis wrote: > > On Fri, Mar 17, 2023

Re: [PATCH v2] aarch64: disable LDP via tuning structure for -mcpu=ampere1/1a

2023-04-17 Thread Philipp Tomsich
On Mon, 17 Apr 2023 at 17:07, Kyrylo Tkachov wrote: > > > > > -Original Message- > > From: Philipp Tomsich > > Sent: Monday, April 17, 2023 11:22 AM > > To: Kyrylo Tkachov > > Cc: gcc-patches@gcc.gnu.org; Di Zhao > > Subject: Re: [PATCH

Re: [PATCH v2] aarch64: disable LDP via tuning structure for -mcpu=ampere1/1a

2023-04-17 Thread Philipp Tomsich
OK for backport? This will be all the way down to GCC10, as I just realized that we need to backport the entire ampere1/1a support to GCC10 (we stopped at GCC11 for some unexplainable reason)... Philipp. On Mon, 17 Apr 2023 at 12:20, Philipp Tomsich wrote: > > Applied to master,

Re: [PATCH v2] aarch64: disable LDP via tuning structure for -mcpu=ampere1/1a

2023-04-17 Thread Philipp Tomsich
Applied to master, thanks! Philipp. On Mon, 17 Apr 2023 at 11:56, Kyrylo Tkachov wrote: > > > > -Original Message- > > From: Philipp Tomsich > > Sent: Friday, April 14, 2023 7:06 PM > > To: gcc-patches@gcc.gnu.org > > Cc: Kyrylo Tkachov ; Philip

[PATCH v2] aarch64: disable LDP via tuning structure for -mcpu=ampere1/1a

2023-04-14 Thread Philipp Tomsich
2.47% 527.cam4_r 0.70% 538.imagick_r 0.00% 544.nab_r -0.33% 549.fotonik3d_r. -0.42% 554.roms_r 0.00% - = total 1.79% Signed-off-by: Philipp Tomsich Co-Authored-By: Di Zhao gcc/ChangeLog

Re: [PATCH] aarch64: disable LDP via tuning structure for -mcpu=ampere1

2023-04-14 Thread Philipp Tomsich
On Fri, 14 Apr 2023 at 13:02, Kyrylo Tkachov wrote: > Hi Philipp, > > From: Philipp Tomsich > Sent: Friday, April 14, 2023 11:26 AM > To: Kyrylo Tkachov > Cc: gcc-patches@gcc.gnu.org; Di Zhao > Subject: Re: [PATCH] aarch64: disable LDP via tuning structure for > -mcp

Re: [PATCH] aarch64: disable LDP via tuning structure for -mcpu=ampere1

2023-04-14 Thread Philipp Tomsich
On Fri, 14 Apr 2023 at 11:31, Philipp Tomsich wrote: > Kyrylo, > > On Fri, 14 Apr 2023 at 11:21, Kyrylo Tkachov > wrote: > > > > Hi Philipp, > > > > > -Original Message- > > > From: Philipp Tomsich > > > Sent: Friday, April 14,

Re: [PATCH] aarch64: disable LDP via tuning structure for -mcpu=ampere1

2023-04-14 Thread Philipp Tomsich
requires refactoring, as it doesn't differentiate between the load and store cases), pro/epilogue creation and mem* function expansion. Philipp. On Fri, 14 Apr 2023 at 11:31, Philipp Tomsich wrote: > > Kyrylo, > > On Fri, 14 Apr 2023 at 11:21, Kyrylo Tkachov wrote: > &

Re: [PATCH] aarch64: disable LDP via tuning structure for -mcpu=ampere1

2023-04-14 Thread Philipp Tomsich
Kyrylo, On Fri, 14 Apr 2023 at 11:21, Kyrylo Tkachov wrote: > > Hi Philipp, > > > -Original Message- > > From: Philipp Tomsich > > Sent: Friday, April 14, 2023 12:22 AM > > To: gcc-patches@gcc.gnu.org > > Cc: Kyrylo Tkachov ; Philipp Tomsich >

[PATCH] aarch64: disable LDP via tuning structure for -mcpu=ampere1

2023-04-13 Thread Philipp Tomsich
-by: Philipp Tomsich Co-Authored-By: Di Zhao gcc/ChangeLog: * config/aarch64/aarch64-tuning-flags.def (AARCH64_EXTRA_TUNING_OPTION): Add AARCH64_EXTRA_TUNE_NO_LDP_COMBINE. * config/aarch64/aarch64.cc (aarch64_operands_ok_for_ldpstp): Check for the above tuning option when

Re: [PATCH] RISC-V: avoid splitting small constant in i_extrabit pattern

2023-04-10 Thread Philipp Tomsich
On Mon, 10 Apr 2023 at 17:57, Jeff Law wrote: > > > > On 4/9/23 23:07, Lin Sinan via Gcc-patches wrote: > > From: Sinan Lin > > > > there is no need to split an xori/ori with an small constant. take the test > > case `int foo(int idx) { return idx|3; }` as an example, > > > > rv64im_zba

Re: [PATCH] aarch64: update ampere1 vectorization cost

2023-04-03 Thread Philipp Tomsich
; -Original Message- > > From: Philipp Tomsich > > Sent: Monday, March 27, 2023 9:50 AM > > To: Kyrylo Tkachov > > Cc: gcc-patches@gcc.gnu.org; Richard Sandiford > > ; Tamar Christina > > ; Manolis Tsamis > > Subject: Re: [PATCH] aarch64: update amp

Re: [PATCH] target/109296 - riscv: Add missing mode specifiers for XTheadMemPair

2023-03-27 Thread Philipp Tomsich
Applied to master, thanks! Philipp. On Mon, 27 Mar 2023 at 19:55, Kito Cheng wrote: > > OK for trunk, thanks :) > > On Mon, Mar 27, 2023 at 7:04 PM Christoph Muellner > wrote: >> >> From: Christoph Müllner >> >> This patch adds missing mode specifiers for XTheadMemPair INSNs. >> >>

Re: [PATCH] aarch64: update ampere1 vectorization cost

2023-03-27 Thread Philipp Tomsich
Applied to master, thanks! Philipp. On Mon, 27 Mar 2023 at 16:45, Kyrylo Tkachov wrote: > > Hi Philipp, > > > -Original Message- > > From: Gcc-patches > bounces+kyrylo.tkachov=arm@gcc.gnu.org> On Behalf Of Philipp > > Tomsich > > Sent: Mon

Re: [PATCH] aarch64: update ampere1 vectorization cost

2023-03-27 Thread Philipp Tomsich
On Mon, 27 Mar 2023 at 16:45, Kyrylo Tkachov wrote: > > Hi Philipp, > > > -Original Message- > > From: Gcc-patches > bounces+kyrylo.tkachov=arm@gcc.gnu.org> On Behalf Of Philipp > > Tomsich > > Sent: Monday, March 27, 2023 8:47 AM > >

[PATCH] aarch64: update ampere1 vectorization cost

2023-03-27 Thread Philipp Tomsich
: Update vector costs for ampere1. Co-Authored-By: Manolis Tsamis Signed-off-by: Philipp Tomsich --- We would like to get this into GCC 13 to avoid having to backport at the start of the next cycle. OK for backports? gcc/config/aarch64/aarch64.cc | 12 ++-- 1 file changed, 6 insertions

Re: [PATCH v1] [RFC] Improve folding for comparisons with zero in tree-ssa-forwprop.

2023-03-17 Thread Philipp Tomsich
On Fri, 17 Mar 2023 at 09:31, Richard Biener wrote: > > On Thu, Mar 16, 2023 at 4:27 PM Manolis Tsamis > wrote: > > > > For this C testcase: > > > > void g(); > > void f(unsigned int *a) > > { > > if (++*a == 1) > > g(); > > } > > > > GCC will currently emit a comparison with 1 by using

Re: [PATCH v1] [RFC] Improve folding for comparisons with zero in tree-ssa-forwprop.

2023-03-16 Thread Philipp Tomsich
Just to add a bit more color on this one... It was originally observed (and isolated from) _ZN11xalanc_1_1027XalanReferenceCountedObject12addReferenceEPS0_ and reproduces both for AArch64 and RISC-V. The basic block (annotated with dynamic instructions executed and percentage of total dynamic

Re: [wwwdocs] gcc-13: riscv: Document the T-Head CPU support

2023-03-15 Thread Philipp Tomsich
Applied to master, thanks! Philipp. On Sun, 5 Mar 2023 at 11:18, Kito Cheng wrote: > LGTM :) > > > On Fri, Feb 24, 2023 at 7:19 PM Christoph Muellner > wrote: > > > > From: Christoph Müllner > > > > This patch documents the new T-Head CPU support for RISC-V. > > > > Signed-off-by: Christoph

Re: [PATCH v4 0/9] RISC-V: Add XThead* extension support

2023-03-15 Thread Philipp Tomsich
On Sun, 5 Mar 2023 at 11:19, Kito Cheng wrote: > LGTM :) > Applied to master, thanks! --Philipp. On Thu, Mar 2, 2023 at 4:36 PM Christoph Muellner > wrote: > > > > From: Christoph Müllner > > > > This series introduces support for the T-Head specific RISC-V ISA > extensions > > which are

Re: [PATCH] RISC-V: costs: miscomputed shiftadd_cost triggering synth_mult [PR/108987]

2023-03-01 Thread Philipp Tomsich
> > gcc/Changelog: > > * config/riscv/riscv.cc (riscv_rtx_costs): Fixed IN_RANGE() to > use exact_log2(). > > gcc/testsuite/ChangeLog: > > * gcc.target/riscv/zba-shNadd-07.c: f2(i*783) now generates MUL vs. > 5 insn sh1add+slli+add+slli+sub. > * gcc.target/riscv/pr108987.c: New test. > > Signed-off-by: Vineet Gupta Reviewed-by: Philipp Tomsich

Re: [PATCH] RISC-V: Fix wrong partial subreg check for bsetidisi

2023-02-28 Thread Philipp Tomsich
On Tue, 28 Feb 2023 at 06:00, Lin Sinan wrote: > > From: Lin Sinan > > The partial subreg check should be for subreg operand(operand 1) instead of > the immediate operand(operand 2). This change also fix pr68648.c in zbs. Good catch. Reviewed-by:

[RFC PATCH v1 10/10] RISC-V: Support XVentanaCondOps extension

2023-02-10 Thread Philipp Tomsich
/xventanacondops-ne-03.c: New test. * gcc.target/riscv/xventanacondops-ne-04.c: New test. * gcc.target/riscv/xventanacondops-xor-01.c: New test. Signed-off-by: Philipp Tomsich --- gcc/config/riscv/riscv.cc | 4 +-- gcc/config/riscv/riscv.md

[RFC PATCH v1 07/10] RISC-V: Recognize bexti in negated if-conversion

2023-02-10 Thread Philipp Tomsich
to "bexti + addi". Signed-off-by: Philipp Tomsich --- gcc/config/riscv/zicond.md | 10 ++ 1 file changed, 10 insertions(+) diff --git a/gcc/config/riscv/zicond.md b/gcc/config/riscv/zicond.md index 15fdaa539f1..0aad61c7009 100644 --- a/gcc/config/riscv/zicond.md +++ b/gcc/

[RFC PATCH v1 08/10] ifcvt: add if-conversion to conditional-zero instructions

2023-02-10 Thread Philipp Tomsich
New test. * gcc.target/riscv/xventanacondops-xor-01.c: New test. Signed-off-by: Philipp Tomsich --- gcc/ifcvt.cc | 216 ++ .../gcc.target/riscv/zicond-and-01.c | 16 ++ .../gcc.target/riscv/zicond-and-02.c | 15 ++

[RFC PATCH v1 06/10] RISC-V: Recognize sign-extract + and cases for czero.eqz/nez

2023-02-10 Thread Philipp Tomsich
t. Signed-off-by: Philipp Tomsich --- gcc/config/riscv/zicond.md| 45 +++ gcc/testsuite/gcc.target/riscv/zicond-le-01.c | 16 +++ 2 files changed, 61 insertions(+) create mode 100644 gcc/testsuite/gcc.target/riscv/zicond-le-01.c diff --git a/gcc/config/riscv/z

[RFC PATCH v1 04/10] RISC-V: Support immediates in Zicond

2023-02-10 Thread Philipp Tomsich
/czero.nez through a splitter. gcc/testsuite/ChangeLog: * gcc.target/riscv/zicond-ifconv-imm.c: New test. Signed-off-by: Philipp Tomsich --- gcc/config/riscv/zicond.md| 20 +++ .../gcc.target/riscv/zicond-ifconv-imm.c | 19 ++ 2 files

[RFC PATCH v1 05/10] RISC-V: Support noce_try_store_flag_mask as czero.eqz/czero.nez

2023-02-10 Thread Philipp Tomsich
g/riscv/zicond.md: Add split to wrap an an order-operator suitably for generating czero.eqz/nez gcc/testsuite/ChangeLog: * gcc.target/riscv/zicond-le-02.c: New test. * gcc.target/riscv/zicond-lt-03.c: New test. Signed-off-by: Philipp Tomsich --- gcc/config/riscv/predic

[RFC PATCH v1 09/10] RISC-V: Recognize xventanacondops extension

2023-02-10 Thread Philipp Tomsich
scv-opts.h (MASK_XVENTANACONDOPS): Define. (TARGET_XVENTANACONDOPS): Define. * config/riscv/riscv.opt: Add "riscv_xventanacondops". Signed-off-by: Philipp Tomsich --- gcc/common/config/riscv/riscv-common.cc | 2 ++ gcc/config/riscv/riscv-opts.h | 3 +++ gcc/config/riscv/riscv.

[RFC PATCH v1 00/10] RISC-V: Support the Zicond (conditional-operations) extension

2023-02-10 Thread Philipp Tomsich
2017. Philipp Tomsich (10): docs: Document a canonical RTL for a conditional-zero insns RISC-V: Recognize Zicond (conditional operations) extension RISC-V: Generate czero.eqz/nez on noce_try_store_flag_mask if-conversion RISC-V: Support immediates in Zicond RISC-V: Support

[RFC PATCH v1 03/10] RISC-V: Generate czero.eqz/nez on noce_try_store_flag_mask if-conversion

2023-02-10 Thread Philipp Tomsich
-zero as a single instruction for TARGET_ZICOND * config/riscv/riscv.md: Include zicond.md. * config/riscv/zicond.md: New file. gcc/testsuite/ChangeLog: * gcc.target/riscv/zicond-ne-03.c: New test. * gcc.target/riscv/zicond-ne-04.c: New test. Signed-off-by: Philipp

[RFC PATCH v1 01/10] docs: Document a canonical RTL for a conditional-zero insns

2023-02-10 Thread Philipp Tomsich
On RISC-V, conditional-zero (i.e., move a register value or zero to a destination register) instructions are part if the Zicond extension. To support architectures that have similar constructs, we define a canonical RTL representation that can be used in if-conversion. Signed-off-by: Philipp

[RFC PATCH v1 02/10] RISC-V: Recognize Zicond (conditional operations) extension

2023-02-10 Thread Philipp Tomsich
Signed-off-by: Philipp Tomsich --- gcc/common/config/riscv/riscv-common.cc | 3 +++ gcc/config/riscv/riscv-opts.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/gcc/common/config/riscv/riscv-common.cc b/gcc/common/config/riscv/riscv-common.cc index 787674003cb..999e1926db1 100644

Re: [PATCH V1 1/1] UNRATIFIED RISC-V: Add 'ZiCond' extension

2023-02-09 Thread Philipp Tomsich
Just a quick heads-up to avoid duplication of work: we have a series queued up for later this week (right now, SPEC2017 is still running for QA purposes) that adds if-conversion support and converts that into Zicond operations. It doesn't have much overlap (except handling the "zicond" flag), as

[PATCH, COMMITTED] PR target/108589 - Check REG_P for AARCH64_FUSE_ADDSUB_2REG_CONST1

2023-01-31 Thread Philipp Tomsich
(aarch_macro_fusion_pair_p): Check REG_P on SET_DEST. gcc/testsuite/ChangeLog: * gcc.target/aarch64/pr108589.c: New test. Signed-off-by: Philipp Tomsich --- gcc/config/aarch64/aarch64.cc | 1 + gcc/testsuite/gcc.target/aarch64/pr108589.c | 15 +++ 2 files

Re: [PATCH] aarch64: Update Ampere-1A (-mcpu=ampere1a) to include SM4

2023-01-30 Thread Philipp Tomsich
On Mon, 30 Jan 2023 at 15:18, Kyrylo Tkachov wrote: > > > > > -Original Message- > > From: Gcc-patches > bounces+kyrylo.tkachov=arm@gcc.gnu.org> On Behalf Of Philipp > > Tomsich > > Sent: Saturday, January 28, 2023 11:12 PM > > To: g

[PATCH] aarch64: Update Ampere-1A (-mcpu=ampere1a) to include SM4

2023-01-28 Thread Philipp Tomsich
gcc/ChangeLog: * config/aarch64/aarch64-cores.def (AARCH64_CORE): Update ampere1a to include SM4. Signed-off-by: Philipp Tomsich --- gcc/config/aarch64/aarch64-cores.def | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/aarch64/aarch64-cores.def b

Re: [PATCH] RISC-V: Optimize min/max with SImode sources on 64-bit

2022-12-29 Thread Philipp Tomsich
On Wed, 28 Dec 2022 at 19:18, Raphael Moreira Zinsly < rzin...@ventanamicro.com> wrote: > The Zbb min/max pattern was not matching 32-bit sources when > compiling for 64-bit. > This patch separates the pattern into SImode and DImode, and > use a define_expand to handle SImode on 64-bit. >

Re: [PATCH v2 02/11] riscv: Restructure callee-saved register save/restore code

2022-12-27 Thread Philipp Tomsich
Applied to master (with the change from the reviews), thanks! Philipp. On Mon, 19 Dec 2022 at 07:30, Kito Cheng wrote: > just one more nit: Use INVALID_REGNUM as sentinel value for > riscv_next_saved_reg, otherwise LGTM, and feel free to commit that > separately :) > > On Mon, Dec 19, 2022 at

  1   2   3   4   >