[llvm] [llvm][GVN] Propagate `trunc nuw to i1` equalities (PR #143273)

Yash Solanki via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 8 06:12:52 PDT 2025


yashnator wrote:

@andjo403 Yes, that would be helpful. Thank you.

> Maybe not a question for this PR but is it possible to support not condition (xor i1 %tr, true) also?

I tried out some examples but found out that [visitXor](https://github.com/llvm/llvm-project/blob/3fc216bc3b4448cd8df984e9bec41a9836a7a423/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp#L4785) is folding not instructions. Do you have an example where it is missed?

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


More information about the llvm-commits mailing list