aboutsummaryrefslogtreecommitdiff
path: root/gcc/rtl.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2013-03-12 13:13:33 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2013-03-12 12:13:33 +0000
commitc5c5ba89acc96e48bf6eed87489fcda3efcd7fc3 (patch)
tree30e6ccc292873e9eb78fa8523acc6926a4f44121 /gcc/rtl.c
parentf22e3c85d7529038e1e5621ae1187453d6fef2f6 (diff)
downloadgcc-c5c5ba89acc96e48bf6eed87489fcda3efcd7fc3.zip
gcc-c5c5ba89acc96e48bf6eed87489fcda3efcd7fc3.tar.gz
gcc-c5c5ba89acc96e48bf6eed87489fcda3efcd7fc3.tar.bz2
re PR rtl-optimization/56571 (ICE in copyprop_hardreg_forward_1, at regcprop.c (insn does not satisfy its constraints !))
PR middle-end/56571 * valtrack.c (cleanup_auto_inc_dec): Unshare clobbers originating from pseudos. * emit-rtl.c (verify_rtx_sharing): Likewise. (copy_insn_1): Likewise. * rtl.c (copy_rtx): Likewise. PR middle-end/56571 * gcc.c-torture/compile/pr56571.c: New testcase. From-SVN: r196612
Diffstat (limited to 'gcc/rtl.c')
-rw-r--r--gcc/rtl.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/rtl.c b/gcc/rtl.c
index bc49fc8..b2d88f7 100644
--- a/gcc/rtl.c
+++ b/gcc/rtl.c
@@ -256,7 +256,11 @@ copy_rtx (rtx orig)
/* SCRATCH must be shared because they represent distinct values. */
return orig;
case CLOBBER:
- if (REG_P (XEXP (orig, 0)) && REGNO (XEXP (orig, 0)) < FIRST_PSEUDO_REGISTER)
+ /* Share clobbers of hard registers (like cc0), but do not share pseudo reg
+ clobbers or clobbers of hard registers that originated as pseudos.
+ This is needed to allow safe register renaming. */
+ if (REG_P (XEXP (orig, 0)) && REGNO (XEXP (orig, 0)) < FIRST_PSEUDO_REGISTER
+ && ORIGINAL_REGNO (XEXP (orig, 0)) == REGNO (XEXP (orig, 0)))
return orig;
break;