diff options
author | Jan Hubicka <jh@suse.cz> | 2013-03-12 13:13:33 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2013-03-12 12:13:33 +0000 |
commit | c5c5ba89acc96e48bf6eed87489fcda3efcd7fc3 (patch) | |
tree | 30e6ccc292873e9eb78fa8523acc6926a4f44121 /gcc/rtl.c | |
parent | f22e3c85d7529038e1e5621ae1187453d6fef2f6 (diff) | |
download | gcc-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.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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; |