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 tree-optimization/78821] GCC7: Copying whole 32 bits structure field by field not optimised into copying whole 32 bits at once


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78821

--- Comment #30 from Uroš Bizjak <ubizjak at gmail dot com> ---
Another unhandled case:

--cut here--
typedef __SIZE_TYPE__ size_t;

void baz (char *buf, size_t base, unsigned int data)
{
  buf[base] = data;
  buf[base+1] = data >> 8;
}
--cut here--

compiles to:

        movb    %dl, (%rdi,%rsi)
        movb    %dh, 1(%rdi,%rsi)
        ret

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