[clang] [llvm] [HLSL][DXIL] Implement WaveGetLaneIndex Intrinsic (PR #111576)
    Finn Plummer via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Oct  9 10:29:29 PDT 2024
    
    
  
================
@@ -18827,9 +18827,21 @@ case Builtin::BI__builtin_hlsl_elementwise_isinf: {
         ArrayRef<Value *>{Op0, Op1}, nullptr, "hlsl.step");
   }
   case Builtin::BI__builtin_hlsl_wave_get_lane_index: {
-    return EmitRuntimeCall(CGM.CreateRuntimeFunction(
-        llvm::FunctionType::get(IntTy, {}, false), "__hlsl_wave_get_lane_index",
-        {}, false, true));
+    // Since we don't define a SPIR-V intrinsic for the SPIR-V built-in from
+    // SPIRVBuiltins.td, manually get the matching name for the DirectX
+    // intrinsic and the demangled builtin name
----------------
inbelic wrote:
The SPIR-V side has already been implemented using a builtin defined in `SPIRVBuiltins.td`. I will improve the comment to be more clear.
https://github.com/llvm/llvm-project/pull/111576
    
    
More information about the llvm-commits
mailing list