This is a generic combine to reduce icmp logic as discussed in:
https://bugs.llvm.org/show_bug.cgi?id=32401
I think these are all wins for targets in the affected tests, but a target could reverse this if it is not a win (or we can add a target hook to selectively disable this). A follow-up would allow us to canonicalize IR to the icmp form in instcombine.
I had initially enabled this for vectors too, but there were several regressions because of the scalar-limited constant matching in the combines above this one (and likely we're accidentally excluding vectors from folds that would reduce to those forms).
If you're going to do this, it would be nice to at least handle the inverse case: or(setne, setne). Not sure what other related cases are worth transforming.