OSDN Git Service

* reload1.c (gen_reload): Also use find_replacement in UNARY_P case.
authoramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 13 Feb 2006 15:31:31 +0000 (15:31 +0000)
committeramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 13 Feb 2006 15:31:31 +0000 (15:31 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@110915 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/reload1.c

index c8144ac..9bac8d3 100644 (file)
@@ -1,3 +1,7 @@
+2006-02-13  J"orn Rennecke <joern.rennecke@st.com>
+
+       * reload1.c (gen_reload): Also use find_replacement in UNARY_P case.
+
 2006-02-12  Zdenek Dvorak <dvorakz@suse.cz>
 
        PR rtl-optimization/26222
index 87cc425..7bfd2a1 100644 (file)
@@ -7721,6 +7721,10 @@ gen_reload (rtx out, rtx in, int opnum, enum reload_type type)
       rtx out_moded;
       rtx set;
 
+      op1 = find_replacement (&XEXP (in, 0));
+      if (op1 != XEXP (in, 0))
+       in = gen_rtx_fmt_e (GET_CODE (in), GET_MODE (in), op1);
+
       /* First, try a plain SET.  */
       set = emit_insn_if_valid_for_reload (gen_rtx_SET (VOIDmode, out, in));
       if (set)
@@ -7729,7 +7733,6 @@ gen_reload (rtx out, rtx in, int opnum, enum reload_type type)
       /* If that failed, move the inner operand to the reload
         register, and try the same unop with the inner expression
         replaced with the reload register.  */
-      op1 = XEXP (in, 0);
 
       if (GET_MODE (op1) != GET_MODE (out))
        out_moded = gen_rtx_REG (GET_MODE (op1), REGNO (out));