[llvm] [InstSimplify] Fold `select(Y >=s C, sadd.sat(X, Y) >=s X, true)` to `true` when C >… (PR #203639)
Le Gia Bao via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 14 15:59:55 PDT 2026
L3GiaBao wrote:
> This either needs proof of [real-world usefulness](https://llvm.org/docs/InstCombineContributorGuide.html#real-world-usefulness), or a more principled fold.
>
> If we want to handle this, we should probably start by handling simpler cases first. We're currently missing this fold: https://alive2.llvm.org/ce/z/njE8Hu Specifically, this is not folded even if %y is a constant: https://llvm.godbolt.org/z/3W6eadK7M
Thanks for working on a Sunday :) I'll pick up on Tue.
https://github.com/llvm/llvm-project/pull/203639
More information about the llvm-commits
mailing list