[PATCH] D113970: [SelectionDAG] Add pattern to haveNoCommonBitsSet.

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 29 07:03:53 PST 2021


spatel added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:4550
+  if (A->getOpcode() == ISD::AND && B->getOpcode() == ISD::AND) {
+    auto MatchNoCommonBitsPattern = [&](SDValue A, SDValue B) {
+      if (isBitwiseNot(A, true)) {
----------------
I prefer that we not reuse/shadow the variable names in here.
How about matching the variable names to the code comment, so something like this:
    auto MatchNoCommonBitsPattern = [&](SDValue NotM, SDValue And) {
      if (isBitwiseNot(NotM, true)) {
        SDValue M = NotM->getOperand(0);


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113970/new/

https://reviews.llvm.org/D113970



More information about the llvm-commits mailing list