https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90037
--- Comment #13 from Jeffrey A. Law <law at redhat dot com> --- So results from playing with do_rpo_vn. Running do_rpo_vn on the full function is slower than lattice cprop. It's on the order of a percent or two. I mostly did this because it was trivial to code up, verify it fixed the regression and see if performance was even in the right ballpark. Then I did a version which only called do_rpo_vn on blocks with single predecessors that had PHI nodes. ie, the vast majority of degenerate PHI cases. That still fixed the regression (as expected). Performance was ever so slightly worse than doing a full function lattice cprop. Overall it's on the order of .03%. THe resulting code is effectively the same as doing lattice cprop. So my current thought is to drop all the phi-only cprop code and use the lattice cprop instead, adding a single call to the pass between DOM and path isolation. The compile-time hit is going to be small, on the order of .4%. I could be convinced to use rpo_vn as well -- it's ultimately a wash in terms of compile-time and resulting code.