Commit f6ba5bb2 by Oleg Endo

re PR target/67061 (sh64-elf: internal compiler error: in sh_find_set_of_reg, at…

re PR target/67061 (sh64-elf: internal compiler error: in sh_find_set_of_reg, at config/sh/sh-protos.h:235)

gcc/
	PR target/67061
	* config/sh/sh-protos.h (sh_find_set_of_reg): Simplfiy for-loop.
	Handle call insns.

From-SVN: r227750
parent eb472171
2015-09-14 Oleg Endo <olegendo@gcc.gnu.org>
PR target/67061
* config/sh/sh-protos.h (sh_find_set_of_reg): Simplfiy for-loop.
Handle call insns.
2015-09-14 Chung-Lin Tang <cltang@codesourcery.com>
* lto-wrapper.c (merge_and_complain): Add OPT_fdiagnostics_show_caret,
......
......@@ -192,18 +192,19 @@ sh_find_set_of_reg (rtx reg, rtx_insn* insn, F stepfunc,
if (!REG_P (reg) || insn == NULL_RTX)
return result;
rtx_insn* previnsn = insn;
for (result.insn = stepfunc (insn); result.insn != NULL_RTX;
previnsn = result.insn, result.insn = stepfunc (result.insn))
for (rtx_insn* i = stepfunc (insn); i != NULL_RTX; i = stepfunc (i))
{
if (BARRIER_P (result.insn))
if (BARRIER_P (i))
break;
if (!NONJUMP_INSN_P (result.insn))
continue;
if (reg_set_p (reg, result.insn))
if (!INSN_P (i) || DEBUG_INSN_P (i))
continue;
if (reg_set_p (reg, i))
{
result.set_rtx = set_of (reg, result.insn);
if (CALL_P (i))
break;
result.insn = i;
result.set_rtx = set_of (reg, i);
if (result.set_rtx == NULL_RTX || GET_CODE (result.set_rtx) != SET)
break;
......@@ -226,12 +227,6 @@ sh_find_set_of_reg (rtx reg, rtx_insn* insn, F stepfunc,
}
}
/* If the loop above stopped at the first insn in the list,
result.insn will be null. Use the insn from the previous iteration
in this case. */
if (result.insn == NULL)
result.insn = previnsn;
if (result.set_src != NULL)
gcc_assert (result.insn != NULL && result.set_rtx != NULL);
......
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