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

David Peixotto via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Aug 20 12:03:59 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)
----------------
dmpots wrote:

Is it worth adding a test for a RWBuffer as well? I don't think it changes based on the buffer type, but thought I'd ask.

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


More information about the llvm-branch-commits mailing list