[llvm] [NVPTX] Stop using 16-bit CAS instructions from PTX (PR #120220)
Artem Belevich via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 7 16:29:34 PST 2025
Artem-B wrote:
> On the flipside, this degrades codegen for 16-bit cmpxchg: https://godbolt.org/z/rMbfc33dz
Interesting. One thing I notice that 32-bit cmpxchg loop does issue a `YIELD` on each iteration, while `atom.cas.b16` does not.
Is `YIELD` required to guarantee forward progress?
E.g. if the atomic var is constantly changed by some other CM, and we're unlucky to have cmpxchg failing on the time, will 32-bit version allow other threads in a warp to progress, while the 16-bit one would keep them stuck?
https://github.com/llvm/llvm-project/pull/120220
More information about the llvm-commits
mailing list