[clang] [llvm] [HLSL] Implement ddx/ddy_coarse intrinsics (PR #164831)
Alexander Johnston via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 23 11:30:43 PDT 2025
================
@@ -360,6 +373,19 @@ bool SemaSPIRV::CheckSPIRVBuiltinFunctionCall(const TargetInfo &TI,
case SPIRV::BI__builtin_spirv_generic_cast_to_ptr_explicit: {
return checkGenericCastToPtr(SemaRef, TheCall);
}
+ case SPIRV::BI__builtin_spirv_ddx_coarse:
+ case SPIRV::BI__builtin_spirv_ddy_coarse: {
+ if (SemaRef.checkArgCount(TheCall, 1))
+ return true;
+
+ if (CheckAllArgTypesAreCorrect(&SemaRef, TheCall,
+ CheckFloatOrHalfRepresentation))
+ return true;
+
+ QualType RetTy = TheCall->getArg(0)->getType();
+ TheCall->setType(RetTy);
+ break;
+ }
----------------
Alexander-Johnston wrote:
Reverted
https://github.com/llvm/llvm-project/pull/164831
More information about the llvm-commits
mailing list