According to the GCC docs on inline asm
https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html#Volatile
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
instructions.
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.
should this go in clang/include/clang/Basic/DiagnosticSemaKinds.td instead?