spatel added a comment. Ping. Note that there's another bug that I think will be helped by this patch - https://bugs.llvm.org/show_bug.cgi?id=35354 . https://reviews.llvm.org/D40304 is proposing to fix that in instcombine. https://reviews.llvm.org/D38566