[PATCH] D45343: [InstCombine] Always remove null check before free

Dávid Bolvanský via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 18 07:43:21 PDT 2018


xbolva00 closed this revision.
xbolva00 added a comment.

In https://reviews.llvm.org/D45343#1069903, @spatel wrote:

> I don't understand what's going on here. Why is this patch marked 'Accepted'? In general, you shouldn't approve your own patches that you've posted for review.
>
> Beyond that, I don't understand why this is desirable. I think the reason this was coded with size optimization as a predicate is because the null check cheaply guards against a potentially expensive library call (cc @qcolombet as author of the original patch). This might be the correct transform for instcombine, but then there should be a backend transform that would add the null check back if it's profitable?


True. I will close this patch.


https://reviews.llvm.org/D45343





More information about the llvm-commits mailing list