[Bug tree-optimization/90594] [9/10 regression] Spurious popcount emitted

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu May 23 12:07:00 GMT 2019


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90594

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
For example DCE could, when it comes to marking a loop-closed PHI node
necessary see if it can replace it by computing the final value and if
so do _not_ mark its definition necessary (and record this somewhere).
If at the end the definition did not become necessary we will remove it
and replace the LC PHI with the final value computation.  If not then
we keep the loop-closed PHI.  We already perform similar tricks for
eliding malloc/free pairs for example.  IVOPTs would be another candidate
which could disregard some IV uses if it can replace them via a
final value.


More information about the Gcc-bugs mailing list