[llvm] [Instcombine]: Folds`llvm.ucmp` and `llvm.scmp` (PR #168505)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 23 05:24:13 PST 2025
kper wrote:
> For the first pattern, s/ucmp is less profitable than select + icmp because the former one needs two icmp + two selects/one sub (See also TargetLowering::expandCMP). It doesn't simplify the IR since X and Y still have two uses after the transformation.
I see, that's unfortunate. I hoped that changing it to an intrinsic might have some benefits.
But fair, I removed the fold and kept the absorbing equality fold.
https://github.com/llvm/llvm-project/pull/168505
More information about the llvm-commits
mailing list