diff options
author | Jakub Jelinek <jakub@redhat.com> | 2001-06-08 19:43:09 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2001-06-08 19:43:09 +0200 |
commit | 7bd458aabb4805c9126408032b515ab3ce106f54 (patch) | |
tree | 11acd2f5c1ac4de504dba7efe3f7804a340a891e /gcc/jump.c | |
parent | 7137fd76b55fa37aefa04e836e91ded8f974a2e8 (diff) | |
download | gcc-7bd458aabb4805c9126408032b515ab3ce106f54.zip gcc-7bd458aabb4805c9126408032b515ab3ce106f54.tar.gz gcc-7bd458aabb4805c9126408032b515ab3ce106f54.tar.bz2 |
jump.c (mark_modified_reg): Allow jump threading if condition codes are represented by a hard register.
* jump.c (mark_modified_reg): Allow jump threading if condition
codes are represented by a hard register.
From-SVN: r43030
Diffstat (limited to 'gcc/jump.c')
-rw-r--r-- | gcc/jump.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -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; } |