[clang] [llvm] [HLSL][SPIR-V] Implement vk::push_constant (PR #166793)

Steven Perron via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 10 07:58:45 PST 2025


================
@@ -845,6 +846,17 @@ Type *SPIRVEmitIntrinsics::deduceElementTypeHelper(
       } else {
         llvm_unreachable("Unknown handle type for spv_resource_getpointer.");
       }
+    } else if (II &&
+               II->getIntrinsicID() == Intrinsic::spv_pushconstant_getpointer) {
+      auto *GV = cast<GlobalVariable>(II->getOperand(0));
+      auto *HandleType = cast<TargetExtType>(GV->getValueType());
+      if (HandleType->getTargetExtName() == "spirv.PushConstant") {
----------------
s-perron wrote:

should this be an assert or error of some type? What else could the handle type be? 

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


More information about the llvm-commits mailing list