https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121881
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> --- You can't generally do this when alias-sets differ (unless one is zero, which you can then pick). See the various redundant store issues - you need to second guess all following reads valid with either version and "common" to a variant valid for all of them (including thinking about TBAA "paths"). Using alias-set zero when !operand_equal_p would be a possibility. We do have a "compatibility" predicate, used for example by ICF.