[llvm] [InstSimplify] Discard unnecessary `select` when the conditions are `ICmps` with EQ (PR #179183)

Gábor Spaits via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 10 04:03:11 PST 2026


spaits wrote:

I have addressed some of the reviews, but not everything yet. I still want to spilt the PR, add more tests, clean up tests, handle the `or` case. I am also working on those.

But, for now I would like to ask you to check if my poison checks are correct? I added some more tests to showcase the current state of the PR.

One of the interesting cases was when the first selects condition depended on different values than the second ones. In that case there were scenarios when the second select's poison barrier proprty is needed, therfore it must be kept. I could only address those cases in `simplifySelectInst`. I hope that's fine.

Thank you for your patience and assistance.

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


More information about the llvm-commits mailing list