Commit fb202364 by Tom de Vries Committed by Tom de Vries

[nvptx] Add exit after call to noreturn function

2017-09-25  Tom de Vries  <tom@codesourcery.com>

	PR target/80035
	PR target/81069
	* config/nvptx/nvptx.c (nvptx_output_call_insn): Add exit after call to
	noreturn function.

From-SVN: r253145
parent 851e9f19
2017-09-25 Tom de Vries <tom@codesourcery.com>
PR target/80035
PR target/81069
* config/nvptx/nvptx.c (nvptx_output_call_insn): Add exit after call to
noreturn function.
2017-09-25 Richard Biener <rguenther@suse.de>
* graphite-optimize-isl.c (optimize_isl): Fail and dump if
......@@ -2304,11 +2304,14 @@ nvptx_output_call_insn (rtx_insn *insn, rtx result, rtx callee)
fprintf (asm_out_file, ";\n");
if (find_reg_note (insn, REG_NORETURN, NULL))
/* No return functions confuse the PTX JIT, as it doesn't realize
the flow control barrier they imply. It can seg fault if it
encounters what looks like an unexitable loop. Emit a trailing
trap, which it does grok. */
fprintf (asm_out_file, "\t\ttrap; // (noreturn)\n");
{
/* No return functions confuse the PTX JIT, as it doesn't realize
the flow control barrier they imply. It can seg fault if it
encounters what looks like an unexitable loop. Emit a trailing
trap and exit, which it does grok. */
fprintf (asm_out_file, "\t\ttrap; // (noreturn)\n");
fprintf (asm_out_file, "\t\texit; // (noreturn)\n");
}
if (result)
{
......
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