+2015-11-27 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/68536
+ * lra.c (lra_emit_add): Add code for null base.
+ * lra-constraints.c (curr_insn_transform): Skip operators for
+ subreg reloads.
+
2015-11-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
Revert
depend on memory mode. */
for (i = 0; i < n_operands; i++)
{
- rtx op = *curr_id->operand_loc[i];
- rtx subst, old = op;
+ rtx op, subst, old;
bool op_change_p = false;
+
+ if (curr_static_id->operand[i].is_operator)
+ continue;
+ old = op = *curr_id->operand_loc[i];
if (GET_CODE (old) == SUBREG)
old = SUBREG_REG (old);
subst = get_equiv_with_elimination (old, curr_insn);
base = a1;
index = a2;
}
- if (! (REG_P (base) || GET_CODE (base) == SUBREG)
+ if ((base != NULL_RTX && ! (REG_P (base) || GET_CODE (base) == SUBREG))
|| (index != NULL_RTX
&& ! (REG_P (index) || GET_CODE (index) == SUBREG))
|| (disp != NULL_RTX && ! CONSTANT_P (disp))
rtx_insn *insn = emit_add2_insn (x, disp);
if (insn != NULL_RTX)
{
- insn = emit_add2_insn (x, base);
- if (insn != NULL_RTX)
+ if (base == NULL_RTX)
ok_p = true;
+ else
+ {
+ insn = emit_add2_insn (x, base);
+ if (insn != NULL_RTX)
+ ok_p = true;
+ }
}
}
if (! ok_p)
{
+ rtx_insn *insn;
+
delete_insns_since (last);
/* Generate x = disp; x = x + base; x = x + index_scale. */
emit_move_insn (x, disp);
- rtx_insn *insn = emit_add2_insn (x, base);
- lra_assert (insn != NULL_RTX);
+ if (base != NULL_RTX)
+ {
+ insn = emit_add2_insn (x, base);
+ lra_assert (insn != NULL_RTX);
+ }
insn = emit_add2_insn (x, index_scale);
lra_assert (insn != NULL_RTX);
}