[llvm] [InstCombine] Fix pointer replacement in `foldSelectValueEquivalence` (PR #161701)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 2 10:52:56 PDT 2025


dtcxzyw wrote:

> Maybe I'm missing something, but at least from the tests, aren't the three canReplacePointersIfEqual being invoked on the same pointers all the times? Couldn't this be done only once?

It is not commutative. You can always replace a pointer with a known dereferencable one.


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


More information about the llvm-commits mailing list