diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-03-12 12:13:33 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-03-12 12:13:33 +0000 |
commit | b291008a661fa05b2cb182ddb471ff8dd4a09ae1 (patch) | |
tree | 30e6ccc292873e9eb78fa8523acc6926a4f44121 /gcc/rtl.c | |
parent | 1c72da597a6c73f5843814dfa878e6f779564c72 (diff) | |
download | gcc-b291008a661fa05b2cb182ddb471ff8dd4a09ae1.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@196612 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/rtl.c')
-rw-r--r-- | gcc/rtl.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/rtl.c b/gcc/rtl.c index bc49fc86fe9..b2d88f783b7 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; |