[PATCH] D33801: [InstSimplify][ConstantFolding] Teach constant folding how to handle icmp null, (inttoptr x) as well as it handles icmp (inttoptr x), null

Davide Italiano via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 1 14:41:29 PDT 2017


davide added a comment.

This is exactly the same transform, just with the operands commuted, isn't it? Is there a way to avoid the code duplication & share the two codepaths?
That would be great if we find a bug in one of them, so that we don't have to replicate the fix in the other.

Thanks!


https://reviews.llvm.org/D33801





More information about the llvm-commits mailing list