We missed a critical check in D30703. We must make sure that no intermediate store is sitting between the stores that we want to merge.
This should fix:
https://bugs.llvm.org/show_bug.cgi?id=36129
Thanks to Dave Green for the reduction and suggestion.