Alexander Aprelev
5b0285866d
Revert "Reland "[vm] Recognize int.trailingZeroBitCount/oneBitCount as graph-inlinable""
This reverts commit 415b040d6f.
Reason for revert: breaks riscv https://github.com/dart-lang/sdk/issues/63479
Original change's description:
> Reland "[vm] Recognize int.trailingZeroBitCount/oneBitCount as graph-inlinable"
>
> The previous attempt was reverted because it broke unoptimized JIT
> on ARM 32. This reland force-optimizes the two getters.
>
> Stacks on top of the int.{trailingZeroBitCount,oneBitCount} API CL
> (commit 754239b077). Both getters route through OTHER_RECOGNIZED_LIST
> when a hardware fast path is available; otherwise the newly added
> Dart bodies inline at call sites via vm:prefer-inline. The C++
> natives are removed.
>
> Backend codegen
> ---------------
> ARM64: NEON CNT + UADDLV (popcount); RBIT + CLZ (ctz).
> ARM: NEON CNT + VPADDL chain (popcount); RBIT + CLZ on the
> register pair (ctz).
> x64: popcntq when TargetCPUFeatures::popcnt_supported();
> LoadImmediate(64) + rep_bsfq for ctz (decodes as tzcnt
> on BMI1+, preserves dest on zero otherwise).
> RISC-V 64: cpop / ctz when RV_baseline includes Zbb.
>
> Per-arch availability is encapsulated in
> UnaryInt64OpInstr::IsSupported(Token::Kind).
>
> Apple M-series ARM64, AOT (us/iter, lower is better):
> cardinality.swar 371
> cardinality.accelerated 154 (2.4x)
> forEachSetBit.swar 19031
> forEachSetBit.accelerated 4988 (3.8x)
> select.swar 199
> select.accelerated 77 (2.6x)
> complementCardinality.swar 399
> complementCardinality.accel 152 (2.6x)
>
> Work towards https://github.com/dart-lang/sdk/issues/6486 (popcount
> and ctz intrinsification).
>
> Work towards https://github.com/dart-lang/sdk/issues/1053 (efficient
> BitSet implementation).
>
> Fixes https://github.com/dart-lang/sdk/issues/52673
> Fixes https://github.com/dart-lang/sdk/issues/38346
> Fixes https://github.com/dart-lang/sdk/issues/63436
> Issue https://github.com/dart-lang/sdk/issues/10212
> Issue https://github.com/dart-lang/sdk/issues/5798
> TEST=tests/corelib/int_bit_count_test
>
> Cq-Include-Trybots: luci.dart.try:vm-linux-release-simarm-try,vm-ffi-qemu-linux-release-arm-try,vm-aot-linux-release-simarm_x64-try,vm-aot-linux-debug-simarm_x64-try,dart-sdk-linux-riscv64-try
> Change-Id: Ib812cbaec6e371b9720df7a543411f78e524cac1
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/506060
> Reviewed-by: Martin Kustermann <kustermann@google.com>
> Auto-Submit: Modestas Valauskas <valauskasmodestas@gmail.com>
> Reviewed-by: Slava Egorov <vegorov@google.com>
> Commit-Queue: Martin Kustermann <kustermann@google.com>
Cq-Include-Trybots: luci.dart.try:vm-linux-release-simarm-try,vm-ffi-qemu-linux-release-arm-try,vm-aot-linux-release-simarm_x64-try,vm-aot-linux-debug-simarm_x64-try,dart-sdk-linux-riscv64-try
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: Iaf11d03d394fa615098bed8fcdea38ba40c7e45f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/507520
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
2026-05-29 10:29:33 -07:00
..
2026-05-29 10:29:33 -07:00
2024-07-23 10:43:43 +00:00
2026-05-26 09:40:40 -07:00
2026-03-31 15:36:18 -07:00
2026-04-20 10:28:01 -07:00
2025-02-26 14:01:44 -08:00
2026-02-04 10:16:41 -08:00
2026-02-04 10:16:41 -08:00
2026-05-18 11:35:03 -07:00
2026-05-26 09:40:40 -07:00
2026-05-18 11:35:03 -07:00
2026-05-18 11:35:03 -07:00
2026-05-18 11:35:03 -07:00
2025-11-10 02:29:41 -08:00
2026-02-04 10:16:41 -08:00
2024-08-28 08:52:19 +00:00
2026-01-28 10:27:29 -08:00
2024-04-17 19:14:41 +00:00
2026-02-04 10:16:41 -08:00
2026-05-12 06:11:15 -07:00
2026-05-29 10:29:33 -07:00
2026-04-10 06:15:22 -07:00
2026-03-18 10:18:06 -07:00
2026-03-18 10:18:06 -07:00
2026-03-31 19:59:09 -07:00
2026-05-19 04:27:39 -07:00
2026-05-19 04:27:39 -07:00
2026-02-23 09:54:47 -08:00
2026-02-23 09:54:47 -08:00
2026-04-16 04:25:37 -07:00
2026-04-16 04:25:37 -07:00
2026-04-13 10:10:42 -07:00
2026-05-18 11:35:03 -07:00
2026-05-18 11:35:03 -07:00
2026-03-02 08:13:26 -08:00
2026-03-02 07:55:38 -08:00
2026-05-04 15:09:49 -07:00
2026-02-04 10:16:41 -08:00
2026-02-04 10:16:41 -08:00
2025-07-29 12:54:49 -07:00
2026-01-29 13:18:24 -08:00
2025-07-29 12:54:49 -07:00
2025-10-07 10:44:02 -07:00
2025-10-07 10:44:02 -07:00
2025-07-29 12:54:49 -07:00
2026-01-29 13:18:24 -08:00
2025-07-29 12:54:49 -07:00
2026-01-29 13:18:24 -08:00
2025-09-12 04:19:40 -07:00
2025-10-07 10:44:02 -07:00
2025-10-01 09:41:26 -07:00
2026-04-10 06:15:22 -07:00
2026-04-10 06:15:22 -07:00
2023-11-30 16:42:28 +00:00
2026-04-10 06:15:22 -07:00
2026-02-19 09:43:52 -08:00
2026-05-19 04:27:39 -07:00
2025-11-18 14:33:11 -08:00
2026-04-20 17:46:32 -07:00
2026-04-10 06:15:22 -07:00
2023-11-28 13:15:56 +00:00
2025-06-18 13:07:22 -07:00
2024-02-15 23:08:48 +00:00
2025-06-18 13:07:22 -07:00
2025-06-18 13:07:22 -07:00
2025-06-18 13:07:22 -07:00
2024-03-14 21:48:59 +00:00
2024-03-15 19:26:13 +00:00
2024-12-04 14:36:46 +00:00
2026-05-18 11:35:03 -07:00
2026-05-29 07:58:23 -07:00
2026-03-31 12:55:51 -07:00
2026-04-08 15:26:06 -07:00
2024-04-17 19:14:41 +00:00
2026-03-24 11:26:23 -07:00
2026-05-18 11:35:03 -07:00
2026-03-31 12:55:51 -07:00
2026-05-20 06:21:29 -07:00
2026-05-18 11:35:03 -07:00
2025-11-19 07:45:52 -08:00
2025-11-21 06:42:16 -08:00
2024-08-19 21:46:26 +00:00
2024-01-22 16:07:39 +00:00
2025-07-29 12:54:49 -07:00
2025-07-29 12:54:49 -07:00
2025-06-12 20:46:54 -07:00
2025-07-29 12:54:49 -07:00
2025-07-29 12:54:49 -07:00
2026-03-26 08:21:00 -07:00
2026-02-18 09:18:10 -08:00
2026-04-10 06:15:22 -07:00
2026-04-10 06:15:22 -07:00
2026-02-04 10:16:41 -08:00
2026-02-04 10:16:41 -08:00
2023-11-07 16:13:11 +00:00
2026-02-17 14:14:59 -08:00
2025-06-17 06:22:15 -07:00
2026-02-04 10:16:41 -08:00
2026-02-04 10:16:41 -08:00
2026-05-18 11:35:03 -07:00
2025-05-27 06:30:20 -07:00
2026-05-04 15:09:49 -07:00
2026-01-27 09:14:39 -08:00
2026-01-27 09:14:39 -08:00
2026-05-04 15:09:49 -07:00
2026-05-04 15:09:49 -07:00
2026-05-18 08:11:36 -07:00
2026-05-18 08:11:36 -07:00
2026-05-18 08:11:36 -07:00
2026-05-04 10:45:15 -07:00
2026-03-04 12:40:19 -08:00
2026-03-04 12:40:19 -08:00
2026-02-23 09:54:47 -08:00
2025-12-01 16:15:39 -08:00
2025-12-01 16:15:39 -08:00
2024-08-15 14:09:52 +00:00
2026-05-26 09:40:40 -07:00
2024-04-17 19:14:41 +00:00
2026-02-04 10:16:41 -08:00
2025-05-05 15:21:13 -07:00
2026-02-25 04:48:51 -08:00
2026-05-18 11:35:03 -07:00
2026-05-18 11:35:03 -07:00
2026-05-27 12:55:21 -07:00
2026-05-18 11:35:03 -07:00
2026-05-26 09:40:40 -07:00
2026-01-29 13:18:24 -08:00
2025-10-01 10:06:20 -07:00
2026-01-29 13:18:24 -08:00
2025-10-01 10:06:20 -07:00
2026-01-29 13:18:24 -08:00
2025-10-01 10:06:20 -07:00
2025-09-15 10:00:29 -07:00
2026-05-27 08:18:27 -07:00
2026-05-13 09:40:57 -07:00
2025-07-15 09:29:41 -07:00
2026-05-18 11:35:03 -07:00
2026-02-18 09:18:10 -08:00
2026-03-04 12:40:19 -08:00
2026-05-27 11:31:11 -07:00
2026-05-27 11:31:11 -07:00
2026-04-20 10:28:01 -07:00
2026-04-20 10:28:01 -07:00
2024-12-04 14:36:46 +00:00
2024-03-20 20:08:13 +00:00
2025-09-10 06:37:12 -07:00
2026-05-27 00:41:34 -07:00
2026-04-29 15:36:54 -07:00
2024-06-10 20:38:30 +00:00
2026-05-27 00:41:34 -07:00
2026-05-13 09:40:57 -07:00
2026-05-27 00:41:34 -07:00
2025-07-15 09:29:41 -07:00
2025-06-10 12:15:25 -07:00
2025-06-10 12:15:25 -07:00
2025-06-10 12:15:25 -07:00
2026-01-21 10:59:51 -08:00
2026-01-21 10:59:51 -08:00
2026-05-18 11:35:03 -07:00
2026-02-18 09:18:10 -08:00
2025-02-26 14:01:44 -08:00
2025-02-26 14:01:44 -08:00
2026-05-18 11:35:03 -07:00
2025-11-19 07:45:52 -08:00
2026-04-20 10:28:01 -07:00
2026-05-28 11:38:29 -07:00
2026-05-28 11:38:29 -07:00
2026-03-04 12:40:19 -08:00
2026-04-20 10:28:01 -07:00
2026-04-20 10:28:01 -07:00
2026-05-27 11:31:11 -07:00
2025-01-22 07:48:37 -08:00
2025-01-22 07:48:37 -08:00
2025-05-13 14:29:37 -07:00
2025-05-13 14:29:37 -07:00
2026-05-22 10:10:19 -07:00
2026-05-12 08:41:20 -07:00
2026-05-20 08:40:17 -07:00
2026-04-07 08:06:43 -07:00
2024-08-19 21:46:26 +00:00
2026-02-17 14:25:39 -08:00
2025-06-03 10:36:23 -07:00
2026-05-06 14:42:04 -07:00
2026-05-06 14:42:04 -07:00
2024-05-16 16:33:52 +00:00
2026-03-04 16:07:20 -08:00
2024-05-02 16:36:20 +00:00
2026-05-20 19:36:12 -07:00
2025-06-02 10:04:39 -07:00
2026-05-18 11:35:03 -07:00
2026-05-18 11:35:03 -07:00
2023-12-14 22:48:49 +00:00
2024-09-25 17:28:44 +00:00
2025-07-07 17:02:17 -07:00
2024-08-28 16:41:50 +00:00
2025-07-28 13:32:36 -07:00
2026-03-24 10:23:38 -07:00
2026-02-04 10:16:41 -08:00
2026-05-18 11:35:03 -07:00
2026-05-20 06:21:29 -07:00
2026-05-18 11:35:03 -07:00
2026-05-29 10:29:33 -07:00
2026-05-27 08:18:27 -07:00
2026-01-27 09:14:39 -08:00
2026-01-27 09:14:39 -08:00
2026-05-18 11:35:03 -07:00
2026-01-27 09:14:39 -08:00
2026-01-27 09:14:39 -08:00
2026-03-25 11:58:38 -07:00
2026-03-25 11:58:38 -07:00
2026-03-25 11:58:38 -07:00
2026-03-25 11:58:38 -07:00
2026-03-25 11:58:38 -07:00
2026-03-25 11:58:38 -07:00
2026-03-25 11:58:38 -07:00
2026-03-25 11:58:38 -07:00
2026-03-25 11:58:38 -07:00
2026-03-25 11:58:38 -07:00
2026-03-25 11:58:38 -07:00
2026-03-25 11:58:38 -07:00
2026-04-07 08:06:43 -07:00
2026-03-25 11:58:38 -07:00
2026-03-25 11:58:38 -07:00
2025-05-21 01:36:22 -07:00
2026-01-27 09:14:39 -08:00
2026-02-23 09:54:47 -08:00
2026-04-10 06:15:22 -07:00
2024-04-15 11:10:23 +00:00
2024-04-15 11:10:23 +00:00
2026-05-26 06:42:00 -07:00
2024-09-12 15:16:12 +00:00
2026-04-08 15:26:06 -07:00
2026-05-29 07:58:23 -07:00
2026-05-29 07:58:23 -07:00
2026-05-18 11:35:03 -07:00
2026-02-04 10:16:41 -08:00
2026-04-28 15:51:33 -07:00
2026-05-18 11:35:03 -07:00
2026-04-14 17:22:31 -07:00
2026-05-18 11:35:03 -07:00
2024-04-17 19:14:41 +00:00
2025-10-07 15:13:14 -07:00
2025-10-07 15:13:14 -07:00
2026-04-21 04:02:25 -07:00
2026-04-21 04:02:25 -07:00
2026-05-18 11:35:03 -07:00
2026-05-27 08:18:27 -07:00
2026-04-14 04:26:01 -07:00
2025-08-04 14:05:01 -07:00
2025-09-15 10:00:29 -07:00
2026-05-18 11:35:03 -07:00
2026-05-18 11:35:03 -07:00
2026-05-27 08:18:27 -07:00
2026-05-19 04:27:39 -07:00
2026-05-27 08:18:27 -07:00
2026-03-18 10:18:06 -07:00
2026-01-27 09:14:39 -08:00
2026-04-08 14:31:16 -07:00
2026-05-18 11:35:03 -07:00
2025-04-14 07:36:31 -07:00
2026-05-18 11:35:03 -07:00
2026-05-13 09:40:15 -07:00
2026-03-26 08:21:00 -07:00
2026-05-20 08:21:30 -07:00
2026-03-24 10:23:38 -07:00
2026-01-14 03:53:04 -08:00
2025-06-18 13:07:22 -07:00
2025-06-18 13:07:22 -07:00
2026-01-14 03:53:04 -08:00
2026-05-29 10:29:33 -07:00
2026-03-18 10:18:06 -07:00
2026-05-29 10:29:33 -07:00
2024-11-26 19:24:31 +00:00
2026-03-04 12:40:19 -08:00
2026-04-15 15:23:51 -07:00
2026-04-13 14:00:21 -07:00
2025-06-18 13:07:22 -07:00
2025-06-18 13:07:22 -07:00
2026-05-18 11:35:03 -07:00
2026-05-18 11:35:03 -07:00
2026-05-18 11:35:03 -07:00
2025-11-19 07:45:52 -08:00
2026-05-18 11:35:03 -07:00
2026-05-19 04:27:39 -07:00
2026-05-27 08:18:27 -07:00
2026-05-19 04:27:39 -07:00
2026-02-04 10:16:41 -08:00
2024-08-15 14:09:52 +00:00
2026-05-04 15:09:49 -07:00
2025-12-12 06:44:20 -08:00
2026-04-08 15:26:06 -07:00
2025-11-21 06:42:16 -08:00
2024-08-15 14:09:52 +00:00
2026-04-10 06:15:22 -07:00
2026-05-18 11:35:03 -07:00
2026-05-18 11:35:03 -07:00
2026-05-13 09:40:57 -07:00
2026-05-18 11:35:03 -07:00
2026-05-18 11:35:03 -07:00
2026-02-23 13:01:19 -08:00
2025-08-25 14:43:41 -07:00
2025-08-25 14:43:41 -07:00
2026-01-14 03:53:04 -08:00
2025-12-01 12:47:18 -08:00
2025-10-27 11:17:38 -07:00
2026-01-07 12:47:21 -08:00
2025-10-24 04:34:01 -07:00
2026-01-20 05:58:38 -08:00
2026-01-20 05:58:38 -08:00
2024-09-12 15:16:12 +00:00
2025-02-24 10:44:28 -08:00
2025-05-12 12:32:19 -07:00
2026-05-20 06:21:29 -07:00
2026-05-18 11:35:03 -07:00
2024-12-17 13:30:50 -08:00
2024-04-17 19:14:41 +00:00
2026-01-27 09:14:39 -08:00
2026-01-27 09:14:39 -08:00
2025-08-25 14:43:41 -07:00
2026-05-27 11:31:11 -07:00
2026-05-27 11:31:11 -07:00
2024-04-17 19:14:41 +00:00
2025-05-27 06:30:20 -07:00
2026-05-18 11:35:03 -07:00
2026-04-29 15:36:54 -07:00
2026-04-06 10:35:42 -07:00
2024-04-17 19:14:41 +00:00
2026-05-27 08:18:27 -07:00
2026-03-03 06:58:35 -08:00
2026-01-27 09:14:39 -08:00
2026-05-29 10:29:33 -07:00
2025-10-20 15:58:20 -07:00
2025-09-24 13:14:32 -07:00
2025-10-20 10:49:20 -07:00
2026-05-20 15:11:47 -07:00
2026-05-20 15:11:47 -07:00
2026-02-17 14:14:59 -08:00
2026-05-18 11:35:03 -07:00
2026-05-18 11:35:03 -07:00
2025-05-23 06:19:16 -07:00
2025-05-23 06:19:16 -07:00
2025-05-23 06:19:16 -07:00
2026-02-17 14:14:59 -08:00
2026-02-04 10:16:41 -08:00
2025-06-18 13:07:22 -07:00
2024-06-14 23:24:19 +00:00
2024-08-07 12:59:35 +00:00
2026-01-28 13:49:00 -08:00
2026-05-04 10:45:15 -07:00
2026-01-28 13:49:00 -08:00
2026-01-28 13:49:00 -08:00
2026-01-13 14:28:00 -08:00
2026-05-04 10:45:15 -07:00
2026-05-04 10:45:15 -07:00
2025-07-07 17:02:17 -07:00
2026-03-31 12:55:51 -07:00
2026-02-04 10:16:41 -08:00
2024-08-07 12:59:35 +00:00
2026-02-23 09:54:47 -08:00