[llvm] [InstCombine] Fold redundant FP clamp selects; relax min-max-pattern bailout in visitFCmp (PR #173452)

Wenju He via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 3 21:29:53 PST 2026


wenju-he wrote:

> > Or alternatively, if we have to match the full pattern anyway, wouldn't it make more sense to make this an explicit pattern in visitSelect (or even simplifySelectInst)?
> 
> I'd prefer this approach after the ConstantFPRange support for uitofp/sitofp is ready. Then we can handle other variants in https://github.com/dtcxzyw/llvm-opt-benchmark/pull/3210/files as well. But for now, relaxing the bailout is the cheapest way to achieve the goal (at least I don't need to care about FMF propagations/+-0/...).

@nikic @dtcxzyw I have created a new issue https://github.com/llvm/llvm-project/issues/174308 as a follow-up of this PR.

https://github.com/llvm/llvm-project/pull/173452


More information about the llvm-commits mailing list