diff options
author | J"orn Rennecke <amylaar@cygnus.co.uk> | 1999-03-12 12:46:36 +0000 |
---|---|---|
committer | Joern Rennecke <amylaar@gcc.gnu.org> | 1999-03-12 12:46:36 +0000 |
commit | d24de7d183899847d520b453b09cf45c4a643ca4 (patch) | |
tree | 8f3f6a35966180d41285934d113acd850f972b60 | |
parent | a8edca885e492d3c61cefb38035bca639a69c7dd (diff) | |
download | gcc-d24de7d183899847d520b453b09cf45c4a643ca4.zip gcc-d24de7d183899847d520b453b09cf45c4a643ca4.tar.gz gcc-d24de7d183899847d520b453b09cf45c4a643ca4.tar.bz2 |
unroll.c (loop_iterations): Don't return a final value for EQ comparison loops.
* unroll.c (loop_iterations): Don't return a final value for EQ
comparison loops.
From-SVN: r25729
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/unroll.c | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 417319d..def3819 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Fri Mar 12 20:45:30 1999 J"orn Rennecke <amylaar@cygnus.co.uk> + + * unroll.c (loop_iterations): Don't return a final value for EQ + comparison loops. + Fri Mar 12 12:35:01 1999 Jim Wilson <wilson@cygnus.com> * reload1.c (calculate_needs_all_insns): When ignore equivalence diff --git a/gcc/unroll.c b/gcc/unroll.c index 32ed531..e119352 100644 --- a/gcc/unroll.c +++ b/gcc/unroll.c @@ -3820,6 +3820,12 @@ loop_iterations (loop_start, loop_end, loop_info) loop_info->initial_equiv_value = initial_value; loop_info->final_equiv_value = final_value; + /* For EQ comparison loops, we don't have a valid final value. + Check this now so that we won't leave an invalid value if we + return early for any other reason. */ + if (comparison_code == EQ) + loop_info->final_equiv_value = loop_info->final_value = 0; + if (increment == 0) { if (loop_dump_stream) |