public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* PATCH [6/n]: Prepare x32: PR middle-end/47449: Don't propagate hard register non-local goto save area
@ 2011-06-14 16:04 H.J. Lu
  0 siblings, 0 replies; only message in thread
From: H.J. Lu @ 2011-06-14 16:04 UTC (permalink / raw)
  To: gcc-patches

Hi,

RTL-based forward propagation pass shouldn't propagate hard register.
OK for trunk?

Thanks.


H.J.
---
2011-06-14  H.J. Lu  <hongjiu.lu@intel.com>

	PR middle-end/47449
	* fwprop.c (forward_propagate_subreg): Don't propagate hard
	register nor zero/sign extended hard register.

diff --git a/gcc/fwprop.c b/gcc/fwprop.c
index b2fd955..c8009d0 100644
--- a/gcc/fwprop.c
+++ b/gcc/fwprop.c
@@ -1101,6 +1101,7 @@ forward_propagate_subreg (df_ref use, rtx def_insn, rtx def_set)
       src = SET_SRC (def_set);
       if (GET_CODE (src) == SUBREG
 	  && REG_P (SUBREG_REG (src))
+	  && REGNO (SUBREG_REG (src)) >= FIRST_PSEUDO_REGISTER
 	  && GET_MODE (SUBREG_REG (src)) == use_mode
 	  && subreg_lowpart_p (src)
 	  && all_uses_available_at (def_insn, use_insn))
@@ -1119,6 +1120,7 @@ forward_propagate_subreg (df_ref use, rtx def_insn, rtx def_set)
       if ((GET_CODE (src) == ZERO_EXTEND
 	   || GET_CODE (src) == SIGN_EXTEND)
 	  && REG_P (XEXP (src, 0))
+	  && REGNO (XEXP (src, 0)) >= FIRST_PSEUDO_REGISTER
 	  && GET_MODE (XEXP (src, 0)) == use_mode
 	  && !free_load_extend (src, def_insn)
 	  && all_uses_available_at (def_insn, use_insn))

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-06-14 15:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-14 16:04 PATCH [6/n]: Prepare x32: PR middle-end/47449: Don't propagate hard register non-local goto save area H.J. Lu

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).