https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128994

--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <[email protected]>:

https://gcc.gnu.org/g:9da087da59f1014a58c8fd57cf7f9c2ec3f9265e

commit r17-6751-g9da087da59f1014a58c8fd57cf7f9c2ec3f9265e
Author: Jakub Jelinek <[email protected]>
Date:   Fri Nov 27 09:57:48 2026 +0100

    bitintlower: Remove stmts with zero lhs uses instead of trying to expand
them [PR128994]

    I admit I don't know exactly what's going on here, I think for normal
    out-of-ssa except for PHIs (for which I've fixed it in PR127904) nothing
    guarantees there are no stmts with zero uses, one can turn off various
    dce passes or have transformations which result in such cases after
    the last dce.
    In any way, the following testcase fails due to coalescing being confused
    by such dead stmts and I don't know if it is because the code is trying to
    lower them prior to the bitint coalescing and lowering or because
coalescing
    can't handle dead stmts.

    This patch fixes it by not pre-lowering such dead stmts and instead
removing
    those.  That results in better generated code anyway.  If we get a testcase
    that has problems even on dead stmts not pre-lowered like this, I think we
    can just do a fast dce at the start of the pass after figuring out there
are
    some large/huge _BitInt SSA_NAMEs, or do that if we see some of those with
    has_zero_uses.

    2026-11-27  Jakub Jelinek  <[email protected]>

            PR middle-end/128994
            * gimple-lower-bitint.cc (gimple_lower_bitint): Remove rotate
            or minmax/abs stmts with zero lhs uses instead of trying to
            lower them.

            * gcc.dg/bitint-152.c: New test.

    Reviewed-by: Richard Biener <[email protected]>

Reply via email to