summaryrefslogtreecommitdiff
path: root/gcc/combine.c
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>1993-08-16 15:16:14 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>1993-08-16 15:16:14 +0000
commit06a89553192778e7d602475b59c8bb32addfbb01 (patch)
tree570b351d1e48478e5b78952ad9179a767dda1337 /gcc/combine.c
parent57cd42ba64f067592046dfede2609fd60b260641 (diff)
downloadgcc-06a89553192778e7d602475b59c8bb32addfbb01.tar.gz
(use_crosses_set_p): Check for partially overlapping hard regs.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@5163 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/combine.c')
-rw-r--r--gcc/combine.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/combine.c b/gcc/combine.c
index 8abf590d514..a270b6bd573 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -9404,14 +9404,20 @@ use_crosses_set_p (x, from_cuid)
if (code == REG)
{
register int regno = REGNO (x);
+ int endreg = regno + (regno < FIRST_PSEUDO_REGISTER
+ ? HARD_REGNO_NREGS (regno, GET_MODE (x)) : 1);
+
#ifdef PUSH_ROUNDING
/* Don't allow uses of the stack pointer to be moved,
because we don't know whether the move crosses a push insn. */
if (regno == STACK_POINTER_REGNUM)
return 1;
#endif
- return (reg_last_set[regno]
- && INSN_CUID (reg_last_set[regno]) > from_cuid);
+ for (;regno < endreg; regno++)
+ if (reg_last_set[regno]
+ && INSN_CUID (reg_last_set[regno]) > from_cuid)
+ return 1;
+ return 0;
}
if (code == MEM && mem_last_set > from_cuid)