If we encounter a degenerate select node where both operands are the same, then we can continue negating the condition while swapping operands, resulting in an infinite loop. Avoid this by bailout out if both operands are the same.
Fixes https://bugs.llvm.org/show_bug.cgi?id=49509, encountered in stage2 rustc build.