public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Kito Cheng <kito.cheng@sifive.com>
To: pan2.li@intel.com
Cc: gcc-patches@gcc.gnu.org, juzhe.zhong@rivai.ai, yanzhang.wang@intel.com
Subject: Re: [PATCH] RISC-V: Allow RVV VMS{Compare}(V1, V1) simplify to VMCLR
Date: Thu, 27 Apr 2023 23:00:21 +0800	[thread overview]
Message-ID: <CALLt3TiPbUUpQxcxO+PcB5yhpf+NTgv7bgab-rOTTKyZWoCoYw@mail.gmail.com> (raw)
In-Reply-To: <CALLt3Thec8qeArDPybrY+QWMa2CY5uKi-HFJjOPQ+e0HRdemYA@mail.gmail.com>

> 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_operand")
>             (match_operand 5 "const_int_operand")
>             (match_operand 6 "const_int_operand")
>             (reg:SI VL_REGNUM)
>             (reg:SI VTYPE_REGNUM)] UNSPEC_VPREDICATE)
>          (match_operand:VB 3 "vector_move_operand")
>          (match_operand:VB 2 "vector_undef_operand")))]
>  "TARGET_VECTOR && reload_completed"

Remove the reload_completed should work well, but you might need more
test, I didn't run full test on this change :P

>  [(const_int 0)]
>  {
>    emit_insn (gen_pred_mov (<MODE>mode, operands[0], CONST1_RTX (<MODE>mode),
>                             RVV_VUNDEF (<MODE>mode), CONST0_RTX (<MODE>mode),
>                             operands[4], operands[5]));
>    DONE;
>  }
> )

  reply	other threads:[~2023-04-27 15:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-27 14:30 pan2.li
2023-04-27 14:57 ` Kito Cheng
2023-04-27 15:00   ` Kito Cheng [this message]
2023-04-28  2:06     ` Li, Pan2
2023-04-28  6:35       ` Kito Cheng
2023-04-28  2:46 ` [PATCH v2] " pan2.li
2023-04-28  6:40   ` Kito Cheng
2023-04-28  6:45     ` Li, Pan2
2023-04-28  9:14       ` Li, Pan2
2023-04-28 12:36         ` Kito Cheng
2023-04-28 13:04           ` Li, Pan2

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CALLt3TiPbUUpQxcxO+PcB5yhpf+NTgv7bgab-rOTTKyZWoCoYw@mail.gmail.com \
    --to=kito.cheng@sifive.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=juzhe.zhong@rivai.ai \
    --cc=pan2.li@intel.com \
    --cc=yanzhang.wang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).