We discussed this a bit in D21899.
By creating the official 'not' IR construct, we can:
- Remove DeMorgan-matching code that was added specifically to work-around the missing transform in http://reviews.llvm.org/rL248634.
- Make the DeMorgan transform for vectors too.
- Fix PR28476: https://llvm.org/bugs/show_bug.cgi?id=28476
I don't see any other transforms that were relying on the previous transform, so I think it's safe to replace it.
The test changes outside of the demorgan-zext.ll file look neutral to me; those just show that the xor gets pulled ahead of the zext. But we could make the argument that those transforms actually are improvements too because doing logic ops in a smaller type should always provide >= optimization opportunity to later passes.