================ @@ -18317,6 +18307,14 @@ Value *CodeGenFunction::EmitHLSLBuiltinExpr(unsigned BuiltinID, /*ReturnType=*/Op0->getType(), Intrinsic::dx_rsqrt, ArrayRef<Value *>{Op0}, nullptr, "dx.rsqrt"); } + case Builtin::BI__builtin_hlsl_wave_get_lane_index: { + auto *CI = EmitRuntimeCall(CGM.CreateRuntimeFunction( + llvm::FunctionType::get(IntTy, {}, false), "__hlsl_wave_get_lane_index", + {}, false, true)); + if (getTarget().getTriple().isSPIRVLogical()) + CI = dyn_cast<CallInst>(addControlledConvergenceToken(CI)); + return RValue::get(CI); ---------------- farzonl wrote:
this isn't going to work we don't return RValues from this function that happens later see: https://github.com/llvm/llvm-project/blob/a8b0ecd2605ff23f495a8af64e06c35f86834e54/clang/lib/CodeGen/CGBuiltin.cpp#L6192C3-L6193C27 https://github.com/llvm/llvm-project/pull/87131 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits