Skip to content
Snippets Groups Projects
Commit 1098d3a5 authored by Jakub Jelinek's avatar Jakub Jelinek Committed by Jakub Jelinek
Browse files

re PR rtl-optimization/41239 (Scheduler reorders division by zero before a...

re PR rtl-optimization/41239 (Scheduler reorders division by zero before a call that might not return)

	PR rtl-optimization/41239
	* sched-int.h (struct deps): Add last_function_call_may_noreturn field.
	* sched-rgn.c (deps_join): Join also last_function_call_may_noreturn
	lists.
	* sched-deps.c (sched_analyze_insn): Prevent moving trapping insns
	across calls, as the calls might not always return normally.
	(call_may_noreturn_p): New function.
	(deps_analyze_insn): Update last_function_call_may_noreturn list.
	(init_deps): Initialize it.
	(remove_from_deps): Also remove calls from
	last_function_call_may_noreturn list.

	* gcc.c-torture/execute/pr41239.c: New test.

From-SVN: r151500
parent c673a2c7
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment