================
@@ -3579,6 +3603,133 @@ bool InterpretBuiltin(InterpState &S, CodePtr OpPC,
const CallExpr *Call,
return ((APInt)C).isNegative() ? T : F;
});
+ case X86::BI__builtin_ia32_ptestz128:
+ case X86::BI__builtin_ia32_ptestz256:
+ return interp__builtin_test_op(
+ S, OpPC, Call,
+ [](const Pointer &LHS, const Pointer &RHS, const OptPrimType ElemPT,
+ const unsigned SourceLen) {
+ INT_TYPE_SWITCH_NO_BOOL(*ElemPT, {
+ for (unsigned I = 0; I < SourceLen; ++I) {
+ const APSInt A = LHS.elem<T>(I).toAPSInt();
+ const APSInt B = RHS.elem<T>(I).toAPSInt();
+ if (!((A & B) == 0)) {
+ return false;
+ }
+ }
+ });
+ return true;
+ });
----------------
kimsh02 wrote:
Yes to both. I'll work on it.
https://github.com/llvm/llvm-project/pull/160428
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits