[InstCombine] Generalize foldICmpWithMinMax
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 ``` Reviewed By: goldstein.w.n Differential Revision: https://reviews.llvm.org/D156238
Loading
Please sign in to comment