[llvm] [ValueTracking] Analyze `Select` in `isKnownNonEqual`. (PR #68427)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 10 01:10:02 PDT 2023


nikic wrote:

> @nikic @goldsteinn I added a new commit moving the `isNonEqualSelect` to the end of `isKnownNonEqual`.
> 
> This is necessary so that we can analyze things like `isKnownNonEqual(X, Y)` where `X = select ... ` and `Y = shl X, 2` for example. In other words, we first should try to do the analysis without "decomposing" `select`. If that doesn't succeed then we try `isNonEqualSelect`.

I don't understand what you mean here. If `isNonEqualSelect()` returns false, then all the following code still gets executed, no? It shouldn't matter (for behavior) in which order these calls are executed.

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


More information about the llvm-commits mailing list