This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/50891] move2add_note_store fails to properly track register content
- From: "hjl.tools at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 27 Oct 2011 23:20:47 +0000
- Subject: [Bug rtl-optimization/50891] move2add_note_store fails to properly track register content
- Auto-submitted: auto-generated
- References: <bug-50891-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50891
--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> 2011-10-27 23:20:47 UTC ---
Does this:
---
diff --git a/gcc/postreload.c b/gcc/postreload.c
index 0e50d85..526015b 100644
--- a/gcc/postreload.c
+++ b/gcc/postreload.c
@@ -2039,6 +2039,10 @@ reload_cse_move2add (rtx first)
allocation if possible. */
&& SCALAR_INT_MODE_P (GET_MODE (XEXP (cnd, 0)))
&& hard_regno_nregs[REGNO (XEXP (cnd, 0))][GET_MODE (XEXP (cnd, 0))]
== 1
+ /* Use implicit set only if the new mode is wider than
+ the previous mode since register isn't really set. */
+ && (GET_MODE_SIZE (GET_MODE (XEXP (cnd, 0)))
+ >= GET_MODE_SIZE (reg_mode[REGNO (XEXP (cnd, 0))]))
&& CONST_INT_P (XEXP (cnd, 1)))
{
rtx implicit_set =
---
make any senses?