> I'd suggest to either revert the MEM_VOLATILE backport(s) for 3.4.4
> or else fix the regressions by something like the below patch.
I'm not going to to be tricked into chasing through a never-ending patch
sequence here. I have every confidence that your changes are correct,
Not only does his change look correct to me, but it would seem to be to
be required in any case. Indeed I always thought we *did* clear MEM_VOLATILE
when changing a REG to a MEM. When I go back and look at the 2.8 version
of those functions, we certainly do reset it (from, e.g., TREE_SIDE_EFFECTS).
I don't know when that was removed, but that removal was an error.
So I think those changes are needed anyway.