[PATCH] [LegalizeVectors] Improve vector CTPOP expansion
wschmidt at linux.vnet.ibm.com
Wed May 27 09:43:50 PDT 2015
Yes, for Power prior to http://reviews.llvm.org/P8, this would be an improvement. Since earlier processors have no quick path between vector registers and GPRs, scalarization requires two trips through memory, each of which will incur the evil load-hit-store stall. So even though we have scalar popcntb, popcntw, and popcntd, we would prefer not to use them if we can keep the computation in VRs. Once your patch is approved, we should likely override with "bool PPCTargetLowering::isCheapToUnrollVectorPopCount(EVT) const" that just returns false for all types, and add test cases. We should test the performance to be certain, but I'm confident this would be a win.
More information about the llvm-commits