uabelho added a comment. Thanks aprantl and bjope! I think I addressed the comments. I ran tests on the patch all night and found another case where we need to special case isUndef(), I fixed that too in the updated patch. https://reviews.llvm.org/D48277