https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71261
--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> --- I have a simple patch improving it to tree loop if-conversion : 3.16 (52%) usr 0.82 (59%) sys 3.98 (53%) wall 315828 kB (79%) ggc rest of compilation : 2.49 (41%) usr 0.67 (49%) sys 2.97 (40%) wall 242780 kB (61%) ggc unaccounted todo : 0.02 ( 0%) usr 0.23 (17%) sys 0.25 ( 3%) wall 49155 kB (12%) ggc TOTAL : 6.11 1.38 7.50 400732 kB the most time is spent in immediate use walking in ifcvt_split_def_stmt while it looks only for uses on a single stmt. That can be sped up by walking uses on that stmt only. It's still slow, so a bigger reproducer is still appreciated.