https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123111
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |pinskia at gcc dot
gnu.org
Status|NEW |ASSIGNED
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Thinking about this, we can do some basic ifconv in the last phiopt.
That is if we have:
```
if (a) goto bb1; else goto bb2;
bb1:
bb2:
b = PHI <c(bb1),d(bb0)>
```
This can be convert to:
b = a ? c : d;
if `fold_before_rtl_expansion_p()` is true (and the middle bb's are empty).
This will fix this issue and maybe even help other ifconv which we had issues
with before.
expand will then decide what is best for the COND_EXPR.
I might have a patch early next week.