https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56223
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 --- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> --- I have a start to this, though it needs to be fixed. It only works for the following extra case now: int f(int a, int b, int c) { int d0, d1, d; d1 = __builtin_abs(b); if (a) { d0 = __builtin_abs(c); d = d0; } else { d = d1; } return d; } I also noticed that factor_out_conditional_conversion has a similar issue where the cast is inside both if and else part.