Path: utzoo!telly!attcan!uunet!tut.cis.ohio-state.edu!heather.pooh.com!bruce From: bruce@heather.pooh.com (Bruce Robertson) Newsgroups: gnu.gcc.bug Subject: cc -O2 produces better code than gcc 1.34 -O on Sun 3 Message-ID: Date: 21 Mar 89 06:44:00 GMT References: <8903201546.aa23080@PARIS.ICS.UCI.EDU> Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 13 How is it the Sun compiler is smart enough do to all that, and then generates code like this: addql #1,d1 | come on, this is just silly to miss! addql #1,d1 | movl d1,a0@ moveq #0,d0 | this is a "void" function, why return a value? unlk a6 rts I do agree that specifying "-fstrength-reduce" to gcc should optimize all those complex indexing addressing modes into a direct pointer to the address of "a[i]".