[PATCH] D89952: [SelectionDAG] Fine tune CTPOP optimizations

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 22 10:12:45 PDT 2020


craig.topper added inline comments.


================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:5340
+
+  // Horizontal add makes this easy.
+  if (Subtarget.hasBITALG())
----------------
What do you mean by horizontal add here?


================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:5344
+  if (Subtarget.hasVPOPCNTDQ())
+    return Subtarget.hasBWI() ? 4 : 1;
+
----------------
Why does having BWI increase the number? And why is element size not factored in here?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D89952



More information about the llvm-commits mailing list