diff options
author | Vladimir Makarov <vmakarov@redhat.com> | 2015-11-27 18:26:12 +0000 |
---|---|---|
committer | Vladimir Makarov <vmakarov@gcc.gnu.org> | 2015-11-27 18:26:12 +0000 |
commit | 0b87be09b012920618fa78ac4cef269e02614924 (patch) | |
tree | bbdcf30112b4d67b3294abd65a3dd7d217763fd2 /gcc/lra.c | |
parent | 921da19854e9f9dba416dc68c57379231c6ca52b (diff) | |
download | gcc-0b87be09b012920618fa78ac4cef269e02614924.zip gcc-0b87be09b012920618fa78ac4cef269e02614924.tar.gz gcc-0b87be09b012920618fa78ac4cef269e02614924.tar.bz2 |
re PR rtl-optimization/68536 (LRA ICEs with new arm pattern)
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.
From-SVN: r231021
Diffstat (limited to 'gcc/lra.c')
-rw-r--r-- | gcc/lra.c | 20 |
1 files changed, 15 insertions, 5 deletions
@@ -382,7 +382,7 @@ lra_emit_add (rtx x, rtx y, rtx z) 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)) @@ -442,18 +442,28 @@ lra_emit_add (rtx x, rtx y, rtx z) 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); } |