https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69592
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org --- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 37544 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37544&action=edit gcc6-pr69592.patch Untested fix. Not all ARITHMETIC_P rtxes are handled in nonzero_bits1 or num_sign_bit_copies1 (and even from those that are only some of them recurse to both operands). The cached_* stuff is to catch the cases where we recurse into both operands; if we don't, then it might be more or significantly more work to do it instead of less work. On the included artificial testcase (didn't want to include crypto stuff into a testcase) on x86_64 we need about 5.5GB of RAM without the patch and almost nothing with the patch.