According to the GCC docs on inline asm
asm statements that have no output operands and asm goto statements,
are implicitly volatile.
We tend to see the volatile qualifier tacked on to asm statements "just
to be safe" when in reality it makes no difference in IR for asm goto
statements or output-less asm. The sideeffect flag is set on such IR
Really the volatile asm-qualifier exists only to signal that an asm
statement should not be DCE'd (when it has outputs but they are unused),
CSE'd, or LICM'd. It is not a general compiler barrier.
Create a new warning, -Wasm-volatile and warn in either case.