From: Takayuki 'January June' Suwa <jjsuwa_sys3175@yahoo.co.jp>
To: Max Filippov <jcmvbkbc@gmail.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH v3 4/5] xtensa: Add setmemsi insn pattern
Date: Fri, 27 May 2022 18:23:10 +0900 [thread overview]
Message-ID: <575922f5-5757-efca-31f5-ee39ac45ec2e@yahoo.co.jp> (raw)
In-Reply-To: <c2163467-90d4-5b6b-fdc0-05767de454b1@yahoo.co.jp>
On 2022/05/27 12:00, Takayuki 'January June' Suwa via Gcc-patches wrote:
> On 2022/05/27 1:57, Max Filippov wrote:
>> is that something that can be addressed in this patch?
>
> seems hard to resolve, because the RTL-generation pass passes only 68
> bytes in that case:
the culprit is here, but i don't know whether it is known regression or not.
diff --git a/gcc/expr.cc b/gcc/expr.cc
index 7197996cec7..be100dd9946 100644
--- a/gcc/expr.cc
+++ b/gcc/expr.cc
@@ -6043,13 +6043,19 @@ store_expr (tree exp, rtx target, int call_param_p,
if (!can_store_by_pieces (str_copy_len, string_cst_read_str,
(void *) str, MEM_ALIGN (target), false))
goto normal_expr;
-
- dest_mem = store_by_pieces (target, str_copy_len,
string_cst_read_str,
- (void *) str, MEM_ALIGN (target), false,
- RETURN_END);
- clear_storage (adjust_address_1 (dest_mem, BLKmode, 0, 1, 1, 0,
- exp_len - str_copy_len),
- GEN_INT (exp_len - str_copy_len), BLOCK_OP_NORMAL);
+ if (TREE_STRING_LENGTH (str) == 1 && *TREE_STRING_POINTER (str) == 0)
+ clear_storage (adjust_address_1 (target, BLKmode, 0, 1, 1, 0,
+ exp_len),
+ GEN_INT (exp_len), BLOCK_OP_NORMAL);
+ else
+ {
+ dest_mem = store_by_pieces (target, str_copy_len, string_cst_read_str,
+ (void *) str, MEM_ALIGN (target), false,
+ RETURN_END);
+ clear_storage (adjust_address_1 (dest_mem, BLKmode, 0, 1, 1, 0,
+ exp_len - str_copy_len),
+ GEN_INT (exp_len - str_copy_len), BLOCK_OP_NORMAL);
+ }
return NULL_RTX;
}
else
next prev parent reply other threads:[~2022-05-27 9:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-23 15:52 Takayuki 'January June' Suwa
2022-05-26 16:57 ` Max Filippov
2022-05-27 3:00 ` Takayuki 'January June' Suwa
2022-05-27 4:57 ` Max Filippov
2022-05-27 9:23 ` Takayuki 'January June' Suwa [this message]
2022-05-27 4:58 ` Max Filippov
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=575922f5-5757-efca-31f5-ee39ac45ec2e@yahoo.co.jp \
--to=jjsuwa_sys3175@yahoo.co.jp \
--cc=gcc-patches@gcc.gnu.org \
--cc=jcmvbkbc@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).