https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94584
Bug ID: 94584 Summary: memw is missing before u8/u16 volatile loads Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: jcmvbkbc at gcc dot gnu.org Target Milestone: --- Created attachment 48262 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48262&action=edit minimal reproducer xtensa-elf-gcc -O2 -S volatile.c results in the following code: .file "volatile.c" .text .align 4 .global load32 .type load32, @function load32: entry sp, 32 memw l32i.n a2, a2, 0 retw.n .size load32, .-load32 .align 4 .global load16s .type load16s, @function load16s: entry sp, 32 l16ui a2, a2, 0 sext a2, a2, 15 retw.n .size load16s, .-load16s .align 4 .global load16u .type load16u, @function load16u: entry sp, 32 l16ui a2, a2, 0 retw.n .size load16u, .-load16u .align 4 .global load8 .type load8, @function load8: entry sp, 32 l8ui a2, a2, 0 retw.n .size load8, .-load8 .ident "GCC: (GNU) 9.2.0" There must be memw before l16ui and l8ui.