https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46555
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
PRE does some of it via tail merge:
find_duplicates: <bb 7> duplicate of <bb 8>
find_duplicates: <bb 7> duplicate of <bb 9>
Removing basic block 8
Removing basic block 9
Obviously if you have more complex code it won't do it.
This an example where PRE does it:
int h(void);
int f(int a, int b, int c)
{
if (a)
return 2;
h();
if (b)
return 2;
h();
if (c)
return 2;
h();
return 4;
}
