RE: Re: [PATCH] RISC-V: Allow VMS{Compare} (V1, V1) shortcut optimization

2023-04-25 Thread Li, Pan2 via Gcc-patches
.com>>; Jeff Law mailto:jeffreya...@gmail.com>>; juzhe.zh...@rivai.ai<mailto:juzhe.zh...@rivai.ai>; gcc-patches mailto:gcc-patches@gcc.gnu.org>>; Wang, Yanzhang mailto:yanzhang.w...@intel.com>> Subject: Re: Re: [PATCH] RISC-V: Allow VMS{Compare} (V1, V1) shortcut opt

RE: Re: [PATCH] RISC-V: Allow VMS{Compare} (V1, V1) shortcut optimization

2023-04-25 Thread Li, Pan2 via Gcc-patches
h...@rivai.ai<mailto:juzhe.zh...@rivai.ai>; gcc-patches > mailto:gcc-patches@gcc.gnu.org>>; > Kito.cheng mailto:kito.ch...@sifive.com>>; Wang, > Yanzhang > mailto:yanzhang.w...@intel.com>> > Subject: Re: Re: [PATCH] RISC-V: Allow VMS{Compare} (V1, V1) shortcut &

Re: Re: [PATCH] RISC-V: Allow VMS{Compare} (V1, V1) shortcut optimization

2023-04-25 Thread Kito Cheng via Gcc-patches
: Li, Pan2 ; Jeff Law > Cc: juzhe.zh...@rivai.ai; gcc-patches ; > Kito.cheng ; Wang, Yanzhang < > yanzhang.w...@intel.com> > Subject: Re: Re: [PATCH] RISC-V: Allow VMS{Compare} (V1, V1) shortcut > optimization > > Second thought on this, we should just add define_split rather t

RE: Re: [PATCH] RISC-V: Allow VMS{Compare} (V1, V1) shortcut optimization

2023-04-25 Thread Li, Pan2 via Gcc-patches
g the decision? Thanks in advance! Pan -Original Message- From: Kito Cheng Sent: Tuesday, April 25, 2023 9:08 PM To: Li, Pan2 ; Jeff Law Cc: juzhe.zh...@rivai.ai; gcc-patches ; Kito.cheng ; Wang, Yanzhang Subject: Re: Re: [PATCH] RISC-V: Allow VMS{Compare} (V1, V1) shortcut optimiz

Re: Re: [PATCH] RISC-V: Allow VMS{Compare} (V1, V1) shortcut optimization

2023-04-25 Thread Kito Cheng via Gcc-patches
--- > From: Kito Cheng > Sent: Friday, April 21, 2023 9:02 PM > To: Li, Pan2 > Cc: juzhe.zh...@rivai.ai; gcc-patches ; Kito.cheng > ; Wang, Yanzhang > Subject: Re: Re: [PATCH] RISC-V: Allow VMS{Compare} (V1, V1) shortcut > optimization > > Hi Pan: > > One ide

RE: Re: [PATCH] RISC-V: Allow VMS{Compare} (V1, V1) shortcut optimization

2023-04-21 Thread Li, Pan2 via Gcc-patches
PM To: Li, Pan2 Cc: juzhe.zh...@rivai.ai; gcc-patches ; Kito.cheng ; Wang, Yanzhang Subject: Re: Re: [PATCH] RISC-V: Allow VMS{Compare} (V1, V1) shortcut optimization Hi Pan: One idea come to my mind, maybe we should add a new define_insn_and_split pattern instead of change @pred_mov On Fri, A

Re: Re: [PATCH] RISC-V: Allow VMS{Compare} (V1, V1) shortcut optimization

2023-04-21 Thread Kito Cheng via Gcc-patches
--Original Message- > From: Kito Cheng > Sent: Friday, April 21, 2023 6:17 PM > To: Li, Pan2 > Cc: juzhe.zh...@rivai.ai; gcc-patches ; Kito.cheng > ; Wang, Yanzhang > Subject: Re: Re: [PATCH] RISC-V: Allow VMS{Compare} (V1, V1) shortcut > optimization > > I got a bunch

RE: Re: [PATCH] RISC-V: Allow VMS{Compare} (V1, V1) shortcut optimization

2023-04-21 Thread Li, Pan2 via Gcc-patches
e.zh...@rivai.ai' > > Cc: 'gcc-patches' ; 'Kito.cheng' > ; Wang, Yanzhang > Subject: RE: Re: [PATCH] RISC-V: Allow VMS{Compare} (V1, V1) shortcut > optimization > > Update the Patch v2 for more detail information for clarification. Please > h

Re: Re: [PATCH] RISC-V: Allow VMS{Compare} (V1, V1) shortcut optimization

