[PATCH] D138347: [SelectionDAGBuilder][WIP] Teach visitBr to sink AND along with compares.
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 5 11:49:30 PST 2022
arsenm accepted this revision.
arsenm added a comment.
This revision is now accepted and ready to land.
LGTM with nit
================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:2219-2220
+ ConstantInt *AndRHS;
+ if (IC->isEquality() && isa<ConstantInt>(CmpRHS) &&
+ cast<ConstantInt>(CmpRHS)->isZero() &&
+ match(CmpLHS, m_OneUse(m_And(m_Value(AndLHS), m_ConstantInt(AndRHS)))) &&
----------------
also use match for the zero case?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138347/new/
https://reviews.llvm.org/D138347
More information about the llvm-commits
mailing list