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

Jeffrey A. Law <law at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |law at gcc dot gnu.org
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2024-03-07
                 CC|                            |law at gcc dot gnu.org

--- Comment #6 from Jeffrey A. Law <law at gcc dot gnu.org> ---
I think this is trivial to do in DOM and not handling these cases could easily
be seen as an oversight.

When we fail to find an expression in the hash table of available expressions,
we have a bit of existing code that can ask about a relation between two
operands of a binary operator and based on that relation possibly simplify the
original expression.

So for example, if we have:

 _4 = MIN_EXPR <a_2(D), b_3(D)>;

And the MIN_EXPR expression isn't in the hash table, we look to see if we have
recorded a_2 == b_3 and if so we simplify the MIN_EXPR into a copy.

So this is just a matter of extending that code ever so slightly to do an
additional lookup.

Reply via email to