https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112819
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
CC| |fkastl at suse dot cz,
| |hubicka at gcc dot gnu.org,
| |rguenth at gcc dot gnu.org
Last reconfirmed| |2023-12-04
Ever confirmed|0 |1
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
We don't "re-associate" branches. But we might want to turn if-to-switch
into sth that does (relaxing the restriction on the ifs testing the same var).
We should have a PHI node with incoming vals predicated by the ifs, free to
re-order otherwise.
The *a deref might impose some limitations for re-ordering, but we can always
handle it last in this case.
Might be also interesting to order branches which are predictable earlier.
Related to switch-conversion/if-to-switch IMHO.