summaryrefslogtreecommitdiffstats
path: root/gcc/cse.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2002-05-20 16:59:03 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2002-05-20 16:59:03 +0000
commit755ffadac41cc57370912c4fb41ca53691c4b6d8 (patch)
tree0e8241da43d327f7b9fc8d8237c6e39b2df91ec8 /gcc/cse.c
parentc86bfe450c0fba7bb046d53aa5061e7b67852f12 (diff)
downloadppe42-gcc-755ffadac41cc57370912c4fb41ca53691c4b6d8.tar.gz
ppe42-gcc-755ffadac41cc57370912c4fb41ca53691c4b6d8.zip
* cse.c (canon_hash): Reorder do_not_record test. Always
allow pic_offset_table_rtx. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53665 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cse.c')
-rw-r--r--gcc/cse.c35
1 files changed, 24 insertions, 11 deletions
diff --git a/gcc/cse.c b/gcc/cse.c
index b13de96cc40..514ba406ab0 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -2249,10 +2249,11 @@ canon_hash (x, mode)
case REG:
{
unsigned int regno = REGNO (x);
+ bool record;
/* 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, sp, gp 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
@@ -2262,16 +2263,28 @@ canon_hash (x, mode)
Nor should we record any register that is in a small
class, as defined by CLASS_LIKELY_SPILLED_P. */
- if (regno < FIRST_PSEUDO_REGISTER
- && (global_regs[regno]
- || CLASS_LIKELY_SPILLED_P (REGNO_REG_CLASS (regno))
- || (SMALL_REGISTER_CLASSES
- && ! fixed_regs[regno]
- && x != frame_pointer_rtx
- && x != hard_frame_pointer_rtx
- && x != arg_pointer_rtx
- && x != stack_pointer_rtx
- && GET_MODE_CLASS (GET_MODE (x)) != MODE_CC)))
+ if (regno >= FIRST_PSEUDO_REGISTER)
+ record = true;
+ else if (x == frame_pointer_rtx
+ || x == hard_frame_pointer_rtx
+ || x == arg_pointer_rtx
+ || x == stack_pointer_rtx
+ || x == pic_offset_table_rtx)
+ record = true;
+ else if (global_regs[regno])
+ record = false;
+ else if (fixed_regs[regno])
+ record = true;
+ else if (GET_MODE_CLASS (GET_MODE (x)) == MODE_CC)
+ record = true;
+ else if (SMALL_REGISTER_CLASSES)
+ record = false;
+ else if (CLASS_LIKELY_SPILLED_P (REGNO_REG_CLASS (regno)))
+ record = false;
+ else
+ record = true;
+
+ if (!record)
{
do_not_record = 1;
return 0;
OpenPOWER on IntegriCloud