[llvm-branch-commits] [DirectX] Lower `@llvm.dx.typedBufferLoad` to DXIL ops (PR #104252)

Justin Bogner via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Aug 29 17:49:09 PDT 2024


================
@@ -0,0 +1,102 @@
+; RUN: opt -S -dxil-op-lower %s | FileCheck %s
+
+target triple = "dxil-pc-shadermodel6.6-compute"
+
+declare void @scalar_user(float)
+declare void @vector_user(<4 x float>)
+
+define void @loadfloats() {
+  ; CHECK: [[BIND:%.*]] = call %dx.types.Handle @dx.op.createHandleFromBinding
+  ; CHECK: [[HANDLE:%.*]] = call %dx.types.Handle @dx.op.annotateHandle(i32 217, %dx.types.Handle [[BIND]]
+  %buffer = call target("dx.TypedBuffer", <4 x float>, 0, 0, 0)
----------------
bogner wrote:

I don't think it matters - the handle is just here because we need a valid type for the intrinsic to operate on and RWBuffer wouldn't make any difference.

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


More information about the llvm-branch-commits mailing list