aboutsummaryrefslogtreecommitdiff
path: root/gcc/unroll.c
diff options
context:
space:
mode:
authorJim Wilson <wilson@gcc.gnu.org>1994-08-14 16:13:22 -0700
committerJim Wilson <wilson@gcc.gnu.org>1994-08-14 16:13:22 -0700
commit40e81af5f03b079ca6d0dfefc5e5f13241b66271 (patch)
tree1d7ac72401277122e1d75c6af2fda1bb891603f7 /gcc/unroll.c
parent87fc3db7132e6199bac0e699194ccac8902ebc0a (diff)
downloadgcc-40e81af5f03b079ca6d0dfefc5e5f13241b66271.zip
gcc-40e81af5f03b079ca6d0dfefc5e5f13241b66271.tar.gz
gcc-40e81af5f03b079ca6d0dfefc5e5f13241b66271.tar.bz2
(loop_iterations): Use PREV_INSN not prev_nonnote_insn.
From-SVN: r7925
Diffstat (limited to 'gcc/unroll.c')
-rw-r--r--gcc/unroll.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/unroll.c b/gcc/unroll.c
index fafa627..7a3c4f9 100644
--- a/gcc/unroll.c
+++ b/gcc/unroll.c
@@ -3093,7 +3093,11 @@ loop_iterations (loop_start, loop_end)
loop_final_value = 0;
loop_iteration_var = 0;
- last_loop_insn = prev_nonnote_insn (loop_end);
+ /* We used to use pren_nonnote_insn here, but that fails because it might
+ accidentally get the branch for a contained loop if the branch for this
+ loop was deleted. We can only trust branches immediately before the
+ loop_end. */
+ last_loop_insn = PREV_INSN (loop_end);
comparison = get_condition_for_loop (last_loop_insn);
if (comparison == 0)