public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/46721] New: Unnecessary stack instructions are generated for SPU when returning a struct
@ 2010-11-30 12:08 jadamcze at utas dot edu.au
  2010-11-30 13:49 ` [Bug target/46721] " rguenth at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: jadamcze at utas dot edu.au @ 2010-11-30 12:08 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: Unnecessary stack instructions are generated for SPU
                    when returning a struct
           Product: gcc
           Version: 4.5.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jadamcze@utas.edu.au


$ cat return.c 
#include <spu_intrinsics.h>

struct s { qword qs; };

struct s f(qword i) {
        return (struct s){i};
}

$ spu-elf-gcc return.c -std=c99 -c -S -o- -O3
        .file   "return.c"
.text
        .align  3
        .global f
        .type   f, @function
f:
        stqd    $sp,-48($sp)
        ai      $sp,$sp,-48
        ai      $sp,$sp,48
        bi      $lr
        .size   f, .-f
        .ident  "GCC: (Gentoo 4.5.1-r1 p1.3, pie-0.4.5) 4.5.1"


The three instructions referencing $sp are all redundant and should not be
generated.  These appear to be generated whenever a function returns a struct.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug target/46721] Unnecessary stack instructions are generated for SPU when returning a struct
  2010-11-30 12:08 [Bug target/46721] New: Unnecessary stack instructions are generated for SPU when returning a struct jadamcze at utas dot edu.au
@ 2010-11-30 13:49 ` rguenth at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-11-30 13:49 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-11-30 13:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-30 12:08 [Bug target/46721] New: Unnecessary stack instructions are generated for SPU when returning a struct jadamcze at utas dot edu.au
2010-11-30 13:49 ` [Bug target/46721] " rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).