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

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

https://gcc.gnu.org/g:55c6baeb86b10912e98f4cf6b0a432d7c896d81e

commit r16-7761-g55c6baeb86b10912e98f4cf6b0a432d7c896d81e
Author: Jeff Law <[email protected]>
Date:   Sun Feb 22 09:26:38 2026 -0700

    [1/n][PR tree-optimization/90036] All refinement of entries in DOM hash
table

    This is the first of a few patches to fix pr90036.

    I've gone back and forth about whether or not to fix this for gcc-16 or
queue
    for gcc-17.  Ultimately I don't think these opportunities are *that*
common, so
    I don't expect widespread code generation changes.

    I'm going to drop the changes in a small series as the changes stand on
their
    own.  This gives us better bisectability.

    --

    The first patch allows refinement of existing equivalences in a case where
we'd
    missed it before.  In particular say we have <res> = <expr> in the
expression
    hash table.  We later use <expr> in a way that creates a temporary
expression
    equivalence.  We'll fail to record that temporary expression equivalence
    because of the pre-existing entry in the hash table.

    And just to be clear, the old equivalence will be restored when we leave
the
    domwalk scope of the newer, more precise, hash table entry.

    This matters for pr90036 as we initially enter a simple equivalence in the
    table with the result being an SSA_NAME.  Later we have a conditional that
    allows us to refine the result to a constant.  And we're going to need that
    constant result to trigger additional simplifications and equivalence
    discovery.

    Bootstrapped and regression tested on x86_64, aarch64, riscv64 and probably
a
    couple others as well.  It's also been tested across the embedded targets
in my
    tester.  Pushing to the trunk.

            PR tree-optimization/90036
    gcc/
            * tree-ssa-scopedtables.cc (avail_exprs_stack::record_cond): Always
            record the new hash table entry.

Reply via email to