This patch applies demorgan when we detect an icmp of 2 cmps where one cmp is inverted, but the not can't be folded into the predicate because the cmp has another usage. If we are able to fold a not into the other cmp, we can do the transform and hope the remaining not can be folded away further up the chain. And even if its not folded away, we haven't increased the number of operations.
I plan to add more test cases in the InstCombine directory before committing this, but wanted to get an opinion on whether it makes sense.
Interestingly, the one test that changed here is for the transformation that caused the extra xors in my test case too.