https://github.com/dtcxzyw closed
https://github.com/llvm/llvm-project/pull/76256
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -82,3 +82,29 @@ unsigned int ctz_64(unsigned long a) {
return __builtin_riscv_ctz_64(a);
}
#endif
+
+// RV32ZBB-LABEL: @cpop_32(
+// RV32ZBB-NEXT: entry:
+// RV32ZBB-NEXT:[[TMP0:%.*]] = call i32 @llvm.ctpop.i32(i32 [[A:%.*]])
+// RV32ZBB-NEXT:ret i32 [[TMP0]]
+//
@@ -82,3 +82,29 @@ unsigned int ctz_64(unsigned long a) {
return __builtin_riscv_ctz_64(a);
}
#endif
+
+// RV32ZBB-LABEL: @cpop_32(
+// RV32ZBB-NEXT: entry:
+// RV32ZBB-NEXT:[[TMP0:%.*]] = call i32 @llvm.ctpop.i32(i32 [[A:%.*]])
+// RV32ZBB-NEXT:ret i32 [[TMP0]]
+//
topperc wrote:
Can we just use __builtin_popcount and __builtin_popcountll directly in the
header file?
https://github.com/llvm/llvm-project/pull/76256
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
llvmbot wrote:
@llvm/pr-subscribers-backend-risc-v
Author: Yingwei Zheng (dtcxzyw)
Changes
This patch adds support for `__builtin_riscv_cpop_32/64`, which are used by
`riscv_bitmanip.h`.
See also
https://github.com/dtcxzyw created
https://github.com/llvm/llvm-project/pull/76256
This patch adds support for `__builtin_riscv_cpop_32/64`, which are used by
`riscv_bitmanip.h`.
See also