================
@@ -3647,7 +3707,34 @@ bool InterpretBuiltin(InterpState &S, CodePtr OpPC,
const CallExpr *Call,
S, OpPC, Call, [](const APSInt &F, const APSInt &T, const APSInt &C) {
return ((APInt)C).isNegative() ? T : F;
});
-
+ case X86::BI__builtin_ia32_ptestz128:
+ case X86::BI__builtin_ia32_ptestz256:
+ case X86::BI__builtin_ia32_vtestzps:
+ case X86::BI__builtin_ia32_vtestzps256:
+ case X86::BI__builtin_ia32_vtestzpd:
+ case X86::BI__builtin_ia32_vtestzpd256:
----------------
RKSimon wrote:
ps/pd test only test the signbits - not the full vector.
best way to deal with this is to have specific callbacks for int/ps/pd, so
something like this for ps/f32:
```
[](const APInt &A, const APInt &B) {
APInt M = APInt::getSplat(A.getBitwidth(), APInt::getSignMask(32));
return ((A& M) & (B & M)) == 0; }
```
similar for pd (f64) - naturally the logic can be simplified depending on the
test op.
https://github.com/llvm/llvm-project/pull/160428
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits