Commit 7a3c92a5 by Jim Wilson Committed by Jim Wilson

Fix bug found by i960 simulator testing.

	* i960/i960.h (CONST_COSTS, case CONST_INT): Accept power2_operand
	only when OUTER_CODE is SET.

From-SVN: r24199
parent 31c24861
Tue Dec 8 22:04:33 1998 Jim Wilson <wilson@cygnus.com>
* i960/i960.h (CONST_COSTS, case CONST_INT): Accept power2_operand
only when OUTER_CODE is SET.
Tue Dec 8 22:47:15 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
* loop.c (strength_reduce): If scan_start points to the loop exit
......
......@@ -1190,10 +1190,14 @@ extern struct rtx_def *gen_compare_reg ();
that can be non-ldconst operands in rare cases are cost 1. Other constants
have higher costs. */
/* Must check for OUTER_CODE of SET for power2_operand, because
reload_cse_move2add calls us with OUTER_CODE of PLUS to decide when
to replace set with add. */
#define CONST_COSTS(RTX, CODE, OUTER_CODE) \
case CONST_INT: \
if ((INTVAL (RTX) >= 0 && INTVAL (RTX) < 32) \
|| power2_operand (RTX, VOIDmode)) \
|| (OUTER_CODE == SET && power2_operand (RTX, VOIDmode))) \
return 0; \
else if (INTVAL (RTX) >= -31 && INTVAL (RTX) < 0) \
return 1; \
......
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