https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116398
--- Comment #25 from Jakub Jelinek <jakub at gcc dot gnu.org> --- And some further attempts in the 1500..5000 range: $ for i in 1500 2000 2500 3000 3500 4000 5000; do echo COMBLIM=$i time ./cc1plus -quiet -nostdinc -O2 pr101523.ii -mlong-double-128 -march=z196 -fpreprocessed -w; COMBLIM=$i time ./cc1plus -quiet -nostdinc -O2 pr101523.ii -mlong-double-128 -march=z196 -fpreprocessed -w; done COMBLIM=1500 time ./cc1plus -quiet -nostdinc -O2 pr101523.ii -mlong-double-128 -march=z196 -fpreprocessed -w 14.12user 0.15system 0:14.32elapsed 99%CPU (0avgtext+0avgdata 316544maxresident)k 0inputs+824outputs (0major+106337minor)pagefaults 0swaps COMBLIM=2000 time ./cc1plus -quiet -nostdinc -O2 pr101523.ii -mlong-double-128 -march=z196 -fpreprocessed -w 14.44user 0.12system 0:14.63elapsed 99%CPU (0avgtext+0avgdata 318616maxresident)k 0inputs+824outputs (0major+104871minor)pagefaults 0swaps COMBLIM=2500 time ./cc1plus -quiet -nostdinc -O2 pr101523.ii -mlong-double-128 -march=z196 -fpreprocessed -w 14.61user 0.13system 0:14.79elapsed 99%CPU (0avgtext+0avgdata 318880maxresident)k 0inputs+848outputs (0major+106934minor)pagefaults 0swaps COMBLIM=3000 time ./cc1plus -quiet -nostdinc -O2 pr101523.ii -mlong-double-128 -march=z196 -fpreprocessed -w 15.04user 0.15system 0:15.26elapsed 99%CPU (0avgtext+0avgdata 320672maxresident)k 0inputs+856outputs (0major+106836minor)pagefaults 0swaps COMBLIM=3500 time ./cc1plus -quiet -nostdinc -O2 pr101523.ii -mlong-double-128 -march=z196 -fpreprocessed -w 15.54user 0.13system 0:15.73elapsed 99%CPU (0avgtext+0avgdata 318856maxresident)k 0inputs+840outputs (0major+107193minor)pagefaults 0swaps COMBLIM=4000 time ./cc1plus -quiet -nostdinc -O2 pr101523.ii -mlong-double-128 -march=z196 -fpreprocessed -w 15.53user 0.12system 0:15.72elapsed 99%CPU (0avgtext+0avgdata 321640maxresident)k 0inputs+856outputs (0major+107824minor)pagefaults 0swaps COMBLIM=5000 time ./cc1plus -quiet -nostdinc -O2 pr101523.ii -mlong-double-128 -march=z196 -fpreprocessed -w 17.20user 0.15system 0:17.41elapsed 99%CPU (0avgtext+0avgdata 306276maxresident)k 0inputs+872outputs (0major+107194minor)pagefaults 0swaps $ for i in 1500 2000 2500 3000 3500 4000 5000; do rm pr101523.ii.*; echo COMBLIM=$i ./cc1plus -quiet -nostdinc -O2 pr101523.ii -mlong-double-128 -march=z196 -fpreprocessed -w -fdump-rtl-combine-stats; COMBLIM=$i ./cc1plus -quiet -nostdinc -O2 pr101523.ii -mlong-double-128 -march=z196 -fpreprocessed -w -fdump-rtl-combine-stats; awk '/^attempts:/{attempts+=$2}/^merges:/{merges+=$2}/^extras:/{extras+=$2}/^successes/{successes+=$2}/^two-insn combine:/{two+=$3}/^three-insn combine:/{three+=$3}/^four-insn combine:/{four+=$3}/^insn-with-note combine/{note+=$3}END{printf "attempts: %d\nmerges: %d\nextras: %d\nsuccesses: %d\ntwo-insn combine: %d\nthree-insn combine: %d\nfour-insn combine: %d\ninsn-with-note combine: %d\n", attempts, merges, extras, successes, two, three, four, note}' pr101523.ii.*combine*; done COMBLIM=1500 ./cc1plus -quiet -nostdinc -O2 pr101523.ii -mlong-double-128 -march=z196 -fpreprocessed -w -fdump-rtl-combine-stats attempts: 50696 merges: 49743 extras: 14793 successes: 4383 two-insn combine: 4382 three-insn combine: 1 four-insn combine: 0 insn-with-note combine: 0 COMBLIM=2000 ./cc1plus -quiet -nostdinc -O2 pr101523.ii -mlong-double-128 -march=z196 -fpreprocessed -w -fdump-rtl-combine-stats attempts: 59541 merges: 58588 extras: 17422 successes: 5229 two-insn combine: 5228 three-insn combine: 1 four-insn combine: 0 insn-with-note combine: 0 COMBLIM=2500 ./cc1plus -quiet -nostdinc -O2 pr101523.ii -mlong-double-128 -march=z196 -fpreprocessed -w -fdump-rtl-combine-stats attempts: 63403 merges: 62450 extras: 18572 successes: 5606 two-insn combine: 5605 three-insn combine: 1 four-insn combine: 0 insn-with-note combine: 0 COMBLIM=3000 ./cc1plus -quiet -nostdinc -O2 pr101523.ii -mlong-double-128 -march=z196 -fpreprocessed -w -fdump-rtl-combine-stats attempts: 63558 merges: 62605 extras: 18727 successes: 5762 two-insn combine: 5761 three-insn combine: 1 four-insn combine: 0 insn-with-note combine: 0 COMBLIM=3500 ./cc1plus -quiet -nostdinc -O2 pr101523.ii -mlong-double-128 -march=z196 -fpreprocessed -w -fdump-rtl-combine-stats attempts: 64203 merges: 63250 extras: 19372 successes: 6416 two-insn combine: 6415 three-insn combine: 1 four-insn combine: 0 insn-with-note combine: 0 COMBLIM=4000 ./cc1plus -quiet -nostdinc -O2 pr101523.ii -mlong-double-128 -march=z196 -fpreprocessed -w -fdump-rtl-combine-stats attempts: 70572 merges: 69616 extras: 21019 successes: 6745 two-insn combine: 6744 three-insn combine: 1 four-insn combine: 0 insn-with-note combine: 0 COMBLIM=5000 ./cc1plus -quiet -nostdinc -O2 pr101523.ii -mlong-double-128 -march=z196 -fpreprocessed -w -fdump-rtl-combine-stats attempts: 99213 merges: 98257 extras: 28052 successes: 7632 two-insn combine: 7631 three-insn combine: 1 four-insn combine: 0 insn-with-note combine: 0 So, I think even defaulting to say 3000 could work pretty well. It would be nice to find out what is the largest number seen say during x86_64/i686/aarch64/powerpc64le bootstraps/regtests, so that the chosen default limit doesn't trigger too often. And ideally make it a param.