https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69592
Bug ID: 69592 Summary: [6 Regression] Compile-time and memory-use hog in combine Product: gcc Version: 6.0 Status: UNCONFIRMED Keywords: compile-time-hog, memory-hog Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: rguenth at gcc dot gnu.org Target Milestone: --- Created attachment 37539 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37539&action=edit preprocessed source When building mozilla-nss on 32bit i586 (and the preprocesed source on x86_64) one can observe the build taking > 1GB of memory (didn't see if it eventually finishes). It "hangs" in a deep recursion of #0 0x0000000000dce437 in copy_rtx (orig=0x7ffff6140978) at /space/rguenther/src/svn/trunk3/gcc/rtl.c:275 #1 0x0000000000dce5aa in copy_rtx (orig=0x7ffff6140a08) at /space/rguenther/src/svn/trunk3/gcc/rtl.c:332 #2 0x000000000171c451 in get_last_value (x=0x7ffff61409f0) at /space/rguenther/src/svn/trunk3/gcc/combine.c:13174 #3 0x0000000001714688 in reg_nonzero_bits_for_combine (x=0x7ffff61409f0, mode=CCCmode, known_x=0x0, known_mode=VOIDmode, known_ret=0, nonzero=0x7fffffff68e0) at /space/rguenther/src/svn/trunk3/gcc/combine.c:9859 #4 0x0000000000dd8967 in nonzero_bits1 (x=0x7ffff61409f0, mode=CCCmode, known_x=0x0, known_mode=VOIDmode, known_ret=0) at /space/rguenther/src/svn/trunk3/gcc/rtlanal.c:4317 #5 0x0000000000dd82e5 in cached_nonzero_bits (x=0x7ffff61409f0, mode=CCCmode, known_x=0x0, known_mode=VOIDmode, known_ret=0) at /space/rguenther/src/svn/trunk3/gcc/rtlanal.c:4207 #6 0x0000000000dd8cf5 in nonzero_bits1 (x=0x7ffff6140a68, mode=CCCmode, known_x=0x0, known_mode=VOIDmode, known_ret=0) at /space/rguenther/src/svn/trunk3/gcc/rtlanal.c:4452 ... #201 0x0000000000dd974a in cached_num_sign_bit_copies (x=0x7ffff6778060, mode=CCCmode, known_x=0x0, known_mode=VOIDmode, known_ret=0) at /space/rguenther/src/svn/trunk3/gcc/rtlanal.c:4712 #202 0x0000000000dd812b in num_sign_bit_copies (x=0x7ffff6778060, mode=CCCmode) at /space/rguenther/src/svn/trunk3/gcc/rtlanal.c:4163 #203 0x000000000171b3fd in record_value_for_reg (reg=0x7ffff6778ab0, insn=0x7ffff6496280, value=0x7ffff6778060) at /space/rguenther/src/svn/trunk3/gcc/combine.c:12734 #204 0x000000000171b4b9 in record_dead_and_set_regs_1 (dest=0x7ffff6778ab0, setter=0x7ffff6778ac8, data=0x7ffff6496280) at /space/rguenther/src/svn/trunk3/gcc/combine.c:12763 #205 0x0000000000dd3bcd in note_stores (x=0x7ffff6778ac8, fun= 0x171b40d <record_dead_and_set_regs_1(rtx, const_rtx, void*)>, data=0x7ffff6496280) at /space/rguenther/src/svn/trunk3/gcc/rtlanal.c:1860 where we see #203 0x000000000171b3fd in record_value_for_reg (reg=0x7ffff6778ab0, insn=0x7ffff6496280, value=0x7ffff6778060) at /space/rguenther/src/svn/trunk3/gcc/combine.c:12734 12734 = num_sign_bit_copies (value, GET_MODE (reg)); (gdb) p debug_rtx (value) (compare:CCC (plus:SI (reg:SI 1900 [ lo ]) (reg:SI 1903 [ tm ])) (reg:SI 1900 [ lo ]))