[PATCH] D32725: [InstCombine] Apply deMorgan to (and/or (not cmp1), cmp2) when cmp1 has multiple uses, but cmp2 has a single use

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 2 11:46:10 PDT 2017


efriedma added a comment.

I'm not quite sure about this the way it's written.  This doesn't reduce the total number of instructions on its own, and it seems like an overly complicated pattern.  You could approach this from a different angle: fold xor(icmp(pred, x, y)) to (icmp (!pred, x, y)) even if the inner icmp has multiple uses.  Or maybe this is okay as-is; my intuition about what's right here isn't strong.


https://reviews.llvm.org/D32725





More information about the llvm-commits mailing list