From: Sandra Loosemore Date: Wed, 1 Jul 2015 02:15:32 +0000 (-0400) Subject: c6x.c (try_rename_operands): Do not depend on gcc_assert evaluating its argument... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1e32ce0bc5b459c4743f0f77b8f005dfa94da36f;p=gcc.git c6x.c (try_rename_operands): Do not depend on gcc_assert evaluating its argument for side-effect. 2015-06-30 Sandra Loosemore gcc/ * config/c6x/c6x.c (try_rename_operands): Do not depend on gcc_assert evaluating its argument for side-effect. From-SVN: r225221 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 65b3ffc8e23..bedeee19ff6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-06-30 Sandra Loosemore + + * config/c6x/c6x.c (try_rename_operands): Do not depend on + gcc_assert evaluating its argument for side-effect. + 2015-06-30 Kaz Kojima PR target/64833 diff --git a/gcc/config/c6x/c6x.c b/gcc/config/c6x/c6x.c index b76a268ddb4..159335d75c9 100644 --- a/gcc/config/c6x/c6x.c +++ b/gcc/config/c6x/c6x.c @@ -3450,6 +3450,7 @@ try_rename_operands (rtx_insn *head, rtx_insn *tail, unit_req_table reqs, int best_reg, old_reg; vec involved_chains = vNULL; unit_req_table new_reqs; + bool ok; for (i = 0, tmp_mask = op_mask; tmp_mask; i++) { @@ -3516,7 +3517,8 @@ try_rename_operands (rtx_insn *head, rtx_insn *tail, unit_req_table reqs, best_reg = find_rename_reg (this_head, super_class, &unavailable, old_reg, true); - gcc_assert (regrename_do_replace (this_head, best_reg)); + ok = regrename_do_replace (this_head, best_reg); + gcc_assert (ok); count_unit_reqs (new_reqs, head, PREV_INSN (tail)); merge_unit_reqs (new_reqs); @@ -3529,7 +3531,10 @@ try_rename_operands (rtx_insn *head, rtx_insn *tail, unit_req_table reqs, unit_req_imbalance (reqs), unit_req_imbalance (new_reqs)); } if (unit_req_imbalance (new_reqs) > unit_req_imbalance (reqs)) - gcc_assert (regrename_do_replace (this_head, old_reg)); + { + ok = regrename_do_replace (this_head, old_reg); + gcc_assert (ok); + } else memcpy (reqs, new_reqs, sizeof (unit_req_table));