From: David Miller <davem@davemloft.net>
To: ebotcazou@adacore.com
Cc: gcc@gcc.gnu.org
Subject: Re: cprop_reg problem on sparc
Date: Fri, 28 Oct 2011 00:58:00 -0000 [thread overview]
Message-ID: <20111027.173155.1830416455700537895.davem@davemloft.net> (raw)
In-Reply-To: <201110272311.34068.ebotcazou@adacore.com>
From: Eric Botcazou <ebotcazou@adacore.com>
Date: Thu, 27 Oct 2011 23:11:33 +0200
>> Sorry, the final path component should be "mzero2.c"
>
> Thanks. I think we that need the same treatment in:
...
> as:
...
> i.e. we need to bail out if we are narrowing and this is a big-endian target.
I quickly tried the patch below, but this does not prevent the
transformation.
diff --git a/gcc/regcprop.c b/gcc/regcprop.c
index ad92a64..54e008b 100644
--- a/gcc/regcprop.c
+++ b/gcc/regcprop.c
@@ -448,6 +448,14 @@ find_oldest_value_reg (enum reg_class cl, rtx reg, struct value_data *vd)
if (hard_regno_nregs[regno][mode]
> hard_regno_nregs[regno][vd->e[regno].mode])
return NULL_RTX;
+
+ /* And likewise, if we are narrowing on big endian the transformation
+ is also invalid. */
+ if (hard_regno_nregs[regno][mode]
+ < hard_regno_nregs[regno][vd->e[regno].mode]
+ && (GET_MODE_SIZE (vd->e[regno].mode) > UNITS_PER_WORD
+ ? WORDS_BIG_ENDIAN : BYTES_BIG_ENDIAN))
+ return NULL_RTX;
}
for (i = vd->e[regno].oldest_regno; i != regno; i = vd->e[i].next_regno)
next prev parent reply other threads:[~2011-10-27 21:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-27 12:06 David Miller
2011-10-27 18:21 ` Eric Botcazou
2011-10-27 19:36 ` David Miller
2011-10-27 22:42 ` Eric Botcazou
2011-10-28 0:58 ` David Miller [this message]
2011-10-28 2:17 ` Eric Botcazou
2011-10-28 5:06 ` David Miller
2011-10-27 21:56 ` David Miller
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=20111027.173155.1830416455700537895.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=ebotcazou@adacore.com \
--cc=gcc@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).