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 /gcc/gcse.c | |
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
Diffstat (limited to 'gcc/gcse.c')
-rw-r--r-- | gcc/gcse.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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 |