[clang] [llvm] [HLSL] Implementation of dot intrinsic (PR #81190)

Chris B via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 23 13:58:50 PST 2024


================
@@ -19594,23 +19750,45 @@ bool Sema::PrepareBuiltinElementwiseMathOneArgCall(CallExpr *TheCall) {
   TheCall->setArg(0, A.get());
   QualType TyA = A.get()->getType();
 
-  if (checkMathBuiltinElementType(*this, A.get()->getBeginLoc(), TyA))
+  if (checkMathBuiltinElementType(*this, A.get()->getBeginLoc(), TyA, 1))
     return true;
 
   TheCall->setType(TyA);
   return false;
 }
 
 bool Sema::SemaBuiltinElementwiseMath(CallExpr *TheCall) {
+  QualType Res;
+  bool result = SemaBuiltinVectorMath(TheCall, Res);
+  if (result)
+    return true;
+  TheCall->setType(Res);
+  return false;
+}
+
+bool Sema::SemaBuiltinVectorToScalarMath(CallExpr *TheCall) {
+  QualType Res;
+  bool result = SemaBuiltinVectorMath(TheCall, Res);
+  if (result)
----------------
llvm-beanz wrote:

nit:

```suggestion
  if (SemaBuiltinVectorMath(TheCall, Res))
```

https://github.com/llvm/llvm-project/pull/81190


More information about the llvm-commits mailing list