https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78847
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> --- Actually disabling reassoc is enough to "fix" it, the patch itself is not needed, fixed by VRP then (which also folds stmts and knows the &MEM trick).