diff options
author | Andrew Pinski <pinskia@physics.uc.edu> | 2003-07-16 18:58:12 +0000 |
---|---|---|
committer | Andrew Pinski <pinskia@gcc.gnu.org> | 2003-07-16 11:58:12 -0700 |
commit | db2f435beacd8e9e9f07616c5806acb518ff821c (patch) | |
tree | 25ae95e74904fca8e52e81ad950b154e1cfc464a /gcc/gcse.c | |
parent | d07605f5703529578edb1c65369fba38ddbff327 (diff) | |
download | gcc-db2f435beacd8e9e9f07616c5806acb518ff821c.zip gcc-db2f435beacd8e9e9f07616c5806acb518ff821c.tar.gz gcc-db2f435beacd8e9e9f07616c5806acb518ff821c.tar.bz2 |
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
Diffstat (limited to 'gcc/gcse.c')
-rw-r--r-- | gcc/gcse.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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; |