https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79095
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Marc Glisse from comment #5)
> I thought ADD_OVERFLOW would appear in the widening_mul pass, i.e. after all
> the VRP passes are done? On the other hand, teaching VRP about *_OVERFLOW
> sounds like a good idea.
VRP already handles that, see /* Handle extraction of the two results (result
of arithmetics and
a flag whether arithmetics overflowed) from {ADD,SUB,MUL}_OVERFLOW
internal function. */
else if (is_gimple_assign (stmt)
&& (gimple_assign_rhs_code (stmt) == REALPART_EXPR
|| gimple_assign_rhs_code (stmt) == IMAGPART_EXPR)
&& INTEGRAL_TYPE_P (type))
guarded block in extract_range_basic and
if (is_gimple_call (stmt) && gimple_call_internal_p (stmt))
switch (gimple_call_internal_fn (stmt))
{
in vrp_visit_stmt.
IFN_*_OVERFLOW can appear already during gimplification if
__builtin_*_overflow{,_p} is used in the source.