Commit 2ca57608 by H.J. Lu

re PR target/40489 (gcc.dg/builtin-unreachable-3.c doesn't work on ia64)

2009-06-27  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/40489
	* config/ia64/ia64.c (ia64_reorg): Check NULL insn.

From-SVN: r149014
parent 8122ccf1
......@@ -9239,20 +9239,24 @@ ia64_reorg (void)
insn = get_last_insn ();
if (! INSN_P (insn))
insn = prev_active_insn (insn);
/* Skip over insns that expand to nothing. */
while (GET_CODE (insn) == INSN && get_attr_empty (insn) == EMPTY_YES)
{
if (GET_CODE (PATTERN (insn)) == UNSPEC_VOLATILE
&& XINT (PATTERN (insn), 1) == UNSPECV_INSN_GROUP_BARRIER)
saw_stop = 1;
insn = prev_active_insn (insn);
}
if (GET_CODE (insn) == CALL_INSN)
if (insn)
{
if (! saw_stop)
emit_insn (gen_insn_group_barrier (GEN_INT (3)));
emit_insn (gen_break_f ());
emit_insn (gen_insn_group_barrier (GEN_INT (3)));
/* Skip over insns that expand to nothing. */
while (GET_CODE (insn) == INSN
&& get_attr_empty (insn) == EMPTY_YES)
{
if (GET_CODE (PATTERN (insn)) == UNSPEC_VOLATILE
&& XINT (PATTERN (insn), 1) == UNSPECV_INSN_GROUP_BARRIER)
saw_stop = 1;
insn = prev_active_insn (insn);
}
if (GET_CODE (insn) == CALL_INSN)
{
if (! saw_stop)
emit_insn (gen_insn_group_barrier (GEN_INT (3)));
emit_insn (gen_break_f ());
emit_insn (gen_insn_group_barrier (GEN_INT (3)));
}
}
}
......
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