public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/guojiufu/heads/personal-branch)] Add processing STRICT_LOW_PART for matched reloads.
@ 2020-06-10 3:36 Jiu Fu Guo
0 siblings, 0 replies; only message in thread
From: Jiu Fu Guo @ 2020-06-10 3:36 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:5261cf8ce824bfc75eb6f12ad5e3716c085b6f9a
commit 5261cf8ce824bfc75eb6f12ad5e3716c085b6f9a
Author: Vladimir N. Makarov <vmakarov@redhat.com>
Date: Thu Jun 4 12:04:48 2020 -0400
Add processing STRICT_LOW_PART for matched reloads.
2020-06-04 Vladimir Makarov <vmakarov@redhat.com>
PR middle-end/95464
* lra.c (lra_emit_move): Add processing STRICT_LOW_PART.
* lra-constraints.c (match_reload): Use STRICT_LOW_PART in output
reload if the original insn has it too.
Diff:
---
gcc/lra-constraints.c | 2 ++
gcc/lra.c | 7 +++++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c
index bf6d4a2fd4b..421c453997b 100644
--- a/gcc/lra-constraints.c
+++ b/gcc/lra-constraints.c
@@ -1071,6 +1071,8 @@ match_reload (signed char out, signed char *ins, signed char *outs,
if (find_reg_note (curr_insn, REG_UNUSED, out_rtx) == NULL_RTX)
{
start_sequence ();
+ if (out >= 0 && curr_static_id->operand[out].strict_low)
+ out_rtx = gen_rtx_STRICT_LOW_PART (VOIDmode, out_rtx);
lra_emit_move (out_rtx, copy_rtx (new_out_reg));
emit_insn (*after);
*after = get_insns ();
diff --git a/gcc/lra.c b/gcc/lra.c
index 3435cff6a1d..caa09d86ca6 100644
--- a/gcc/lra.c
+++ b/gcc/lra.c
@@ -490,13 +490,16 @@ void
lra_emit_move (rtx x, rtx y)
{
int old;
-
+ rtx_insn *insn;
+
if (GET_CODE (y) != PLUS)
{
if (rtx_equal_p (x, y))
return;
old = max_reg_num ();
- rtx_insn *insn = emit_move_insn (x, y);
+
+ insn = (GET_CODE (x) != STRICT_LOW_PART
+ ? emit_move_insn (x, y) : emit_insn (gen_rtx_SET (x, y)));
/* The move pattern may require scratch registers, so convert them
into real registers now. */
if (insn != NULL_RTX)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-06-10 3:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-10 3:36 [gcc(refs/users/guojiufu/heads/personal-branch)] Add processing STRICT_LOW_PART for matched reloads Jiu Fu Guo
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).