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

via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 4 13:57:01 PST 2025


goldsteinn wrote:

> 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 (#71792). It seems like through the review of #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.

I will make a PR to replace the current impl with one that handles the `C == 0` case.

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


More information about the llvm-commits mailing list