I use documentation for atomic_exchange from: https://gcc.gnu.org/onlinedocs/gccint/Standard-Names.html#Standard-Names When defining machine description for atomic_exchange, I find that GCC mark operands[1] as volatile such that (MEM_VOLATILE_P (operands[1])) returns TRUE; even when the memory operand is not declared using the C keyword "volatile". Is there a way to have atomic_exchange not marking operands[1] as volatile unless the memory operand was declared volatile ?