create_convert_operand_from (&ops[opno], rhs_rtx,
TYPE_MODE (rhs_type),
TYPE_UNSIGNED (rhs_type));
+ else if (TREE_CODE (rhs) == SSA_NAME
+ && SSA_NAME_IS_DEFAULT_DEF (rhs)
+ && VAR_P (SSA_NAME_VAR (rhs)))
+ create_undefined_input_operand (&ops[opno], TYPE_MODE (rhs_type));
else
create_input_operand (&ops[opno], rhs_rtx, TYPE_MODE (rhs_type));
opno += 1;
goto input;
}
break;
+
+ case EXPAND_UNDEFINED_INPUT:
+ /* See if the predicate accepts a SCRATCH rtx, which in this context
+ indicates an undefined value. Use an uninitialized register if not. */
+ if (!insn_operand_matches (icode, opno, op->value))
+ {
+ op->value = gen_reg_rtx (op->mode);
+ goto input;
+ }
+ return true;
}
return insn_operand_matches (icode, opno, op->value);
}
switch (op1->type)
{
case EXPAND_OUTPUT:
- /* Outputs must remain distinct. */
+ case EXPAND_UNDEFINED_INPUT:
+ /* Outputs and undefined intputs must remain distinct. */
return false;
case EXPAND_FIXED:
EXPAND_CONVERT_TO,
EXPAND_CONVERT_FROM,
EXPAND_ADDRESS,
- EXPAND_INTEGER
+ EXPAND_INTEGER,
+ EXPAND_UNDEFINED_INPUT
};
/* Information about an operand for instruction expansion. */
create_expand_operand (op, EXPAND_INPUT, value, mode, false);
}
+/* Make OP describe an undefined input operand of mode MODE. MODE cannot
+ be null. */
+
+inline void
+create_undefined_input_operand (class expand_operand *op, machine_mode mode)
+{
+ create_expand_operand (op, EXPAND_UNDEFINED_INPUT, gen_rtx_SCRATCH (mode),
+ mode, false);
+}
+
/* Like create_input_operand, except that VALUE must first be converted
to mode MODE. UNSIGNED_P says whether VALUE is unsigned. */