https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88097
--- Comment #2 from Daniel Fruzynski <bugzi...@poradnik-webmastera.com> --- Please also take a look on code which performs opposite conversion. gcc also does not use movbe here. Both gcc and clang are not able to optimize this into one 32-bit store, this is another possible optimization here. void test2(Test* s, uint32_t ip) { s->Word1 = htons(ip >> 16); s->Word2 = htons(ip); }