https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70287
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |compile-time-hog Status|UNCONFIRMED |NEW Last reconfirmed| |2016-03-18 Summary|Slow compilation time |RTL LSM very slow with very | |many loads/stores in a BB Ever confirmed|0 |1 --- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> --- Works fine with GCC 6 btw. Note that compile-time hog testcases where you need to disable dead code removal are ... a bit fishy ;) Note that tree optimizers optimize this to a single basic-block (everything unrolled) but w/o all the scalar cleanups 90000 stmts remain in that basic-block. With -ffloat-store another 180000 stores/loads are emitted at RTL expansion time and GCSE SM barfs on this (well, it could specially detect that in a single-basic-block function there is nothing to do ... ;)) But as said, I think the testcase is quite artificial though it has a point in that it looks like LSM is awfully slow for basic-blocks with very many loads/stores (well, not that surprising). For GCC 6 I can't find enough options to disable, I always end up with just <bb 2>: var0_110 = -212204486; ivtmp_111 = 9; var0_116 = var0_110 + 1; var0_121 = var0_116 + 1; var0_126 = var0_121 + 1; var0_133 = var0_126 + 1; var0_137 = var0_133 + 1; var0_142 = var0_137 + 1; var0_149 = var0_142 + 1; var0_154 = var0_149 + 1; ivtmp_155 = ivtmp_111 + 4294967288; var0_37 = var0_154 + 1; ivtmp_18 = ivtmp_155 + 4294967295; return 0; before RTL expansion (tried to disable forwprop, DOM and VRP). So, kind of "confirmed", but the artificial testcase should be rewritten to not require all those disabled opts but directly have a very large single BB with many loads/stores (or better at least some LSM opportunities) that are _not_ dead.