shawnl added a comment. It is possible DCE will handle the null check with "nonnull" attribute, so add the test first. Otherwise I like how little code this took compared to earlier versions. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88460/new/ https://reviews.llvm.org/D88460