summaryrefslogtreecommitdiff
path: root/gcc/cse.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>1999-03-07 02:00:27 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>1999-03-07 02:00:27 +0000
commitfa3954ef92d98180019e914f6d7f56d06ae43b11 (patch)
tree7fd18861b5e0d57d9c624befe4a4bba79c8006eb /gcc/cse.c
parentb512966aea6a49f01bc7cfcef0d4ec95b128c11d (diff)
downloadgcc-fa3954ef92d98180019e914f6d7f56d06ae43b11.tar.gz
* cse.c (canon_hash): Never reject hard regs in CCmode.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@25623 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cse.c')
-rw-r--r--gcc/cse.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/cse.c b/gcc/cse.c
index 0852615d031..7d9690899e5 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -2009,7 +2009,12 @@ canon_hash (x, mode)
/* On some machines, we can't record any non-fixed hard register,
because extending its life will cause reload problems. We
- consider ap, fp, and sp to be fixed for this purpose.
+ consider ap, fp, and sp to be fixed for this purpose.
+
+ We also consider CCmode registers to be fixed for this purpose;
+ failure to do so leads to failure to simplify 0<100 type of
+ conditionals.
+
On all machines, we can't record any global registers. */
if (regno < FIRST_PSEUDO_REGISTER
@@ -2019,7 +2024,8 @@ canon_hash (x, mode)
&& regno != FRAME_POINTER_REGNUM
&& regno != HARD_FRAME_POINTER_REGNUM
&& regno != ARG_POINTER_REGNUM
- && regno != STACK_POINTER_REGNUM)))
+ && regno != STACK_POINTER_REGNUM
+ && GET_MODE_CLASS (GET_MODE (x)) != MODE_CC)))
{
do_not_record = 1;
return 0;