diff options
author | H.J. Lu <hongjiu.lu@intel.com> | 2011-07-05 12:47:35 +0000 |
---|---|---|
committer | H.J. Lu <hjl@gcc.gnu.org> | 2011-07-05 05:47:35 -0700 |
commit | 509a31f8e558782f0cdc3c337dc957bb443a4d23 (patch) | |
tree | 60b64b85fe821bb1add17c4d1cf8519acc6a22df | |
parent | 39becbac3d5c936b5cd5fa69d6f04685216f7e38 (diff) | |
download | gcc-509a31f8e558782f0cdc3c337dc957bb443a4d23.zip gcc-509a31f8e558782f0cdc3c337dc957bb443a4d23.tar.gz gcc-509a31f8e558782f0cdc3c337dc957bb443a4d23.tar.bz2 |
Don't propagate hard registers in forward_propagate_subreg.
2011-07-05 H.J. Lu <hongjiu.lu@intel.com>
PR rtl-optimization/47449
* fwprop.c (forward_propagate_subreg): Don't propagate hard
register nor zero/sign extended hard register.
From-SVN: r175849
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/fwprop.c | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 154c7ca..29eeb64 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-07-05 H.J. Lu <hongjiu.lu@intel.com> + + PR rtl-optimization/47449 + * fwprop.c (forward_propagate_subreg): Don't propagate hard + register nor zero/sign extended hard register. + 2011-07-05 Richard Guenther <rguenther@suse.de> PR tree-optimization/49518 diff --git a/gcc/fwprop.c b/gcc/fwprop.c index 444a539..5db9ed8 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)) |