================
@@ -3523,6 +3523,26 @@ bool InterpretBuiltin(InterpState &S, CodePtr OpPC,
const CallExpr *Call,
return F;
});
+ case X86::BI__builtin_ia32_vpmadd52luq128:
+ case X86::BI__builtin_ia32_vpmadd52luq256:
+ case X86::BI__builtin_ia32_vpmadd52luq512:
+ return interp__builtin_elementwise_triop(
+ S, OpPC, Call, [](const APSInt &A, const APSInt &B, const APSInt &C) {
+ APSInt Result(A + (B.trunc(52) * C.trunc(52)).trunc(52).zext(64),
+ false);
+ return APSInt(Result.trunc(52).zext(64), false);
----------------
RKSimon wrote:
This is incorrect - only the multiply occurs as i52 - the accumulate is full
i64:
```
return APSInt(A + (B.trunc(52) * C.trunc(52)).trunc(52).zext(64), false);
```
Same for the others.
https://github.com/llvm/llvm-project/pull/161056
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits