splitMergedValStore will split a store into two if target prefers this, or if -force-split-store is passed.
There is currently no check for endianness when this is done, which results in wrong code. This patch adds handling for this along with a test case.