[Bug tree-optimization/56982] [4.8/4.9 Regression] Bad optimization with setjmp()

2013-04-16 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56982 Jakub Jelinek changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

[Bug tree-optimization/56982] [4.8/4.9 Regression] Bad optimization with setjmp()

2013-04-16 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56982 --- Comment #3 from Jakub Jelinek 2013-04-16 16:04:10 UTC --- At RTL time (besides it being a pessimization), the thing is that _3 is assigned a pseudo (compared to before the change, where it had only a single use and thus has been TERed)

[Bug tree-optimization/56982] [4.8/4.9 Regression] Bad optimization with setjmp()

2013-04-17 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56982 Richard Biener changed: What|Removed |Added Status|NEW |ASSIGNED AssignedTo|una

[Bug tree-optimization/56982] [4.8/4.9 Regression] Bad optimization with setjmp()

2013-04-17 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56982 --- Comment #5 from Richard Biener 2013-04-17 08:48:33 UTC --- So the questions are: - is it desirable that uncprop does anything to SSA_NAME_VAR == NULL phis? sure - it is all about improving out-of-SSA coalescing opportunities and avo

[Bug tree-optimization/56982] [4.8/4.9 Regression] Bad optimization with setjmp()

2013-04-17 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56982 --- Comment #6 from Jakub Jelinek 2013-04-17 08:56:00 UTC --- I don't see how we could declare the testcase invalid, why would n need to be volatile? It isn't live across the setjmp call, it is even declared after the setjmp call, and it

[Bug tree-optimization/56982] [4.8/4.9 Regression] Bad optimization with setjmp()

2013-04-17 Thread rguenther at suse dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56982 --- Comment #7 from rguenther at suse dot de 2013-04-17 09:07:10 UTC --- On Wed, 17 Apr 2013, jakub at gcc dot gnu.org wrote: > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56982 > > --- Comment #6 from Jakub Jelinek 2013-04-17 >

[Bug tree-optimization/56982] [4.8/4.9 Regression] Bad optimization with setjmp()

2013-04-17 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56982 --- Comment #8 from Jakub Jelinek 2013-04-17 09:28:55 UTC --- #include #include static sigjmp_buf env; static inline int g (int x) { if (x) { fprintf (stderr, "Returning 0\n"); return 0; } else {

[Bug tree-optimization/56982] [4.8/4.9 Regression] Bad optimization with setjmp()

2013-04-17 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56982 --- Comment #9 from Richard Biener 2013-04-17 09:57:52 UTC --- Created attachment 29889 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29889 patch Untested patch. The patch handles setjmp similar to a non-local label, thus force

[Bug tree-optimization/56982] [4.8/4.9 Regression] Bad optimization with setjmp()

2013-04-17 Thread bugfeed at online dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56982 --- Comment #10 from Leif Leonhardy 2013-04-18 01:17:31 UTC --- "One proposed requirement on setjmp is that it be usable like any other function, that is, that it be callable in *any* expression context, and that the expression evaluate co