From: Richard Kenner Date: Mon, 16 Aug 1993 15:16:14 +0000 (-0400) Subject: (use_crosses_set_p): Check for partially overlapping hard regs. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e28f57321d8eca9a0ae6c83ddb6949ce6950c8b8;p=gcc.git (use_crosses_set_p): Check for partially overlapping hard regs. From-SVN: r5163 --- 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)