Commit 8a09bb27 by Jim Wilson Committed by Jim Wilson

Fix ia64-linux miscompilation or tcl/generic/tclCompExpr.c

Fix ia64-linux miscompilation or tcl/generic/tclCompExpr.c
	* loop.c (check_final_value): Check for biv use before checking for
	giv use.  Check for both biv and giv uses.  Always set last_giv_use
	if there is a giv use.

From-SVN: r36104
parent 11a13704
2000-09-01 Jim Wilson <wilson@cygnus.com>
* loop.c (check_final_value): Check for biv use before checking for
giv use. Check for both biv and giv uses. Always set last_giv_use
if there is a giv use.
2000-09-01 Richard Henderson <rth@cygnus.com> 2000-09-01 Richard Henderson <rth@cygnus.com>
* config/ia64/ia64.md (mulsi3): Use grfr_register_operand. * config/ia64/ia64.md (mulsi3): Use grfr_register_operand.
......
...@@ -5677,19 +5677,25 @@ check_final_value (loop, v) ...@@ -5677,19 +5677,25 @@ check_final_value (loop, v)
if (GET_CODE (p) == INSN || GET_CODE (p) == JUMP_INSN if (GET_CODE (p) == INSN || GET_CODE (p) == JUMP_INSN
|| GET_CODE (p) == CALL_INSN) || GET_CODE (p) == CALL_INSN)
{ {
if (biv_increment_seen) /* It is possible for the BIV increment to use the GIV if we
have a cycle. Thus we must be sure to check each insn for
both BIV and GIV uses, and we must check for BIV uses
first. */
if (! biv_increment_seen
&& reg_set_p (v->src_reg, PATTERN (p)))
biv_increment_seen = 1;
if (reg_mentioned_p (v->dest_reg, PATTERN (p)))
{ {
if (reg_mentioned_p (v->dest_reg, PATTERN (p))) if (biv_increment_seen)
{ {
v->replaceable = 0; v->replaceable = 0;
v->not_replaceable = 1; v->not_replaceable = 1;
break; break;
} }
last_giv_use = p;
} }
else if (reg_set_p (v->src_reg, PATTERN (p)))
biv_increment_seen = 1;
else if (reg_mentioned_p (v->dest_reg, PATTERN (p)))
last_giv_use = p;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment