This patch adds the aforementioned fold to InstCombine. This pattern is produced after naive implementations of 3-way comparison in high-level languages are transformed into LLVM IR and then optimized. Proofs: https://alive2.llvm.org/ce/z/w4QLq_
827 B
827 B