[llvm] [InstCombine] Fold comparison of adding two z/sext booleans (PR #67895)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 1 14:39:07 PDT 2023


nikic wrote:

> @nikic what does m_CombineAnd function do?

It requires that both arguments match. Here it is used to capture the sext/zext into a variable. You could also just use `X` and `Y` instead (I didn't do that because m_c_Add may change the order of Op0/Op1, but in this case the use of m_c_Add is actually unnecessary, and you could use the non-commutative m_Add instead).

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


More information about the llvm-commits mailing list