[PATCH] D125717: [InstCombine] Optimize and of icmps with power-of-2 and contiguous masks

John McIver via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 26 19:28:41 PDT 2023


jmciver 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 &&
----------------
goldstein.w.n wrote:
> Its a bit hard to follow the cases, can you add a comment specifying the transformation being done at each non nullptr return.
Thanks for taking the time to review. Let me know if you think the comments help.


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