Commit 82f5c05d by Andreas Krebbel Committed by Andreas Krebbel

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
parent 6d8f135b
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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment