aboutsummaryrefslogtreecommitdiff
path: root/gcc/loop.c
diff options
context:
space:
mode:
authorJohn Wehle <john@feith.com>2000-06-14 07:41:57 +0000
committerJohn Wehle <wehle@gcc.gnu.org>2000-06-14 07:41:57 +0000
commit65b98a022fdda037209cd946c833e74fca928b86 (patch)
treee23b796ad13b0395af26197dccde4ba350c24687 /gcc/loop.c
parent11cf4d1831071d23c84e1add8a2d3fbdd360a82e (diff)
downloadgcc-65b98a022fdda037209cd946c833e74fca928b86.zip
gcc-65b98a022fdda037209cd946c833e74fca928b86.tar.gz
gcc-65b98a022fdda037209cd946c833e74fca928b86.tar.bz2
ifcvt.c (EDGE_COMPLEX): Move definition ...
* ifcvt.c (EDGE_COMPLEX): Move definition ... * basic-block.h (EDGE_COMPLEX): ... here. * loop.c (check_dbra_loop): Specify the register when generating REG_NONNEG notes and don't generate duplicates. From-SVN: r34542
Diffstat (limited to 'gcc/loop.c')
-rw-r--r--gcc/loop.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/gcc/loop.c b/gcc/loop.c
index 0e9d56c..066ef93 100644
--- a/gcc/loop.c
+++ b/gcc/loop.c
@@ -7835,9 +7835,10 @@ check_dbra_loop (loop, insn_count)
% (-INTVAL (bl->biv->add_val))) == 0)
{
/* register always nonnegative, add REG_NOTE to branch */
- REG_NOTES (PREV_INSN (loop_end))
- = gen_rtx_EXPR_LIST (REG_NONNEG, NULL_RTX,
- REG_NOTES (PREV_INSN (loop_end)));
+ if (! find_reg_note (jump, REG_NONNEG, NULL_RTX))
+ REG_NOTES (jump)
+ = gen_rtx_EXPR_LIST (REG_NONNEG, bl->biv->dest_reg,
+ REG_NOTES (jump));
bl->nonneg = 1;
return 1;
@@ -7860,9 +7861,10 @@ check_dbra_loop (loop, insn_count)
&& ! reg_set_between_p (bl->biv->dest_reg, p, loop_start)
&& INTVAL (bl->biv->add_val) == -1)
{
- REG_NOTES (PREV_INSN (loop_end))
- = gen_rtx_EXPR_LIST (REG_NONNEG, NULL_RTX,
- REG_NOTES (PREV_INSN (loop_end)));
+ if (! find_reg_note (jump, REG_NONNEG, NULL_RTX))
+ REG_NOTES (jump)
+ = gen_rtx_EXPR_LIST (REG_NONNEG, bl->biv->dest_reg,
+ REG_NOTES (jump));
bl->nonneg = 1;
return 1;
@@ -8260,7 +8262,7 @@ check_dbra_loop (loop, insn_count)
/* Increment of LABEL_NUSES done above. */
/* Register is now always nonnegative,
so add REG_NONNEG note to the branch. */
- REG_NOTES (tem) = gen_rtx_EXPR_LIST (REG_NONNEG, NULL_RTX,
+ REG_NOTES (tem) = gen_rtx_EXPR_LIST (REG_NONNEG, reg,
REG_NOTES (tem));
}
bl->nonneg = 1;