[PATCH] D125717: [InstCombine] Optimize and of icmps with power-of-2 and contiguous masks
Noah Goldstein via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 16 11:24:29 PDT 2023
goldstein.w.n added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp:502
+ const APInt *BCst, *DCst, *ECst;
+ if (match(B, m_APInt(BCst)) && match(D, m_APInt(DCst)) &&
+ match(E, m_APInt(ECst)) && *DCst == *ECst &&
----------------
Its a bit hard to follow the cases, can you add a comment specifying the transformation being done at each non nullptr return.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp:615
unsigned Mask = LHSMask & RHSMask;
+
if (Mask == 0) {
----------------
remove empty line.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125717/new/
https://reviews.llvm.org/D125717
More information about the llvm-commits
mailing list