[clang] [llvm] [IR] Allow integer vector atomicrmw (PR #190716)

via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 2 02:53:56 PDT 2026


gonzalobg wrote:

> How should we handle integer vector atomicrmw in backends? Should we just let it fail in backends? Conservatively, I updated the shouldExpandAtomicRMWInIR default implementation to cmpxchg expand these.

If `elementwise` is not specified, and if the vector is smaller than the native size supported by the backend, and the backends don't override them, then AtomicExpand should just expand these with a cmpxchg loop.
Otherwise, we don't have builtins for these, so the backend should just fail.

If `elementwise` is specified, we can fragment the atomic into smaller atomics, like we do for FP vectors.



https://github.com/llvm/llvm-project/pull/190716


More information about the cfe-commits mailing list