summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2001-06-08 17:43:09 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2001-06-08 17:43:09 +0000
commit83732bbbae0a6c61592d17081a02be5c07fa66cb (patch)
tree11acd2f5c1ac4de504dba7efe3f7804a340a891e
parent1a212333916641ea688c1da44645e1e697fbea8b (diff)
downloadgcc-83732bbbae0a6c61592d17081a02be5c07fa66cb.tar.gz
* jump.c (mark_modified_reg): Allow jump threading if condition
codes are represented by a hard register. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@43030 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/jump.c10
2 files changed, 13 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f75f9b1521d..2bcea06f39a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,10 @@
2001-06-08 Jakub Jelinek <jakub@redhat.com>
+ * jump.c (mark_modified_reg): Allow jump threading if condition
+ codes are represented by a hard register.
+
+2001-06-08 Jakub Jelinek <jakub@redhat.com>
+
* config/ia64/ia64.c (ia64_function_arg): Use [SDT]Fmode as gr_mode
for complex floats passed to unprototyped functions.
diff --git a/gcc/jump.c b/gcc/jump.c
index 5d5c6d6e796..feb7b4d8ca3 100644
--- a/gcc/jump.c
+++ b/gcc/jump.c
@@ -3763,7 +3763,7 @@ static int modified_mem;
static void
mark_modified_reg (dest, x, data)
rtx dest;
- rtx x ATTRIBUTE_UNUSED;
+ rtx x;
void *data ATTRIBUTE_UNUSED;
{
int regno;
@@ -3781,7 +3781,13 @@ mark_modified_reg (dest, x, data)
regno = REGNO (dest);
if (regno >= FIRST_PSEUDO_REGISTER)
modified_regs[regno] = 1;
- else
+ /* Don't consider a hard condition code register as modified,
+ if it is only being set. thread_jumps will check if it is set
+ to the same value. */
+ else if (GET_MODE_CLASS (GET_MODE (dest)) != MODE_CC
+ || GET_CODE (x) != SET
+ || ! rtx_equal_p (dest, SET_DEST (x))
+ || HARD_REGNO_NREGS (regno, GET_MODE (dest)) != 1)
for (i = 0; i < HARD_REGNO_NREGS (regno, GET_MODE (dest)); i++)
modified_regs[regno + i] = 1;
}