diff options
author | Gavin Koch <gavin@cygnus.com> | 1997-12-18 17:31:01 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1997-12-18 10:31:01 -0700 |
commit | efb84aa5565ababb39166bb89e72f2412b1523af (patch) | |
tree | 7e795a3151fa12d4505b9a9345e3621baae1c3df /gcc/unroll.c | |
parent | 864b83b9bbc5145cde94d530f3e943301319f4f1 (diff) | |
download | gcc-efb84aa5565ababb39166bb89e72f2412b1523af.zip gcc-efb84aa5565ababb39166bb89e72f2412b1523af.tar.gz gcc-efb84aa5565ababb39166bb89e72f2412b1523af.tar.bz2 |
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
Diffstat (limited to 'gcc/unroll.c')
-rw-r--r-- | gcc/unroll.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/unroll.c b/gcc/unroll.c index b2879b3..6681ada 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) |