[llvm] [InstCombine] Simplify matchers (NFC) (PR #96665)

via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 25 20:57:21 PDT 2024


goldsteinn wrote:

> > LGTM. Some of these are non-canonical, but I guess we can keep them in the interest of keeping this change NFC.
> 
> Tell me which ones so I can cut down on them

All the ones where the constant is on the LHS i.e
```
  if (!match(C, m_And(m_Value(X), m_One())) &&
      !match(C, m_And(m_One(), m_Value(X))))
```

but probably just get this in as is then follow up patch to remove the `m_c` from the non-canonical cases.

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


More information about the llvm-commits mailing list