[clang] [llvm] [HLSL] Add `Increment`/`DecrementCounter` methods to structured buffers (PR #114148)

Greg Roth via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 7 14:34:19 PST 2024


================
@@ -35,6 +35,9 @@ def int_dx_typedBufferLoad_checkbit
 def int_dx_typedBufferStore
     : DefaultAttrsIntrinsic<[], [llvm_any_ty, llvm_i32_ty, llvm_anyvector_ty]>;
 
+def int_dx_bufferUpdateCounter
+    : DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_any_ty, llvm_i32_ty], [IntrWriteMem]>;
----------------
pow2clk wrote:

`IntrWriteMem` indicates that this only writes memory. Since it returns the original counter value, it does read some memory too.

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


More information about the cfe-commits mailing list