diff options
author | Andreas Krebbel <krebbel1@de.ibm.com> | 2009-04-30 06:54:54 +0000 |
---|---|---|
committer | Andreas Krebbel <krebbel@gcc.gnu.org> | 2009-04-30 06:54:54 +0000 |
commit | 82f5c05de6fdbff6ce599419a24d63b400ea900a (patch) | |
tree | e2fd954fbec5e73aff18c47dfb44b175bcca2f06 | |
parent | 6d8f135b27947caf8e4dbdcaf050f2ae0b9957e1 (diff) | |
download | gcc-82f5c05de6fdbff6ce599419a24d63b400ea900a.zip gcc-82f5c05de6fdbff6ce599419a24d63b400ea900a.tar.gz gcc-82f5c05de6fdbff6ce599419a24d63b400ea900a.tar.bz2 |
gcse.c (gcse_constant_p): Make sure the constant is sharable.
2009-04-30 Andreas Krebbel <krebbel1@de.ibm.com>
* gcse.c (gcse_constant_p): Make sure the constant is sharable.
From-SVN: r146997
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/gcse.c | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c2943a6..f5a4bd8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2009-04-30 Andreas Krebbel <krebbel1@de.ibm.com> + + * gcse.c (gcse_constant_p): Make sure the constant is sharable. + 2009-04-29 James E. Wilson <wilson@codesourcery.com> * config/mips/mips.c (mips_add_offset): Use gen_int_mode for @@ -1301,7 +1301,9 @@ gcse_constant_p (const_rtx x) && ! FLOAT_MODE_P (GET_MODE (XEXP (x, 1)))) return true; - return CONSTANT_P (x); + /* Since X might be inserted more than once we have to take care that it + is sharable. */ + return CONSTANT_P (x) && (GET_CODE (X) != CONST || shared_const_p (x)); } /* Scan pattern PAT of INSN and add an entry to the hash TABLE (set or |