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

Include vectorized bit count instructions #6

@stoklund

Description

@stoklund

@AndrewScheidecker mentioned in his review of #1 the possibility of including vectorized bit counting instructions to match the existing scalar instructions. They would have these signatures:

  • i8x16.clz(x: v128) -> v128
  • i16x8.clz(x: v128) -> v128
  • i32x4.clz(x: v128) -> v128
  • i64x2.clz(x: v128) -> v128
  • i8x16.ctz(x: v128) -> v128
  • i16x8.ctz(x: v128) -> v128
  • i32x4.ctz(x: v128) -> v128
  • i64x2.ctz(x: v128) -> v128

At least AArch64 has vectorized CLZ and RBIT instructions that could be used to implement this. But they could be quite impractical to emulate on other platforms.

  • Are these instructions widely available in SIMD instruction sets?
  • Are there plausible applications for these instructions?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions