[llvm-branch-commits] [clang] [HLSL] Introduce address space `hlsl_constant(2)` for constant buffer declarations (PR #123411)
Helena Kotas via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Jan 22 10:23:53 PST 2025
================
@@ -1,7 +1,14 @@
-// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
-// RUN: dxil-pc-shadermodel6.3-library %s \
+// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.3-library %s \
// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s
+// RUN: %clang_cc1 -finclude-default-header -triple spirv-pc-vulkan-library %s \
+// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s
+
+// CHECK: @a = external addrspace(2) externally_initialized global float, align 4
+// CHECK: @b = external addrspace(2) externally_initialized global double, align 8
+// CHECK: @c = external addrspace(2) externally_initialized global float, align 4
+// CHECK: @d = external addrspace(2) externally_initialized global double, align 8
+
// CHECK: @[[CB:.+]] = external constant { float, double }
----------------
hekota wrote:
There is going to be a pass after codegen that will translate all of the addrspace(2) globals and loads to constant buffer load intrinsics. An update to the constant buffers design document that explains this coming soon.
https://github.com/llvm/llvm-project/pull/123411
More information about the llvm-branch-commits
mailing list