Thanks. This looks great to me. Has there been consensus on https://llvm.discourse.group/t/rfc-add-std-atomic-rmw-op/489 yet? There were no more replies but it seems nobody is opposed either.
x -> %x
Could you add a test for the case where the memref and result types disagree?
Do you have a new trait in mind or should this be supported by the SingleBlockImplicitTerminator trait? The body builder makes only sense if there is a single region.
These are somewhat widespread already. I'd rather have it as a separate cleanup.