https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88405
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2018-12-10 CC| |hubicka at gcc dot gnu.org, | |matz at gcc dot gnu.org, | |rguenth at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- Confirmed. But in general a prerequesite to eliminate Section A is fusion of both loop nests and then CSEing the loads from a and b and finally eliminate the stores as dead because a and b are only written to. For the testcase we eliminate Section B because 'c' is discovered as writeonly. But we do not update the writeonly flag of a or b when removing uses (and IMHO we cannot easily). Note we perform this "DSE" in fixup_cfg.