re PR rtl-optimization/64010 ([msp430-elf] struct function dereference clobbers param...
authorUlrich Weigand <uweigand@de.ibm.com>
Wed, 3 Dec 2014 21:59:10 +0000 (21:59 +0000)
committerUlrich Weigand <uweigand@gcc.gnu.org>
Wed, 3 Dec 2014 21:59:10 +0000 (21:59 +0000)
PR rtl-optimization/64010
* reload.c (push_reload): Before reusing a register contained
in an operand as input reload register, ensure that it is not
used in CALL_INSN_FUNCTION_USAGE.

From-SVN: r218335

gcc/ChangeLog
gcc/reload.c

index fabd3909dce70029b93064ca3215ba05713a543a..0fac9a2b9788c3132ff3fce8bbe077f3501de054 100644 (file)
@@ -1,3 +1,10 @@
+2014-12-03  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
+
+       PR rtl-optimization/64010
+       * reload.c (push_reload): Before reusing a register contained
+       in an operand as input reload register, ensure that it is not
+       used in CALL_INSN_FUNCTION_USAGE.
+
 2014-12-03  Ulrich Drepper  <drepper@gmail.com>
 
        * Makefile.in: Use $(LN_S) instead of $(LN) -s and remove file first
index 9ef2c89887a2341ab53596f06165a7807aeeeb11..3f5abb84878ba997ca0b25aec56bef1791bcb1f8 100644 (file)
@@ -1625,6 +1625,7 @@ push_reload (rtx in, rtx out, rtx *inloc, rtx *outloc,
                                               end_hard_regno (rel_mode,
                                                               regno),
                                               PATTERN (this_insn), inloc)
+           && ! find_reg_fusage (this_insn, USE, XEXP (note, 0))
            /* If this is also an output reload, IN cannot be used as
               the reload register if it is set in this insn unless IN
               is also OUT.  */