From efb84aa5565ababb39166bb89e72f2412b1523af Mon Sep 17 00:00:00 2001 From: Gavin Koch Date: Thu, 18 Dec 1997 17:31:01 +0000 Subject: [PATCH] unroll.c (calculate_giv_inc): Handle constant increment found in a MEM with an appropriate REG_EQUAL note. * unroll.c (calculate_giv_inc): Handle constant increment found in a MEM with an appropriate REG_EQUAL note. From-SVN: r17136 --- gcc/ChangeLog | 3 +++ gcc/unroll.c | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 473fb5c1e48..9333c233756 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -4,6 +4,9 @@ Thu Dec 18 14:51:12 1997 Jason Merrill Thu Dec 18 14:57:29 1997 Gavin Koch + * unroll.c (calculate_giv_inc): Handle constant increment found in + a MEM with an appropriate REG_EQUAL note. + * calls.c (expand_call): Implement LOAD_ARGS_REVERSED. * dwarf2out.c (dwarf2out_frame_debug): Handle adjustments of the diff --git a/gcc/unroll.c b/gcc/unroll.c index b2879b3466a..6681ada21b3 100644 --- a/gcc/unroll.c +++ b/gcc/unroll.c @@ -1490,6 +1490,16 @@ calculate_giv_inc (pattern, src_insn, regno) one of the LO_SUM rtx. */ if (GET_CODE (increment) == LO_SUM) increment = XEXP (increment, 1); + + /* Some ports store large constants in memory and add a REG_EQUAL + note to the store insn. */ + else if (GET_CODE (increment) == MEM) + { + rtx note = find_reg_note (src_insn, REG_EQUAL, 0); + if (note) + increment = XEXP (note, 0); + } + else if (GET_CODE (increment) == IOR || GET_CODE (increment) == ASHIFT || GET_CODE (increment) == PLUS) -- 2.30.2