public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "juzhe.zhong at rivai dot ai" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/110751] RISC-V: Suport undefined value that allows VSETVL PASS use TA/MA
Date: Tue, 12 Sep 2023 16:31:20 +0000 [thread overview]
Message-ID: <bug-110751-4-3WfaIfgoog@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-110751-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110751
--- Comment #29 from JuzheZhong <juzhe.zhong at rivai dot ai> ---
(In reply to JuzheZhong from comment #27)
> (In reply to rsandifo@gcc.gnu.org from comment #26)
> > But this is how technical debt builds up. We'd be making a change
> > that doesn't match the type system, and that we know to be wrong
> > in principle. And we'd be making it with no realistic prospect
> > that it will be cleaned up later.
> >
> > > Yes. I am also worrying about GIMPLE_FOLD stuff will check all arguments
> > > type are compatible for COND_LEN_xxx in the future (Currently, it's obviously
> > > not checking this). Then, it will cause ICE.
> >
> > Yeah. But like I say, I don't think that's the most worrying
> > scenario. For me the most worrying scenario is that a match.pd
> > fold will say that:
> >
> > (cond_len all-false a b c len bias)
> >
> > folds to c without checking whether c is compatible with the return
> > type. And IMO it shouldn't need to check that the type is compatible.
> >
> > If a rule like that triggers after this patch goes in, the pressure
> > will be to continue to support the hack and add workarounds for it.
>
> Thanks Richard a lot.
>
> But I don't think we need to worry about the fold COND_LEN into
> the ELSE_VALUE.
>
> Let's back to the previous comments you gave for COND_LEN_xxx:
> https://gcc.gnu.org/pipermail/gcc-patches/2023-July/625396.html
>
> Following your suggestions, I support cond_len_xxx by following your (1):
>
> (1) RVV implements cond_* optabs as expanders. RVV therefore supports
> both IFN_COND_ADD and IFN_COND_LEN_ADD. No dummy length arguments
> are needed at the gimple level.
>
> I use this approach to support COND_LEN_xxx since last time you have
> mentioned
> we will need more work in GIMPLE FOLD and other things.
>
> To simplify the implementation of COND_LEN_xxx. We support both COND_XXX and
> COND_LEN_XXX in RISC-V backend.
>
> We don't have COND_LEN_xxx with dummy length (All dummy length case will go
> back to COND_XXX). So we forbid the case that FOLD COND_LEN_xxx into ELSE
> value since COND_LEN_xxx is built always with a meaning length.
>
> The only GIMPLE FOLD optimization of COND_LEN_XXX is operations fusion,
> meaning
> FOLD cond_len_mult + cond_len_add into ==> cond_len_fma. That's what I am
> worry about. But currently it works fine (I have tests to test that).
Sorry. I am wrong about the comments.
The COND_LEN_xxx for GIMPLE FOLD should be like:
NEG + COND_LEN_FMA -> COND_LEN_FNMA ....etc operations fusion.
And since the length is never a dummy length (we always use COND_XXX to build
for dummy length situation), we forbid COND_LEN_xxx into any argument in FOLD.
next prev parent reply other threads:[~2023-09-12 16:31 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-20 9:03 [Bug target/110751] New: " xuli1 at eswincomputing dot com
2023-07-20 9:10 ` [Bug target/110751] " juzhe.zhong at rivai dot ai
2023-07-20 9:30 ` rguenth at gcc dot gnu.org
2023-07-20 9:37 ` rguenth at gcc dot gnu.org
2023-07-20 9:58 ` kito at gcc dot gnu.org
2023-07-20 11:28 ` rguenther at suse dot de
2023-07-20 11:43 ` juzhe.zhong at rivai dot ai
2023-07-20 12:00 ` juzhe.zhong at rivai dot ai
2023-07-20 12:35 ` rguenther at suse dot de
2023-07-20 12:42 ` juzhe.zhong at rivai dot ai
2023-07-20 12:45 ` rguenther at suse dot de
2023-07-20 12:50 ` juzhe.zhong at rivai dot ai
2023-07-20 12:56 ` rguenther at suse dot de
2023-07-20 13:29 ` rsandifo at gcc dot gnu.org
2023-07-20 13:32 ` rguenther at suse dot de
2023-07-20 22:03 ` juzhe.zhong at rivai dot ai
2023-07-21 1:53 ` xuli1 at eswincomputing dot com
2023-07-21 6:17 ` rguenth at gcc dot gnu.org
2023-07-21 12:47 ` rsandifo at gcc dot gnu.org
2023-07-21 12:53 ` rguenth at gcc dot gnu.org
2023-07-21 13:23 ` rsandifo at gcc dot gnu.org
2023-07-24 6:20 ` rguenther at suse dot de
2023-07-25 7:05 ` juzhe.zhong at rivai dot ai
2023-09-12 11:44 ` juzhe.zhong at rivai dot ai
2023-09-12 14:24 ` rsandifo at gcc dot gnu.org
2023-09-12 14:53 ` juzhe.zhong at rivai dot ai
2023-09-12 15:59 ` rsandifo at gcc dot gnu.org
2023-09-12 16:21 ` juzhe.zhong at rivai dot ai
2023-09-12 16:27 ` juzhe.zhong at rivai dot ai
2023-09-12 16:31 ` juzhe.zhong at rivai dot ai [this message]
2023-09-12 22:44 ` juzhe.zhong at rivai dot ai
2023-09-13 7:56 ` rguenth at gcc dot gnu.org
2023-09-13 8:34 ` juzhe.zhong at rivai dot ai
2023-09-13 8:39 ` juzhe.zhong at rivai dot ai
2023-09-13 9:38 ` rguenth at gcc dot gnu.org
2023-09-13 9:39 ` rguenth at gcc dot gnu.org
2023-09-13 9:48 ` juzhe.zhong at rivai dot ai
2023-09-13 9:48 ` juzhe.zhong at rivai dot ai
2023-09-13 10:15 ` rguenther at suse dot de
2023-09-13 22:39 ` rsandifo at gcc dot gnu.org
2023-09-14 8:53 ` juzhe.zhong at rivai dot ai
2023-09-14 9:15 ` richard.sandiford at arm dot com
2023-09-20 16:27 ` cvs-commit at gcc dot gnu.org
2023-09-21 9:13 ` cvs-commit at gcc dot gnu.org
2023-09-21 9:28 ` juzhe.zhong at rivai dot ai
2023-09-22 7:31 ` xuli1 at eswincomputing dot com
2023-09-22 7:33 ` xuli1 at eswincomputing dot com
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=bug-110751-4-3WfaIfgoog@http.gcc.gnu.org/bugzilla/ \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@gcc.gnu.org \
/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).