[llvm] [InstCombine] Bail out on inner disjoint or in `foldSelectICmpEq` (PR #121635)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 4 03:07:41 PST 2025


https://github.com/nikic approved this pull request.

LGTM -- but I think we should consider deleting this code entirely. This seems to match some kind of very complicated pattern without any evidence of real-world usefulness (including no hits on llvm-opt-benchmark) and without actually handling the cases in the issue it purports to fix (https://github.com/llvm/llvm-project/issues/71792). It seems like through the review of https://github.com/llvm/llvm-project/pull/73362 this *somehow* moved to matching patterns that also involve an operation with `C`, while the original motivation only involved comparisons with 0 (where ofc 0 is not involved in the select expression). So it seems like we now ended up with overly complicated code that nobody even asked for.

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


More information about the llvm-commits mailing list