Skip to content
This repository was archived by the owner on Dec 22, 2021. It is now read-only.

Commit aa28364

Browse files
committed
i8x16.popcnt instruction
1 parent 0813f85 commit aa28364

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

proposals/simd/BinarySIMD.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@ For example, `ImmLaneIdx16` is a byte with values in the range 0-15 (inclusive).
240240
| `i64x2.extmul_low_i32x4_u` | `0x11a`| - |
241241
| `i64x2.extmul_high_i32x4_u` | `0x11b`| - |
242242
| `i16x8.q15mulr_sat_s` | `TBD`| - |
243+
| `i8x16.popcnt` | `TBD`| - |
243244
| `v128.any_true` | `TBD`| - |
244245
| `v128.load8_lane` | `TBD`| m:memarg, i:ImmLaneIdx16 |
245246
| `v128.load16_lane` | `TBD`| m:memarg, i:ImmLaneIdx8 |

proposals/simd/ImplementationStatus.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@
103103
| `i8x16.max_s` | `-msimd128` | :heavy_check_mark: | | | :heavy_check_mark: |
104104
| `i8x16.max_u` | `-msimd128` | :heavy_check_mark: | | | :heavy_check_mark: |
105105
| `i8x16.avgr_u` | `-msimd128` | :heavy_check_mark: | | | :heavy_check_mark: |
106+
| `i8x16.popcnt` | | | | | |
106107
| `i16x8.abs` | `-msimd128` | :heavy_check_mark: | | | :heavy_check_mark: |
107108
| `i16x8.neg` | `-msimd128` | :heavy_check_mark: | | :heavy_check_mark: | :heavy_check_mark: |
108109
| `i16x8.all_true` | `-msimd128` | :heavy_check_mark: | | :heavy_check_mark: | :heavy_check_mark: |

proposals/simd/SIMD.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -662,6 +662,15 @@ Note that the normal WebAssembly `select` instruction also works with vector
662662
types. It selects between two whole vectors controlled by a single scalar value,
663663
rather than selecting bits controlled by a control mask vector.
664664

665+
### Lane-wise Population Count
666+
* `i8x16.popcnt(v: v128) -> v128`
667+
668+
Count the number of bits set to one within each lane.
669+
670+
```python
671+
def S.popcnt(v):
672+
return S.lanewise_unary(popcnt, v)
673+
```
665674

666675
## Boolean horizontal reductions
667676

0 commit comments

Comments
 (0)