Commit db2f435b by Andrew Pinski Committed by Andrew Pinski

gcse.c (gcse_constant_p): COMPARE of the same registers is a constant if...

2003-05-02	Andrew Pinski <pinskia@physics.uc.edu>

	* gcse.c (gcse_constant_p): COMPARE of the same registers is a constant
	if they are not floating point registers.

From-SVN: r69471
parent d07605f5
2003-07-16 Andrew Pinski <pinskia@physics.uc.edu>
* gcse.c (gcse_constant_p): COMPARE of the same registers is a constant
if they are not floating point registers.
2003-07-16 Andrew Pinski <pinskia@physics.uc.edu>
PR c/10962
* ggc.h: Add header guards.
* c-decl.c (finish_struct): Sort fields if
......
......@@ -2123,6 +2123,17 @@ gcse_constant_p (rtx x)
&& GET_CODE (XEXP (x, 1)) == CONST_INT)
return true;
/* Consider a COMPARE of the same registers is a constant
if they are not floating point registers. */
if (GET_CODE(x) == COMPARE
&& GET_CODE (XEXP (x, 0)) == REG
&& GET_CODE (XEXP (x, 1)) == REG
&& REGNO (XEXP (x, 0)) == REGNO (XEXP (x, 1))
&& ! FLOAT_MODE_P (GET_MODE (XEXP (x, 0)))
&& ! FLOAT_MODE_P (GET_MODE (XEXP (x, 1))))
return true;
if (GET_CODE (x) == CONSTANT_P_RTX)
return false;
......
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