From: Tamar Christina <Tamar.Christina@arm.com>
To: "juzhe.zhong@rivai.ai" <juzhe.zhong@rivai.ai>,
gcc-patches <gcc-patches@gcc.gnu.org>
Cc: Richard Biener <richard.guenther@gmail.com>
Subject: RE: [PATCH 9/21]middle-end: implement vectorizable_early_exit for codegen of exit code
Date: Thu, 30 Nov 2023 10:39:01 +0000 [thread overview]
Message-ID: <VI1PR08MB5325C29CFFD1BC181D91D0CAFF82A@VI1PR08MB5325.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <89C8628C386F5A27+202311301147320402275@rivai.ai>
[-- Attachment #1: Type: text/plain, Size: 2114 bytes --]
Hi Juzhe,
I'm happy to take the hunks, just that I can't test it and don't know the specifics of how it lens work.
I still need to read up on it.
I tried adding that chunk in, but for the first bit `lens` seems undefined, and the second bit it seems `bias` is undefined.
I'll also need what to do for vectorizable_live_operations how to get the first element rather than the last.
Thanks,
Tamar
From: juzhe.zhong@rivai.ai <juzhe.zhong@rivai.ai>
Sent: Thursday, November 30, 2023 4:48 AM
To: gcc-patches <gcc-patches@gcc.gnu.org>
Cc: Richard Biener <richard.guenther@gmail.com>; Tamar Christina <Tamar.Christina@arm.com>
Subject: [PATCH 9/21]middle-end: implement vectorizable_early_exit for codegen of exit code
Hi, Richard and Tamar.
I am sorry for bothering you.
Hope you don't mind I give some comments:
Can we support partial vector for length ?
IMHO, we can do that as follows:
bool length_loop_p = LOOP_VINFO_FULLY_WITH_LENGTH_P (loop_vinfo);
if (LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P (loop_vinfo))
{
if (direct_internal_fn_supported_p (IFN_VCOND_MASK_LEN, vectype,
OPTIMIZE_FOR_SPEED))
vect_record_loop_len (loop_vinfo, lens, ncopies, vectype, 1);
else
vect_record_loop_mask (loop_vinfo, masks, ncopies, truth_type, NULL);
}
if (length_loop_p)
{
tree len = vect_get_loop_len (loop_vinfo, gsi, loop_lens, 1, vectype, 0, 0);
/* Use VCOND_MASK_LEN (all true, cond, all false, len, bias) to generate
final mask = i < len + bias ? cond[i] : false. */
cond = gimple_build (&cond_gsi, IFN_VCOND_MASK_LEN, truth_type,
all true mask, cond, all false mask, len, bias);
}
else if (masked_loop_p)
{
tree mask
= vect_get_loop_mask (loop_vinfo, gsi, masks, ncopies, truth_type, 0);
cond
= prepare_vec_mask (loop_vinfo, TREE_TYPE (mask), mask, cond, &cond_gsi);
}
This is a prototype. Is this idea reasonable to Richi ?
Thanks.
________________________________
juzhe.zhong@rivai.ai<mailto:juzhe.zhong@rivai.ai>
next prev parent reply other threads:[~2023-11-30 10:39 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-30 3:47 juzhe.zhong
2023-11-30 10:39 ` Tamar Christina [this message]
2023-11-30 10:48 ` juzhe.zhong
2023-11-30 10:58 ` Tamar Christina
-- strict thread matches above, loose matches on Subject: below --
2023-06-28 13:40 [PATCH v5 0/19] Support early break/return auto-vectorization Tamar Christina
2023-11-06 7:39 ` [PATCH 9/21]middle-end: implement vectorizable_early_exit for codegen of exit code Tamar Christina
2023-11-27 22:49 ` Tamar Christina
2023-11-29 13:50 ` Richard Biener
2023-12-06 4:37 ` Tamar Christina
2023-12-06 9:37 ` Richard Biener
2023-12-08 8:58 ` Tamar Christina
2023-12-08 10:28 ` Richard Biener
2023-12-08 13:45 ` Tamar Christina
2023-12-08 13:59 ` Richard Biener
2023-12-08 15:01 ` Tamar Christina
2023-12-11 7:09 ` Tamar Christina
2023-12-11 9:36 ` Richard Biener
2023-12-11 23:12 ` Tamar Christina
2023-12-12 10:10 ` Richard Biener
2023-12-12 10:27 ` Tamar Christina
2023-12-12 10:59 ` Richard Sandiford
2023-12-12 11:30 ` Richard Biener
2023-12-13 14:13 ` Tamar Christina
2023-12-14 13:12 ` Richard Biener
2023-12-14 18:44 ` Tamar Christina
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=VI1PR08MB5325C29CFFD1BC181D91D0CAFF82A@VI1PR08MB5325.eurprd08.prod.outlook.com \
--to=tamar.christina@arm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=juzhe.zhong@rivai.ai \
--cc=richard.guenther@gmail.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).