]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
cprop.c (do_local_cprop): Disallow replacement of fixed hard registers.
authorAlan Modra <amodra@gmail.com>
Sat, 17 Jan 2015 00:41:52 +0000 (11:11 +1030)
committerAlan Modra <amodra@gcc.gnu.org>
Sat, 17 Jan 2015 00:41:52 +0000 (11:11 +1030)
* cprop.c (do_local_cprop): Disallow replacement of fixed
hard registers.

From-SVN: r219786

gcc/ChangeLog
gcc/cprop.c

index f95d05d2e4d35a7121367463b05415481ab47144..aa60d5ddbe2d298b981f3ed9976ffcfb207cbf63 100644 (file)
@@ -1,3 +1,8 @@
+2015-01-17  Alan Modra  <amodra@gmail.com>
+
+       * cprop.c (do_local_cprop): Disallow replacement of fixed
+       hard registers.
+
 2015-01-16  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
 
        PR target/62066
index c9fb2fc5129065cadd0df5b00626c408e51cb794..e8182dbfb8f196133c3516b1d9b47d5afed0be99 100644 (file)
@@ -1189,10 +1189,12 @@ do_local_cprop (rtx x, rtx_insn *insn)
   rtx newreg = NULL, newcnst = NULL;
 
   /* Rule out USE instructions and ASM statements as we don't want to
-     change the hard registers mentioned.  */
+     change the hard registers mentioned, and don't change fixed hard
+     registers.  */
   if (REG_P (x)
       && (REGNO (x) >= FIRST_PSEUDO_REGISTER
           || (GET_CODE (PATTERN (insn)) != USE
+             && !fixed_regs[REGNO (x)]
              && asm_noperands (PATTERN (insn)) < 0)))
     {
       cselib_val *val = cselib_lookup (x, GET_MODE (x), 0, VOIDmode);