From: Andrew Pinski <quic_apinski@quicinc.com>
To: <gcc-patches@gcc.gnu.org>
Cc: Andrew Pinski <quic_apinski@quicinc.com>
Subject: [PATCH 2/2] Remove support for nontemporal stores with ssa_names on lhs [PR112976]
Date: Fri, 26 Apr 2024 16:03:53 -0700 [thread overview]
Message-ID: <20240426230353.3131438-2-quic_apinski@quicinc.com> (raw)
In-Reply-To: <20240426230353.3131438-1-quic_apinski@quicinc.com>
When cfgexpand was changed to support expanding from tuple gimple
(r0-95521-g28ed065ef9f345), the code was added to support
doing nontemporal stores with LHS of a SSA_NAME but that will
never be a nontemporal store.
This patch removes that and asserts that expanding with a LHS
of a SSA_NAME is not a nontemporal store.
Bootstrapped and tested on x86_64-linux-gnu.
gcc/ChangeLog:
PR middle-end/112976
* cfgexpand.cc (expand_gimple_stmt_1): Remove
support for expanding nontemporal "moves" with
ssa names on the LHS.
Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
---
gcc/cfgexpand.cc | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/gcc/cfgexpand.cc b/gcc/cfgexpand.cc
index eef565eddb5..cfc5291aa0c 100644
--- a/gcc/cfgexpand.cc
+++ b/gcc/cfgexpand.cc
@@ -4002,17 +4002,16 @@ expand_gimple_stmt_1 (gimple *stmt)
else
{
rtx target, temp;
- bool nontemporal = gimple_assign_nontemporal_move_p (assign_stmt);
+ gcc_assert (!gimple_assign_nontemporal_move_p (assign_stmt));
bool promoted = false;
target = expand_expr (lhs, NULL_RTX, VOIDmode, EXPAND_WRITE);
if (GET_CODE (target) == SUBREG && SUBREG_PROMOTED_VAR_P (target))
promoted = true;
- /* If we want to use a nontemporal store, force the value to
- register first. If we store into a promoted register,
- don't directly expand to target. */
- temp = nontemporal || promoted ? NULL_RTX : target;
+ /* If we store into a promoted register, don't directly
+ expand to target. */
+ temp = promoted ? NULL_RTX : target;
temp = expand_expr_real_gassign (assign_stmt, temp,
GET_MODE (target), EXPAND_NORMAL);
@@ -4034,8 +4033,6 @@ expand_gimple_stmt_1 (gimple *stmt)
convert_move (SUBREG_REG (target), temp, unsignedp);
}
- else if (nontemporal && emit_storent_insn (target, temp))
- ;
else
{
temp = force_operand (temp, target);
--
2.43.0
next prev parent reply other threads:[~2024-04-26 23:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-26 23:03 [PATCH 1/2] Add verification of gimple_assign_nontemporal_move_p [PR112976] Andrew Pinski
2024-04-26 23:03 ` Andrew Pinski [this message]
2024-04-30 8:00 ` [PATCH 2/2] Remove support for nontemporal stores with ssa_names on lhs [PR112976] Richard Biener
2024-04-30 8:00 ` [PATCH 1/2] Add verification of gimple_assign_nontemporal_move_p [PR112976] Richard Biener
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=20240426230353.3131438-2-quic_apinski@quicinc.com \
--to=quic_apinski@quicinc.com \
--cc=gcc-patches@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).