================ @@ -2903,6 +2903,55 @@ static bool interp__builtin_elementwise_triop( return true; } +static bool interp__builtin_pternlog(InterpState &S, CodePtr OpPC, + const CallExpr *Call, bool MaskZ) { + assert(Call->getNumArgs() == 5); + + const VectorType *VecT = Call->getArg(0)->getType()->castAs<VectorType>(); + unsigned DstLen = VecT->getNumElements(); + PrimType DstElemT = *S.getContext().classify(VecT->getElementType()); + + APSInt U = popToAPSInt(S.Stk, *S.getContext().classify(Call->getArg(4))); + APSInt Imm = popToAPSInt(S.Stk, *S.getContext().classify(Call->getArg(3))); + const Pointer &C = S.Stk.pop<Pointer>(); + const Pointer &B = S.Stk.pop<Pointer>(); + const Pointer &A = S.Stk.pop<Pointer>(); + + const Pointer &Dst = S.Stk.peek<Pointer>(); + + for (unsigned I = 0; I < DstLen; ++I) { + APSInt a, b, c; ---------------- tbaederr wrote:
Not too happy about the lowercase naming here. https://github.com/llvm/llvm-project/pull/158703 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits