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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2019-10-28
     Ever confirmed|0                           |1

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
It's kind-of tail-duplication that is required here.  The jump threading code
can likely be abused here but the important thing is of course the costing
where unlike with jump-threading, there's no branch that will go away.

In theory (and with --param logical-op-non-short-circuit=0) GVN PRE could
also see that the multiplication result is fully available on both
arms (but the VN part doesn't know about conditional equivalences [yet]).

That said, it's a value-numbering issue as soon as (like here) a value
is always known to have some specific value.

But yes, it might be easier to have another transform simplify the problem
for us.

Oh, and logical-op-non-short-circuit manifests itself too early.

Reply via email to