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

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Ah, so this is using a switch as controlling expression.  Confirmed to be FRE
itself, FRE1 specifically.

Can you possibly generate a testcase with an order of magnitude smaller?

I noticed we're not forcing simple latches and not remember exactly why. 
Changing that improves things dramatically, from 232s to 9s and instead
shows

 tree CCP                           :   3.81 ( 40%)

probably due to a similar issue.

The original VN took 150 iterations:

RPO iteration over 1205 blocks visited 18138 blocks in total discovering 1205
executable blocks iterating 15.0 times, a block was visited max. 100 times
RPO tracked 471 values available at 470 locations and 471 lattice elements

after the fix:

RPO iteration over 1206 blocks visited 2081 blocks in total discovering 1206
executable blocks iterating 1.7 times, a block was visited max. 3 times
RPO tracked 573 values available at 571 locations and 573 lattice elements

Reply via email to