[llvm] [HLSL][SPIR-V] Add SV_DispatchThreadID semantic support (PR #82536)

Chris B via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 22 16:24:22 PST 2024


================
@@ -1427,6 +1432,8 @@ bool SPIRVInstructionSelector::selectIntrinsic(Register ResVReg,
           .addUse(I.getOperand(2).getReg())
           .addUse(I.getOperand(3).getReg());
     break;
+  case Intrinsic::dx_thread_id:
+    return selectDXThreadId(ResVReg, ResType, I);
----------------
llvm-beanz wrote:

This feels weird to me. Using an intrinsic from another target isn't something I've ever seen done before in LLVM.

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


More information about the llvm-commits mailing list