Fixes Bug 26827 https://llvm.org/bugs/show_bug.cgi?id=26827
Currently, when stores are merged, all the uses of merged stores are
replaced with the chains of the stores, which may cause wrong
scheduling. For example, given a chain:
st1's chain <- st1 <- st2 <- st3 when st1 are st2 are merged, it becomes st1's chain <- new_st st1's chain <- st3
So write orders are not preserved.
This patch uses IROrder to set st3's chain to new_st. So it becomes
st1's chain <- new_st <- st3