* gcse.c (gcse_constant_p): Make sure the constant is sharable.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146997
138bc75d-0d04-0410-961f-
82ee72b054a4
+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
&& ! 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