[clang][bytecode] Check new builtins for integer types (#111801)

These might also be called with vectors, but we don't support that.
This commit is contained in:
Timm Baeder
2024-10-10 10:23:59 +02:00
committed by GitHub
parent 1e49670b31
commit f1eac77617

View File

@@ -1287,6 +1287,11 @@ static bool interp__builtin_ia32_addcarry_subborrow(InterpState &S,
const InterpFrame *Frame,
const Function *Func,
const CallExpr *Call) {
if (!Call->getArg(0)->getType()->isIntegerType() ||
!Call->getArg(1)->getType()->isIntegerType() ||
!Call->getArg(2)->getType()->isIntegerType())
return false;
unsigned BuiltinOp = Func->getBuiltinID();
APSInt CarryIn = getAPSIntParam(Frame, 0);
APSInt LHS = getAPSIntParam(Frame, 1);