[PATCH] D22271: [InstCombine] reverse canonicalization of xor(zext i1 A), 1 <---> zext(not i1 A, true) (PR28476)

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 13 12:14:38 PDT 2016


spatel added a comment.

In http://reviews.llvm.org/D22271#482114, @eli.friedman wrote:

> Is "zext(a_bool ^ true) ^ 2" canonical, or is "zext(a_bool) ^ 3"?  Either way, you're missing a transform.


Ah, I missed the point that you were making from your earlier comment. I'd say the ^3 version is canonical because less-instructions is better than 'not'.

I added tests for these patterns in http://reviews.llvm.org/rL275297 and http://reviews.llvm.org/rL275302 .


http://reviews.llvm.org/D22271





More information about the llvm-commits mailing list