diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1993-08-16 11:16:14 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1993-08-16 11:16:14 -0400 |
commit | e28f57321d8eca9a0ae6c83ddb6949ce6950c8b8 (patch) | |
tree | 570b351d1e48478e5b78952ad9179a767dda1337 /gcc | |
parent | e572bad3c657f4133cd91426e7bc52e4a9f199dd (diff) | |
download | gcc-e28f57321d8eca9a0ae6c83ddb6949ce6950c8b8.zip gcc-e28f57321d8eca9a0ae6c83ddb6949ce6950c8b8.tar.gz gcc-e28f57321d8eca9a0ae6c83ddb6949ce6950c8b8.tar.bz2 |
(use_crosses_set_p): Check for partially overlapping hard regs.
From-SVN: r5163
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/combine.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index 8abf590..a270b6b 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) |