[llvm] [llvm][SPIRV] Expose fast `popcnt` support for SPIR-V targets (PR #109845)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 24 11:42:49 PDT 2024
================
@@ -37,6 +38,15 @@ class SPIRVTTIImpl : public BasicTTIImplBase<SPIRVTTIImpl> {
explicit SPIRVTTIImpl(const SPIRVTargetMachine *TM, const Function &F)
: BaseT(TM, F.getDataLayout()), ST(TM->getSubtargetImpl(F)),
TLI(ST->getTargetLowering()) {}
+
+ TTI::PopcntSupportKind getPopcntSupport(unsigned TyWidth) {
----------------
arsenm wrote:
TTI probably should have a better default checking if the operation is legal. It's also not great that TargetLowering also has isCtpopFast
https://github.com/llvm/llvm-project/pull/109845
More information about the llvm-commits
mailing list