ac/nir: Implement LLVM9 64-bit buffer compare & exchange.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Fri, 2 Aug 2019 10:01:34 +0000 (12:01 +0200)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Fri, 2 Aug 2019 10:26:11 +0000 (12:26 +0200)
commita17f2206d3cc89e5284934054ba18f3ee74c2ac6
treef7c2b36d7f3a985a342c6a03e92da680389e3de6
parent73274c9ec218117d4a7de34a35f39b4e9aef8d5a
ac/nir: Implement LLVM9 64-bit buffer compare & exchange.

LLVM 9 does not have a 64-bit buffer compswap intrinsic, so this
extracts the ptr, does a bound check and then uses a cmpxchg LLVM
instruction.

Not ideal, but the earliest release we're going to get a proper
intrinsic is LLVM 10.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/amd/common/ac_nir_to_llvm.c