This is a prerequisite patch for D77319. Now, we have to call getCheaperNegatedExpression() first, and it failed, call getNegatedExpression() again. It could be improved to call getNegatedExpression(Cost) and check the Cost to make the code more clear.
During negating the expression of N0 and N1, we are changing the DAG which change the combine order of the nodes though those negated node will be deleted immediately if combine is not profitable. And that this reason of the case change, which LGTM.