[PATCH] D147597: [InstCombine] icmp(X | LHS, RHS) --> icmp(X, 0)
Noah Goldstein via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 9 15:34:24 PDT 2023
goldstein.w.n added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp:1959
+ if (match(Or, m_c_Or(m_Value(X), m_APInt(LHS)))) {
+ if (C.isNonNegative()) {
+ switch (Pred) {
----------------
nit: Can you make it:
```
if (C.isNonNegative() && match(Or, m_c_Or(m_Value(X), m_APInt(LHS))))
```
Otherwise LGTM.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147597/new/
https://reviews.llvm.org/D147597
More information about the llvm-commits
mailing list