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 22:57:34 +0800 [thread overview]
Message-ID: <CALLt3Thec8qeArDPybrY+QWMa2CY5uKi-HFJjOPQ+e0HRdemYA@mail.gmail.com> (raw)
In-Reply-To: <20230427143005.1781966-1-pan2.li@intel.com>
> +(define_split
> + [(set (match_operand:<VM> 0 "register_operand")
> + (if_then_else:<VM>
> + (unspec:<VM>
> + [(match_operand:<VM> 1 "vector_all_trues_mask_operand")
> + (match_operand 6 "vector_length_operand")
> + (match_operand 7 "const_int_operand")
> + (match_operand 8 "const_int_operand")
> + (reg:SI VL_REGNUM)
> + (reg:SI VTYPE_REGNUM)] UNSPEC_VPREDICATE)
> + (match_operator:<VM> 3 "comparison_simplify_to_clear_operator"
> + [(match_operand:VI 4 "register_operand")
> + (match_operand:VI 5 "vector_arith_operand")])
> + (match_operand:<VM> 2 "vector_merge_operand")))]
> + "TARGET_VECTOR && reload_completed && operands[4] == operands[5]"
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"
[(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;
}
)
next prev parent reply other threads:[~2023-04-27 14:57 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 [this message]
2023-04-27 15:00 ` Kito Cheng
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=CALLt3Thec8qeArDPybrY+QWMa2CY5uKi-HFJjOPQ+e0HRdemYA@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).