[clang] [llvm] Add cross builtins and cross HLSL function to DirectX and SPIR-V backend (PR #109180)
Joshua Batista via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 20 15:09:59 PDT 2024
================
@@ -1704,6 +1704,20 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) {
return true;
break;
}
+ case Builtin::BI__builtin_hlsl_cross: {
+ if (SemaRef.checkArgCount(TheCall, 2))
+ return true;
+ if (CheckVectorElementCallArgs(&SemaRef, TheCall))
+ return true;
+ if (CheckFloatOrHalfRepresentations(&SemaRef, TheCall))
+ return true;
+
----------------
bob80905 wrote:
There are also other asserts to catch when the size isn't 3, I don't think this is needed.
https://github.com/llvm/llvm-project/pull/109180
More information about the cfe-commits
mailing list