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.

any_true instructions should be untyped #416

Closed

Description

@Maratyszcza

any_true SIMD instruction returns 1 if any lane is non-zero and returns 0 otherwise. Notably, the result does not depend on whether we look at 8-bit, 16-bit, 32-bit, or 64-bit lanes: if the SIMD vector has any bit set, the result is 1; otherwise, the result is 0. Therefore, it would make sense to replace i8x16.any_true, i16x8.any_true, i32x4.any_true, and i64x2.any_true with a single v128.any_true instruction.

Activity

  1. lars-t-hansen commented on Jan 4, 2021

    @lars-t-hansen
    Contributor

    I more or less agree - in Firefox the any_true implementations boil away and uniformly become v128.any_bit_set. There's no clear reason to have multiple ops.

  2. dtig commented on Jan 5, 2021

    @dtig
    Member

    No objections to v128.any_true operation, V8 generates the same code for all the variants as well.

  3. Maratyszcza commented on Jan 14, 2021

    @Maratyszcza
    ContributorAuthor

    Was implemented in #423

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions