From 509a31f8e558782f0cdc3c337dc957bb443a4d23 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Tue, 5 Jul 2011 12:47:35 +0000 Subject: [PATCH] Don't propagate hard registers in forward_propagate_subreg. 2011-07-05 H.J. Lu PR rtl-optimization/47449 * fwprop.c (forward_propagate_subreg): Don't propagate hard register nor zero/sign extended hard register. From-SVN: r175849 --- gcc/ChangeLog | 6 ++++++ gcc/fwprop.c | 2 ++ 2 files changed, 8 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 154c7cace3d..29eeb649163 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-07-05 H.J. Lu + + 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 PR tree-optimization/49518 diff --git a/gcc/fwprop.c b/gcc/fwprop.c index 444a539cf79..5db9ed88887 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)) -- 2.30.2