This PR folds: `A == MIN_INT ? B != MIN_INT : A < B` to `A < B` `A == MAX_INT ? B != MAX_INT : A > B` to `A > B` Proof: https://alive2.llvm.org/ce/z/bR6E2s This helps in optimizing comparison of optional unsigned non-zero types in https://github.com/rust-lang/rust/issues/49892. Rust compiler's current output: https://rust.godbolt.org/z/9fxfq3Gn8