https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120242
--- Comment #3 from Jeffrey A. Law <law at gcc dot gnu.org> --- Phew. After another debugging session I think this is ultimately an ext-dce bug. The promoted state on the key object is correct; the referenced patch just prevents the promoted state from being unnecessarily invalidated. The real issue, much like the other active ext-dce bug is a failure to account for the extra live bits implied by a promoted state. We end up making a transformation in ext-dce that looks reasonable, but is ultimately wrong and exposed as such by combine's transformations.