Skip to content

SIGNEXTEND: branches on the byte index #1818

Open

Description

@chfast

signextend() branches on the byte index: if (ext < 31), and the loop over the words above the sign word runs 0 to 3 times. With a random index these branches mispredict about 0.77 times per SIGNEXTEND (x86-64-v3, Zen 3). The words could be selected with masks instead, as the sign byte already is.

Activity

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