From 25d1a5a74d172683fac3e62816ff0aef8ad3b379 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Sat, 17 Jan 2015 11:11:52 +1030 Subject: [PATCH] cprop.c (do_local_cprop): Disallow replacement of fixed hard registers. * cprop.c (do_local_cprop): Disallow replacement of fixed hard registers. From-SVN: r219786 --- gcc/ChangeLog | 5 +++++ gcc/cprop.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f95d05d..aa60d5d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-01-17 Alan Modra + + * cprop.c (do_local_cprop): Disallow replacement of fixed + hard registers. + 2015-01-16 Kyrylo Tkachov PR target/62066 diff --git a/gcc/cprop.c b/gcc/cprop.c index c9fb2fc..e8182db 100644 --- a/gcc/cprop.c +++ b/gcc/cprop.c @@ -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); -- 2.7.4