[PATCH] D89952: [SelectionDAG] Enable CTPOP optimization fine tuning

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 8 07:06:52 PST 2020


spatel accepted this revision.
spatel added a comment.
This revision is now accepted and ready to land.

In D89952#2375652 <https://reviews.llvm.org/D89952#2375652>, @davezarzycki wrote:

> As far as I can tell, the AArch64 test coverage for vector CTPOP is fairly sparse. I can try and expand it you want.

That would be good -  make it less likely that we have missed any cracks in the type/legality checks.

I don't see any holes by inspection, so LGTM. But I think I misread this the 1st time - we could hoist the `isOperationLegal` check for vectors as the minimum NFC patch first?



================
Comment at: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:3408-3409
+  if (Cond == ISD::SETULT || Cond == ISD::SETUGT) {
     // This based on X86's custom lowering for vector CTPOP which produces more
     // instructions than the expansion here.
+
----------------
Remove this comment (and the copy of it below) if we have generalized this enough with the TLI override?


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