If the ~X wasn't able to simplify above the max/min, we might be able to simplify it by moving it below the max/min.
I had to modify the ~(min/max ~X, Y) transform to prevent getting stuck in a loop when we saw the new ~(max/min X, ~Y) before the ~Y had been folded away to remove the new not.
I've left the subtract tests from my previous patch because that's the pattern I want to get optimized. I've added an additional non splat test and dropped the multiple use of the select test since it no longer applied.
We are checking !IsFreeToInvert() because we might be called before we try to actually fold the not into X?
Should probably be a comment.