[llvm] [VP][RISCV] Introduce experimental.vp.popcount and RISC-V support. (PR #74294)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 5 06:03:28 PST 2023


================
@@ -710,6 +710,12 @@ END_REGISTER_VP(experimental_vp_reverse, EXPERIMENTAL_VP_REVERSE)
 
 ///// } Shuffles
 
+// llvm.experimental.vp.popcount(x,mask,vlen)
+BEGIN_REGISTER_VP(experimental_vp_popcount, 1, 2,
+                  EXPERIMENTAL_VP_POPCOUNT, 0)
+VP_PROPERTY_FUNCTIONAL_INTRINSIC(experimental_vp_popcount)
----------------
lukel97 wrote:

The functional property should be used to mark the equivalent non-vp counterparts that are semantically the same for ExpandVectorPredication, so I think this should be
```suggestion
VP_PROPERTY_NO_FUNCTIONAL
```
since vp_popcount isn't exactly the same (one's element-wise and the other is a reduction)


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


More information about the llvm-commits mailing list