[llvm] [InstCombine] Add demanded-bits pext handling (PR #205092)

via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 9 06:04:51 PDT 2026


mygitljf wrote:

Thanks. The demanded-bits handling covers the cases where we can derive useful known bits for the mask, but it doesn't capture the fully variable same-mask case from the issue title.

I'll keep the demanded-bits logic and add back the `m_c_And(m_Value(X), m_Specific(...))` fold in `visitCallInst` for `pext(x & m, m)`, together with direct tests for both `and %x, %m` and the commuted `and %m, %x` form.

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


More information about the llvm-commits mailing list