Skip to content

Add a high latency "feature" (hazard) for specific shift instruction operands on Alder Lake and generic x86-64 tunings #121546

Open
@chandlerc

Description

@chandlerc

See the detailed discussion:
https://tavianator.com/2025/shlx.html

And some added details:
https://lobste.rs/s/1hbwkk/alder_lake_shlx_anomaly

Basically, when the shift instruction is set using the wrong kind of instruction, it causes a 3x throughput hit.

There should always be other ways to encode this and so it seems worth avoiding in the x86 backend, at least when tuning for Alder Lake or a generic x86 CPU.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions