[llvm] [HashRecognize] Rewrite arePHIsIntertwined (PR #144878)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 1 07:14:52 PDT 2025


artagnon wrote:

> Please also change `L`->`P1`, `R`->`P2` in the IR comment for clarity.

Oops, sorry about that. Fixed now.

>> The XOR is checked in the condition of the select, not the branches.
> I meant another SelectInst in the use-def chain of the condition.

I think the KnownBits propagation would be sufficient, similar to the test I just added.

> Let's put it another way: which test fails if we remove the `isConditionalOnXorOfPHIs` call?

So without it, not.crc.dead.msg.no.use and not.crc.dead.msg.notin.select.chain would pass and report a faulty LHSAux. We could get it not to report the faulty LHSAux instead of failing completely, but it would complicate life for the optimization, which can't just replace the entire loop.

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


More information about the llvm-commits mailing list