[llvm] [llvm][SPIRV] Expose fast `popcnt` support for SPIR-V targets (PR #109845)

Alex Voicu via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 26 11:20:25 PDT 2024


https://github.com/AlexVlx commented:

> The first concern coming to my mind is that we would need to have a test case with LIT CHECK's of the output SPIR-V to see/validate how ctpop and G_CTPOP are being lowered. We have test/CodeGen/SPIRV/llvm-intrinsics/ctpop.ll, but I wonder would it make sense to add a full-blown test case from unoptimized llvm ir to spir-v, what do you think? 

Please see `llvm/test/CodeGen/SPIRV/optimizations/recognize-popcnt-loop.ll` for an attempt to do this.

https://github.com/llvm/llvm-project/pull/109845


More information about the llvm-commits mailing list