[PATCH] D147597: [InstCombine] icmp(X | LHS, C) --> icmp(X, 0)
chenglin.bi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 11 23:15:48 PDT 2023
bcl5980 added a comment.
Maybe we need two more tests here:
1. Not one-use test .
2. Vector test with poison constant.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp:1958
+ // icmp(X | LHS, C) --> icmp(X, 0)
+ if (C.isNonNegative() && match(Or, m_c_Or(m_Value(X), m_APInt(LHS)))) {
+ switch (Pred) {
----------------
Do we really need c_or here? APInt should be always second operator.
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