[PATCH] D137913: [X86] Rewrite `getScalarizationOverhead()`

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 13 12:45:43 PST 2022


lebedev.ri marked an inline comment as done.
lebedev.ri added inline comments.


================
Comment at: llvm/lib/Target/X86/X86TargetTransformInfo.cpp:4440
+          APInt LaneEltMask = WidenedDemandedElts.extractBits(Scale, Scale * I);
+          unsigned Population = LaneEltMask.countPopulation();
+          bool SubvectorIsAffected = Population > 0;
----------------
RKSimon wrote:
> Do we actually need to do a costly popcnt? Are we doing anything other than checking for zero / allones?
This whole logic is structured around the fact that we might only insert *some* elements.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D137913



More information about the llvm-commits mailing list