+2007-09-09 David Daney <ddaney@avtrex.com>
+
+ * optabs.c (expand_sync_operation): Use plus insn if minus
+ CONST_INT_P(val).
+ (expand_sync_fetch_operation): Ditto.
+
2007-09-09 H.J. Lu <hongjiu.lu@intel.com>
* i386.md (*floatsisf2_mixed_vector): Use cvtdq2ps instead
case MINUS:
icode = sync_sub_optab[mode];
- if (icode == CODE_FOR_nothing)
+ if (icode == CODE_FOR_nothing || CONST_INT_P (val))
{
icode = sync_add_optab[mode];
if (icode != CODE_FOR_nothing)
case MINUS:
old_code = sync_old_sub_optab[mode];
new_code = sync_new_sub_optab[mode];
- if (old_code == CODE_FOR_nothing && new_code == CODE_FOR_nothing)
+ if ((old_code == CODE_FOR_nothing && new_code == CODE_FOR_nothing)
+ || CONST_INT_P (val))
{
old_code = sync_old_add_optab[mode];
new_code = sync_new_add_optab[mode];