spatel added a comment. Note - the re-motivation to look at this pattern came up because there's a similar problem in the "ideal" example in PR6137: https://llvm.org/bugs/show_bug.cgi?id=6137#c6 https://reviews.llvm.org/D26641