This patch generalizes the fold of icmp pred min/max(X, Y), Z to address the issue https://github.com/llvm/llvm-project/issues/62898.
For example, we can fold smin(X, Y) < Z into X < Z when Y > Z is implied by constant folds/invariants/dom conditions.
Alive2 (with --disable-undef-input due to the limitation of --smt-to=10000): https://alive2.llvm.org/ce/z/rB7qLc
You can run the standalone translation validation tool alive-tv locally to verify these transformations.
alive-tv transforms.ll --smt-to=600000 --exit-on-error
You can use MinMaxIntrinsic::isSigned(MinMaxIntrinsic).
Or maybe cleaner, you can pass in in the MinMaxIntrinsic and then do things like II->isSigned().