------- Comment #2 from mikpe at it dot uu dot se 2010-04-20 09:39 ------- Created an attachment (id=20438) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20438&action=view) reduced test case
With this reduced test case I see the missed-optimization for both ARM and Thumb modes with gcc 4.5 and 4.4. The cause seems to be the non-zero offset in the src array; if I change memcpy's src operand from &src[1] to &src[0] the memcpy does get inlined. However, even then the allocation of the long long tmp does not get eliminated, leaving two redundant SP adjustments in the final code. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43814