================
@@ -4189,6 +4189,53 @@ static bool interp__builtin_ia32_gfni_mul(InterpState 
&S, CodePtr OpPC,
   return true;
 }
 
+static bool interp__builtin_ia32_vpdp(InterpState &S, CodePtr OpPC,
+                                      const CallExpr *Call, bool IsDottingWord,
+                                      bool IsSaturating) {
+  const auto *SrcVecT = Call->getArg(0)->getType()->castAs<VectorType>();
+  const auto *OpAVecT = Call->getArg(1)->getType()->castAs<VectorType>();
+  const auto *OpBVecT = Call->getArg(2)->getType()->castAs<VectorType>();
+
+  PrimType SrcElemT = *S.getContext().classify(SrcVecT->getElementType());
+  PrimType OpAElemT = *S.getContext().classify(OpAVecT->getElementType());
+  PrimType OpBElemT = *S.getContext().classify(OpBVecT->getElementType());
----------------
AkashDeoNU wrote:

Thanks for the feedback.

I think S, A, and B must be different types. This is why I chose not use 
another helper function (static bool interp__builtin_elementwise_triop). Even 
though S, A, and B must have the same bitwidths, S is a vector of PT_Sint32, A 
and B are vectors of either PT_Sint8 or PT_Sint16. So, they have to be 
different types.

Given that, how should I properly cast them below? Is there a simple way to do 
that I'm missing, @tbaederr?

https://github.com/llvm/llvm-project/pull/190549
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to