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 /gcc/unroll.c | |
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
Diffstat (limited to 'gcc/unroll.c')
-rw-r--r-- | gcc/unroll.c | 6 |
1 files changed, 6 insertions, 0 deletions
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) |