mssimpso added a comment. I also see quite a bit of duplication with SLP. Could this also be done with the ConsecutiveStore and ConsecutiveLoad optimizations in SelectionDAG? http://reviews.llvm.org/D19501