2023-04-21 Thread Kito Cheng via Gcc-patches
; > > Cc: 'gcc-patches' ; 'Kito.cheng' > ; Wang, Yanzhang > Subject: RE: Re: [PATCH] RISC-V: Allow VMS{Compare} (V1, V1) shortcut > optimization > > Update the Patch v2 for more detail information for clarification. Please > help to review continuously

RE: Re: [PATCH] RISC-V: Allow VMS{Compare} (V1, V1) shortcut optimization

2023-04-21 Thread Li, Pan2 via Gcc-patches
s' ; 'Kito.cheng' ; Wang, Yanzhang Subject: RE: Re: [PATCH] RISC-V: Allow VMS{Compare} (V1, V1) shortcut optimization Update the Patch v2 for more detail information for clarification. Please help to review continuously. https://gcc.gnu.org/pipermail/gcc-patches/2023-April/616175.html

RE: Re: [PATCH] RISC-V: Allow VMS{Compare} (V1, V1) shortcut optimization

2023-04-19 Thread Li, Pan2 via Gcc-patches
Cc: gcc-patches ; Kito.cheng ; Wang, Yanzhang Subject: RE: Re: [PATCH] RISC-V: Allow VMS{Compare} (V1, V1) shortcut optimization Sure thing. For Changlog, I consider it was generated automatically in previous. LOL. Pan -Original Message- From: Kito Cheng Sent: Wednesday, April 19

RE: Re: [PATCH] RISC-V: Allow VMS{Compare} (V1, V1) shortcut optimization

2023-04-19 Thread Li, Pan2 via Gcc-patches
: Allow VMS{Compare} (V1, V1) shortcut optimization HI JuZhe: Thanks for explaining! Hi Pan: I think that would be helpful if JuZhe's explaining that could be written into the commit log. > gcc/ChangeLog: > >* config/riscv/riscv-v.cc (emit_pred_op): >* config/r

Re: Re: [PATCH] RISC-V: Allow VMS{Compare} (V1, V1) shortcut optimization

2023-04-19 Thread Kito Cheng via Gcc-patches
HI JuZhe: Thanks for explaining! Hi Pan: I think that would be helpful if JuZhe's explaining that could be written into the commit log. > gcc/ChangeLog: > >* config/riscv/riscv-v.cc (emit_pred_op): >* config/riscv/riscv-vector-builtins-bases.cc: >* config/riscv/vector.

Re: Re: [PATCH] RISC-V: Allow VMS{Compare} (V1, V1) shortcut optimization

2023-04-19 Thread juzhe.zh...@rivai.ai
). juzhe.zh...@rivai.ai From: Kito Cheng Date: 2023-04-19 17:34 To: Li, Pan2 CC: gcc-patches@gcc.gnu.org; juzhe.zh...@rivai.ai; kito.ch...@sifive.com; Wang, Yanzhang Subject: Re: [PATCH] RISC-V: Allow VMS{Compare} (V1, V1) shortcut optimization Hi Pan: >rtx expand (function_expander

Re: [PATCH] RISC-V: Allow VMS{Compare} (V1, V1) shortcut optimization

2023-04-19 Thread Kito Cheng via Gcc-patches
Hi Pan: >rtx expand (function_expander &e) const override diff --git > a/gcc/config/riscv/vector.md b/gcc/config/riscv/vector.md index > 0ecca98f20c..6819363b9ff 100644 > --- a/gcc/config/riscv/vector.md > +++ b/gcc/config/riscv/vector.md > @@ -1032,6 +1032,7 @@ (define_insn_and_split "@pred

RE: [PATCH] RISC-V: Allow VMS{Compare} (V1, V1) shortcut optimization

2023-04-19 Thread Li, Pan2 via Gcc-patches
Passed the X86 bootstrap and regression tests. Pan -Original Message- From: Li, Pan2 Sent: Wednesday, April 19, 2023 11:21 AM To: gcc-patches@gcc.gnu.org Cc: juzhe.zh...@rivai.ai; kito.ch...@sifive.com; Wang, Yanzhang ; Li, Pan2 Subject: [PATCH] RISC-V: Allow VMS{Compare} (V1, V1

[PATCH] RISC-V: Allow VMS{Compare} (V1, V1) shortcut optimization

2023-04-18 Thread Pan Li via Gcc-patches
From: Pan Li This patch try to adjust the RISC-V Vector RTL for the generic shortcut optimization for RVV integer compare. It includes compare operator eq, ne, ltu, lt, leu, le, gtu, gt, geu and ge. Assume we have below test code. vbool1_t test_shortcut_for_riscv_vmslt_case_0(vint8m8_t v1, size_