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 target/16657] New: Dead stack adjustion code not removed


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


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