[PATCH] D141179: [X86] Search through associative operators for BMI patterns (BLSI, BLSR, BLSMSK)

Phoebe Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 31 23:49:34 PST 2023


pengfei added inline comments.


================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:48807
+
+  // Only do this re-ordering if op has one use
+  if (!Op.hasOneUse())
----------------
Add period in the end. The same for others below.


================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:48811
+
+  SDLoc DL(Op.getNode());
+  // If we hit another assosiative op, recurse further
----------------
SDLoc DL(Op);


================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:48841
+    for (unsigned OpIdx = 0; OpIdx < 2; ++OpIdx)
+      if (isAllOnesConstant(Op.getOperand(OpIdx)) &&
+          Op.getOperand(1 - OpIdx) == OpMustEq)
----------------
Can we assume it is canonical and just check operand 1?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D141179



More information about the llvm-commits mailing list