public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/16657] New: Dead stack adjustion code not removed
@ 2004-07-21 12:32 falk at debian dot org
  2004-08-15  4:06 ` [Bug target/16657] " pinskia at gcc dot gnu dot org
  2005-05-18 17:15 ` rth at gcc dot gnu dot org
  0 siblings, 2 replies; 3+ messages in thread
From: falk at debian dot org @ 2004-07-21 12:32 UTC (permalink / raw)
  To: gcc-bugs

struct s2 { unsigned long a, b; };
unsigned long f8(struct s2 x) { return x.a + x.b; }

gets compiled to

	addq    a1,a0,v0
	lda     sp,-16(sp)
	lda     sp,16(sp)
	ret

The reason is probably that the structs get spilled to the stack, and
then the store/load is optimized out, but the stack adjustion remains.

Similar to the fixed PR 6882.

-- 
           Summary: Dead stack adjustion code not removed
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: enhancement
          Priority: P2
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: falk at debian dot org
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: alphaev68-unknown-linux-gnu
  GCC host triplet: alphaev68-unknown-linux-gnu
GCC target triplet: alphaev68-unknown-linux-gnu


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


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

* [Bug target/16657] Dead stack adjustion code not removed
  2004-07-21 12:32 [Bug target/16657] New: Dead stack adjustion code not removed falk at debian dot org
@ 2004-08-15  4:06 ` pinskia at gcc dot gnu dot org
  2005-05-18 17:15 ` rth at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-15  4:06 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-08-15 04:05 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-08-15 04:05:59
               date|                            |


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


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

* [Bug target/16657] Dead stack adjustion code not removed
  2004-07-21 12:32 [Bug target/16657] New: Dead stack adjustion code not removed falk at debian dot org
  2004-08-15  4:06 ` [Bug target/16657] " pinskia at gcc dot gnu dot org
@ 2005-05-18 17:15 ` rth at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: rth at gcc dot gnu dot org @ 2005-05-18 17:15 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From rth at gcc dot gnu dot org  2005-05-18 17:15 -------
We don't assign TImode to this structure, because we assume TImode needs
128-bit alignment, and this structure has 64-bit alignment.  Which means
that the structure gets BLKmode.  All BLKmode parameters are allocated 
stack space in assign_parm_setup_block.

What we'd like to do is allocate a TImode register anyway.

-- 


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


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

end of thread, other threads:[~2005-05-18 17:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-21 12:32 [Bug target/16657] New: Dead stack adjustion code not removed falk at debian dot org
2004-08-15  4:06 ` [Bug target/16657] " pinskia at gcc dot gnu dot org
2005-05-18 17:15 ` rth at gcc dot gnu dot 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).