diff options
author | Jim Wilson <wilson@cygnus.com> | 1999-03-08 16:09:05 +0000 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1999-03-08 08:09:05 -0800 |
commit | 66830675f2c2820222585b4a84b3f2ab7912dfbb (patch) | |
tree | b8606b5e3306b357419fb22b180616ee884b4a17 /gcc/unroll.c | |
parent | 86879c21acddbfa729e6172052ab7b79165d27b4 (diff) | |
download | gcc-66830675f2c2820222585b4a84b3f2ab7912dfbb.zip gcc-66830675f2c2820222585b4a84b3f2ab7912dfbb.tar.gz gcc-66830675f2c2820222585b4a84b3f2ab7912dfbb.tar.bz2 |
Fix cygwin toolchain build failure reported by Geoffrey Noer.
* unroll.c (loop_iterations): Only call loop_find_equiv_value if we
have a REG or SUBREG.
From-SVN: r25643
Diffstat (limited to 'gcc/unroll.c')
-rw-r--r-- | gcc/unroll.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/unroll.c b/gcc/unroll.c index 841f06a..32ed531 100644 --- a/gcc/unroll.c +++ b/gcc/unroll.c @@ -3830,7 +3830,11 @@ loop_iterations (loop_start, loop_end, loop_info) if (GET_CODE (increment) != CONST_INT) { - increment = loop_find_equiv_value (loop_start, increment); + /* If we have a REG, check to see if REG holds a constant value. */ + /* ??? Other RTL, such as (neg (reg)) is possible here, but it isn't + clear if it is worthwhile to try to handle such RTL. */ + if (GET_CODE (increment) == REG || GET_CODE (increment) == SUBREG) + increment = loop_find_equiv_value (loop_start, increment); if (GET_CODE (increment) != CONST_INT) { |