[clang] [llvm] [HLSL] Implement SV_GroupThreadId semantic (PR #117781)

Zhengxing li via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 6 09:44:15 PST 2024


================
@@ -389,6 +389,11 @@ llvm::Value *CGHLSLRuntime::emitInputSemantic(IRBuilder<> &B,
         CGM.getIntrinsic(getThreadIdIntrinsic());
     return buildVectorInput(B, ThreadIDIntrinsic, Ty);
   }
+  if (D.hasAttr<HLSLSV_GroupThreadIDAttr>()) {
+    llvm::Function *GroupThreadIDIntrinsic =
+        CGM.getIntrinsic(Intrinsic::dx_thread_id_in_group);
----------------
lizhengxing wrote:

@llvm-beanz Done. Added the SPIR-V lowering in this commit https://github.com/llvm/llvm-project/pull/117781/commits/28f823454873d4bc029f2ec57bed3a9707bbf1b2

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


More information about the cfe-commits mailing list