This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/41239] Scheduler reorders division by zero before a call that might not return
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Sep 2009 09:24:34 -0000
- Subject: [Bug rtl-optimization/41239] Scheduler reorders division by zero before a call that might not return
- References: <bug-41239-87@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from jakub at gcc dot gnu dot org 2009-09-03 09:24 -------
sched-deps.c uses may_trap_p only to find out what insns can't be speculated,
possibly trapping MEMs are handled by deps_may_trap_p.
I wonder what exactly we want to forbid to cure this testcase.
Just DIV/MOD/UDIV/UMOD that may_trap_p being moved across a function call that
might not return (all CALL_Ps or all except a few known builtins? Say memcpy
or strcpy could be said to always return), or all may_trap_p insns across all
calls that might not return, or even across all such calls and all trapping
insns?
Ideas?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41239