[clang] [llvm] [clang][HLSL] Add WaveIsFirstLane() intrinsic (PR #103299)
Chris B via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 19 11:44:54 PDT 2024
================
@@ -18660,6 +18660,10 @@ case Builtin::BI__builtin_hlsl_elementwise_isinf: {
llvm::FunctionType::get(IntTy, {}, false), "__hlsl_wave_get_lane_index",
{}, false, true));
}
+ case Builtin::BI__builtin_hlsl_wave_is_first_lane: {
+ Intrinsic::ID ID = CGM.getHLSLRuntime().getWaveIsFirstLaneIntrinsic();
+ return EmitRuntimeCall(Intrinsic::getDeclaration(&CGM.getModule(), ID));
----------------
llvm-beanz wrote:
The intrinsic call getters seems to be a pattern that may grow a lot, and if many of them are going to be followed by EmitRuntimeCall, maybe we could add a `emitConvergentIntrinsic` method to make it more general?
https://github.com/llvm/llvm-project/pull/103299
More information about the cfe-commits
mailing list