From: 钟居哲 <juzhe.zhong@rivai.ai>
To: gcc-patches <gcc-patches@gcc.gnu.org>
Cc: rdapp.gcc <rdapp.gcc@gmail.com>,
richard.sandiford <richard.sandiford@arm.com>,
rguenther <rguenther@suse.de>
Subject: [PATCH] internal-fn: Add VCOND_MASK_LEN.
Date: Thu, 26 Oct 2023 06:10:56 +0800 [thread overview]
Message-ID: <F89C3D1170BC0FD2+2023102606105599669998@rivai.ai> (raw)
[-- Attachment #1: Type: text/plain, Size: 654 bytes --]
>> Which one is right?
Hi, Richard. Let me explain this situation.
Both situations are possible. It's depending on the 'ELSE' value whether it is unitialized value.
For reduction case:
for (int i = 0; i < n; i++)
result += a[i]
The trailing elements should be well-defined, keep the original value. Otherwise, it will cause run-time issue.
For integer DIV operation:
for (int i = 0; i < n; i++)
a[i] = a[i] / b[i];
The trailling elements are DON'T care (or undefined), I will use unitialized value in 'ELSE' value.
Then later 'expand' stage will expand it into "clobber scratch" RTL.
Thanks.
juzhe.zhong@rivai.ai
next reply other threads:[~2023-10-25 22:11 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-25 22:10 钟居哲 [this message]
2023-10-25 22:32 ` Richard Sandiford
2023-10-25 22:35 ` 钟居哲
2023-10-26 8:41 ` Robin Dapp
2023-10-26 14:02 ` Robin Dapp
2023-10-26 14:10 ` 钟居哲
2023-10-26 20:32 ` Robin Dapp
2023-11-02 13:35 ` Richard Biener
2023-11-02 13:48 ` Robin Dapp
2023-11-02 23:49 ` Richard Sandiford
2023-11-03 9:03 ` Robin Dapp
2023-11-03 9:11 ` Richard Sandiford
2023-11-03 22:02 ` Robin Dapp
2023-11-05 20:28 ` Richard Sandiford
2023-11-06 7:22 ` Richard Biener
-- strict thread matches above, loose matches on Subject: below --
2023-09-08 9:01 [PATCH] gimple-match: Do not try UNCOND optimization with COND_LEN Robin Dapp
2023-09-11 20:35 ` Robin Dapp
2023-10-12 13:53 ` Richard Sandiford
2023-10-12 14:19 ` Richard Sandiford
2023-10-13 15:50 ` Robin Dapp
2023-10-16 21:59 ` Richard Sandiford
2023-10-17 8:47 ` Richard Biener
2023-10-17 11:39 ` Robin Dapp
2023-10-17 13:35 ` Richard Sandiford
2023-10-17 15:42 ` Robin Dapp
2023-10-17 16:05 ` Richard Sandiford
[not found] ` <7e083b67-f283-4e9e-ba76-24e194fa1761@gmail.com>
[not found] ` <mptttqmny4u.fsf@arm.com>
2023-10-23 16:09 ` [PATCH] internal-fn: Add VCOND_MASK_LEN Robin Dapp
2023-10-24 21:50 ` Richard Sandiford
2023-10-25 19:59 ` Robin Dapp
2023-10-25 21:58 ` Richard Sandiford
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=F89C3D1170BC0FD2+2023102606105599669998@rivai.ai \
--to=juzhe.zhong@rivai.ai \
--cc=gcc-patches@gcc.gnu.org \
--cc=rdapp.gcc@gmail.com \
--cc=rguenther@suse.de \
--cc=richard.sandiford@arm.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).