[Bug tree-optimization/82732] malloc+zeroing other than memset not optimized to calloc, so asm output is malloc+memset
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Nov 7 16:32:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82732
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
For this exact testcase anywhere in between ldist and strlen pass, so e.g. in
dom or strlen passes. Though it would need to be something that handles what
vrp handles with ASSERT_EXPRs.
Yet another option is consider moving strlen pass right after vrp2 instead of
being before thread4 and vrp2. Dunno what kind of harm would that cause, if we
rely on vrp2 to clean stuff after strlen, or compute value ranges for whatever
that pass creates, etc.
Though https://gcc.gnu.org/ml/gcc-patches/2014-06/msg01784.html mentions that
having strlen before vrp2 is on purpose.
More information about the Gcc-bugs
mailing list