See Note [improveConditional] for details.
I think the comment is much improved already but still slightly misleading.
This was never really true was it? We happily invert all conditionals that match the pattern if they make it this far.
It works because all other(non float) expressions should have been simplified by this point.
I've made it more specific than it used to be - before it was inverting every !=, now it's only doing that if it can save a comparison. Currently I believe the only cases where that happens are the floating-point ones, but it doesn't do any harm to do it for any comparison. I'll clarify the comment.
It's a fixup to this previous change: https://phabricator.haskell.org/rGHC6d14c1485cb570cbd183bcdc0f858d9a6dc1eb31
No testcase I'm afraid (but there wasn't one for the original change either).