Overview
Upstream handling for the __builtin_add_overflow, __builtin_sub_overflow, and __builtin_mul_overflow functions, including implemetation and lowering of the cir.binop.overflow operation and the related variations of these builtins.
Suggested minimal test case
bool test_add_overflow_uint_uint_uint(unsigned x, unsigned y, unsigned *res) {
return __builtin_add_overflow(x, y, res);
}
Existing incubator tests
clang/test/CIR/CodeGen/builtins-overflow.cpp