efriedma added a comment. Yes, like I said, your original testcase doesn't get merged by DAGCombine unless "-combiner-global-alias-analysis" is enabled (which it isn't, by default). Repository: rL LLVM https://reviews.llvm.org/D48725