moveUp() moves instructions, so we should move the corresponding memory accesses as well. We should also move the store instruction itself: Even though we'll end up removing it later, this gives us a correct MemoryDef to replace.
Noticed this discrepancy while looking at D26739.
clang-format: please reformat the code