https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94589
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #50710|0 |1 is obsolete| | --- Comment #18 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 50719 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50719&action=edit gcc12-pr94589-wip.patch Updated patch. This already does the optimizations, though needs testcase coverage and perhaps something better for debug uses of the PHI_RESULT besides the single non-debug use. And, it won't work together with the above mentioned forwprop patch, I'm afraid it would need to virtually undo that change but it would be hard.