+2004-05-27 Alan Modra <amodra@bigpond.net.au>
+
+ PR target/14478
+ * config/rs6000/rs6000.c (reg_or_neg_short_operand): Don't allow zero.
+
2004-05-27 Josef Zlomek <zlomekj@suse.cz>
PR middle-end/14084
}
/* Similar, except check if the negation of the constant would be
- valid for a D-field. */
+ valid for a D-field. Don't allow a constant zero, since all the
+ patterns that call this predicate use "addic r1,r2,-constant" on
+ a constant value to set a carry when r2 is greater or equal to
+ "constant". That doesn't work for zero. */
int
reg_or_neg_short_operand (rtx op, enum machine_mode mode)
{
if (GET_CODE (op) == CONST_INT)
- return CONST_OK_FOR_LETTER_P (INTVAL (op), 'P');
+ return CONST_OK_FOR_LETTER_P (INTVAL (op), 'P') && INTVAL (op) != 0;
return gpc_reg_operand (op, mode);
}