This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug rtl-optimization/38644] [4.4/4.5/4.6/4.7 Regression] Optimization flag -O1 -fschedule-insns2 causes wrong code


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38644

--- Comment #51 from rguenther at suse dot de <rguenther at suse dot de> 2011-09-26 08:04:37 UTC ---
On Mon, 12 Sep 2011, rearnsha at arm dot com wrote:

> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38644
> 
> --- Comment #48 from Richard Earnshaw <rearnsha at arm dot com> 2011-09-12 15:31:51 UTC ---
> On 12/09/11 16:18, law at redhat dot com wrote:
> 
> > A much simpler way to fix this is to emit a barrier just prior to 
> > mucking around with stack pointer in the epilogue.  That's how targets 
> > have dealt with this exact issue for a couple decades.
> 
> Simpler, but wrong.  The compiler should not be generating unsafe code
> by default.  The problem is in the mid-end and expecting every port to
> get this right in order to work-around a mid-end bug is just stupid
> stupid stupid.
> 
> The mid end should not be scheduling around stack moves unless it has
> been explicitly told it is safe to do this.  I don't understand why
> there is so much resistance to fixing the problem properly.

The middle-end does not treat stack moves specially, they are just
memory accesses.  Extra dependences have to be modeled accordingly.
It's a hack to treat stack moves specially, not a proper fix.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]