================
@@ -3359,6 +3391,143 @@ static bool
interp__builtin_ia32_cvt_vec2mask(InterpState &S, CodePtr OpPC,
pushInteger(S, RetMask, Call->getType());
return true;
}
+static bool interp__builtin_ia32_cvtsd2ss(InterpState &S, CodePtr OpPC,
+ const CallExpr *Call) {
+ assert(Call->getNumArgs() == 2);
+
+ const Pointer &B = S.Stk.pop<Pointer>();
+ const Pointer &A = S.Stk.pop<Pointer>();
+ if (!CheckLoad(S, OpPC, A) || !CheckLoad(S, OpPC, B))
+ return false;
+
+ const auto *DstVTy = Call->getType()->castAs<VectorType>();
+ unsigned NumElems = DstVTy->getNumElements();
+ const Pointer &Dst = S.Stk.peek<Pointer>();
+
+ // Copy all elements from A to Dst
+ for (unsigned I = 0; I != NumElems; ++I)
----------------
tbaederr wrote:
I guess we could as well start this loop at 1? We don't access `Dst[0]` after
that.
https://github.com/llvm/llvm-project/pull/169980
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits