Re: [PATCH] RISC-V: Allow RVV VMS{Compare}(V1, V1) simplify to VMCLR

2023-04-27 Thread Kito Cheng via Gcc-patches
ce is that it will act on combine pass which is more generic > than the PATCH v1 (which acts on split2 pass). > > Pan > > -Original Message- > From: Kito Cheng > Sent: Thursday, April 27, 2023 11:00 PM > To: Li, Pan2 > Cc: gcc-patches@gcc.gnu.org; juzhe.zh...@ri

RE: [PATCH] RISC-V: Allow RVV VMS{Compare}(V1, V1) simplify to VMCLR

2023-04-27 Thread Li, Pan2 via Gcc-patches
2023 11:00 PM To: Li, Pan2 Cc: gcc-patches@gcc.gnu.org; juzhe.zh...@rivai.ai; Wang, Yanzhang Subject: Re: [PATCH] RISC-V: Allow RVV VMS{Compare}(V1, V1) simplify to VMCLR > Could you try something like this? that should be more generic: > > (define_split > [(set (match_operand:VB

Re: [PATCH] RISC-V: Allow RVV VMS{Compare}(V1, V1) simplify to VMCLR

2023-04-27 Thread Kito Cheng via Gcc-patches
> Could you try something like this? that should be more generic: > > (define_split > [(set (match_operand:VB 0 "register_operand") >(if_then_else:VB > (unspec:VB >[(match_operand:VB 1 "vector_all_trues_mask_operand") > (match_operand 4 "vector_length_opera

Re: [PATCH] RISC-V: Allow RVV VMS{Compare}(V1, V1) simplify to VMCLR

2023-04-27 Thread Kito Cheng via Gcc-patches
> +(define_split > + [(set (match_operand: 0 "register_operand") > + (if_then_else: > + (unspec: > + [(match_operand: 1 "vector_all_trues_mask_operand") > +(match_operand 6 "vector_length_operand") > +(match_operand 7 "const_int_operand") >

[PATCH] RISC-V: Allow RVV VMS{Compare}(V1, V1) simplify to VMCLR

2023-04-27 Thread Pan Li via Gcc-patches
From: Pan Li When some RVV integer compare operators act on the same vector registers without mask. They can be simplified to VMCLR. This PATCH allow the ne, lt, ltu, gt, gtu to perform such kind of the simplification by adding one new define_split. Given we have: vbool1_t test_shortcut_for_ris