@@ -5892,16 +5892,6 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
5892
5892
Name),
5893
5893
{NDRange, Kernel, Block}));
5894
5894
}
5895
-
5896
- case Builtin::BI__builtin_hlsl_wave_get_lane_index: {
5897
- auto *CI = EmitRuntimeCall(CGM.CreateRuntimeFunction(
5898
- llvm::FunctionType::get(IntTy, {}, false), "__hlsl_wave_get_lane_index",
5899
- {}, false, true));
5900
- if (getTarget().getTriple().isSPIRVLogical())
5901
- CI = dyn_cast<CallInst>(addControlledConvergenceToken(CI));
5902
- return RValue::get(CI);
5903
- }
5904
-
5905
5895
case Builtin::BI__builtin_store_half:
5906
5896
case Builtin::BI__builtin_store_halff: {
5907
5897
Value *Val = EmitScalarExpr(E->getArg(0));
@@ -18317,6 +18307,14 @@ Value *CodeGenFunction::EmitHLSLBuiltinExpr(unsigned BuiltinID,
18317
18307
/*ReturnType=*/Op0->getType(), Intrinsic::dx_rsqrt,
18318
18308
ArrayRef<Value *>{Op0}, nullptr, "dx.rsqrt");
18319
18309
}
18310
+ case Builtin::BI__builtin_hlsl_wave_get_lane_index: {
18311
+ auto *CI = EmitRuntimeCall(CGM.CreateRuntimeFunction(
18312
+ llvm::FunctionType::get(IntTy, {}, false), "__hlsl_wave_get_lane_index",
18313
+ {}, false, true));
18314
+ if (getTarget().getTriple().isSPIRVLogical())
18315
+ CI = dyn_cast<CallInst>(addControlledConvergenceToken(CI));
18316
+ return CI;
18317
+ }
18320
18318
}
18321
18319
return nullptr;
18322
18320
}
0 commit comments