(x < y) ? -1 : zext(x != y)
u/scmp(x,y)
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_
noundef
memcpy
passingValueIsAlwaysUndefined
switch(zext/sext(X))
switch(X)
shr (shl X, Y), Y