+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
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; \