This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned
- From: "hjl dot tools at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Oct 2009 20:54:11 -0000
- Subject: [Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned
- References: <bug-40838-1600@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #59 from hjl dot tools at gmail dot com 2009-10-15 20:54 -------
(In reply to comment #58)
> (In reply to comment #53)
> > Created an attachment (id=18656)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18656&action=view) [edit]
> > An updated patch for gcc 4.4
>
> Seamonkey is correct with that patch. But it fails with structures containing
> sse vector, i.e. this. My patch (in comment #46) handles this case correctly
> (it reallign the stack if any structure on it has alignment at least 16), so
> should we submit that patch instead?
>
> I think it's wrong to add alignment test to the autovectorizer because vector
> data types can be created explicitly without autovectorizer.
>
> Mikulas
>
>
> typedef int v4si __attribute__ ((vector_size (16)));
>
> struct x {
> v4si v;
> v4si w;
> };
>
> void y(void *);
>
> v4si x(void)
> {
> struct x x;
> y(&x);
> }
>
Why should gcc align the stack when SSE registers aren't used
at all?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40838