[clang] [llvm] Adding splitdouble HLSL function (PR #109331)
Tex Riddell via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 23 20:45:50 PDT 2024
================
@@ -2074,6 +2083,19 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) {
return true;
break;
}
+ case Builtin::BI__builtin_hlsl_elementwise_splitdouble: {
+ if (SemaRef.checkArgCount(TheCall, 3))
+ return true;
+
+ if (CheckScalarOrVector(&SemaRef, TheCall, SemaRef.Context.DoubleTy, 0) ||
+ CheckScalarOrVector(&SemaRef, TheCall, SemaRef.Context.UnsignedIntTy,
+ 1) ||
+ CheckScalarOrVector(&SemaRef, TheCall, SemaRef.Context.UnsignedIntTy,
+ 2))
+ return true;
----------------
tex3d wrote:
I just realized that we don't have tests for the `__builtin_hlsl_elementwise_splitdouble` operation for these diagnostics. I think we need checks similar to those found in `clang/test/Sema/builtins-elementwise-math.c` but in a new test under `clang/test/SemaHLSL/BuiltIns/`.
https://github.com/llvm/llvm-project/pull/109331
More information about the cfe-commits
mailing list