Commit 9cb95c07 by Vladimir Makarov Committed by Vladimir Makarov

re PR rtl-optimization/88179 ([MIPS] pr84941.c ICE in…

re PR rtl-optimization/88179 ([MIPS]  pr84941.c ICE in lra_eliminate_reg_if_possible at lra-eliminations.c:1393  start with r266385)

2018-11-30  Vladimir Makarov  <vmakarov@redhat.com>

	PR rtl-optimization/88179
	* lra-constraints.c (address_eliminator::address_eliminator):
	Don't eleminate regs in illegitimate address.

From-SVN: r266682
parent 8863a902
2018-11-30 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/88179
* lra-constraints.c (address_eliminator::address_eliminator):
Don't eleminate regs in illegitimate address.
2018-11-30 David Malcolm <dmalcolm@redhat.com> 2018-11-30 David Malcolm <dmalcolm@redhat.com>
PR preprocessor/88257 PR preprocessor/88257
...@@ -359,6 +359,11 @@ address_eliminator::address_eliminator (struct address_info *ad) ...@@ -359,6 +359,11 @@ address_eliminator::address_eliminator (struct address_info *ad)
if (m_base_loc != NULL) if (m_base_loc != NULL)
{ {
m_base_reg = *m_base_loc; m_base_reg = *m_base_loc;
/* If we have non-legitimate address which is decomposed not in
the way we expected, don't do elimination here. In such case
the address will be reloaded and elimination will be done in
reload insn finally. */
if (REG_P (m_base_reg))
lra_eliminate_reg_if_possible (m_base_loc); lra_eliminate_reg_if_possible (m_base_loc);
if (m_ad->base_term2 != NULL) if (m_ad->base_term2 != NULL)
*m_ad->base_term2 = *m_ad->base_term; *m_ad->base_term2 = *m_ad->base_term;
...@@ -366,6 +371,7 @@ address_eliminator::address_eliminator (struct address_info *ad) ...@@ -366,6 +371,7 @@ address_eliminator::address_eliminator (struct address_info *ad)
if (m_index_loc != NULL) if (m_index_loc != NULL)
{ {
m_index_reg = *m_index_loc; m_index_reg = *m_index_loc;
if (REG_P (m_index_reg))
lra_eliminate_reg_if_possible (m_index_loc); lra_eliminate_reg_if_possible (m_index_loc);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment