+2018-08-19 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/86994
+ * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
+ register_operand when calling ix86_set_reg_reg_cost.
+ [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
+ Set *total to 0 for operands that satisfy x86_64_immediate_operand
+ predicate and to 1 otherwise.
+
2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
* config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
{
case SET:
if (register_operand (SET_DEST (x), VOIDmode)
- && reg_or_0_operand (SET_SRC (x), VOIDmode))
+ && register_operand (SET_SRC (x), VOIDmode))
{
*total = ix86_set_reg_reg_cost (GET_MODE (SET_DEST (x)));
return true;
case CONST:
case LABEL_REF:
case SYMBOL_REF:
- if (TARGET_64BIT && !x86_64_immediate_operand (x, VOIDmode))
- *total = 3;
- else if (TARGET_64BIT && !x86_64_zext_immediate_operand (x, VOIDmode))
- *total = 2;
- else if (flag_pic && SYMBOLIC_CONST (x)
- && !(TARGET_64BIT
- && (GET_CODE (x) == LABEL_REF
- || (GET_CODE (x) == SYMBOL_REF
- && SYMBOL_REF_LOCAL_P (x))))
- /* Use 0 cost for CONST to improve its propagation. */
- && (TARGET_64BIT || GET_CODE (x) != CONST))
- *total = 1;
- else
+ if (x86_64_immediate_operand (x, VOIDmode))
*total = 0;
+ else
+ *total = 1;
return true;
case CONST_DOUBLE: