Skip to content

[meta][x86] Vector Constant Materialization #239959

Open
0 of 2 issues completed
Open

Description

@RKSimon

This was raised at the 2026 devmtg x86 roundtable.

X86 still doesn't make any attempt to materialize any vector constant patterns apart from all-zero and all-ones, we have no mechanism to determine the cost of materialization (vs a folded load) or when they can be hoisted (LICM etc.) into spare registers (vs cheap rematerialization).

@preames has proposed he raise an initial pathfinder patch that we can then add additional patterns to for specific ISAs etc.

Possible patterns - see Agner Fog's "Generating Constants" chapter in "Optimizing subroutines in assembly language".

Activity

  1. added
    metaissueIssue to collect references to a group of similar or related issues.
    on Nov 7, 2026
  2. llvmorg-github-actions commented on Nov 7, 2026

    @llvmorg-github-actions

    @llvm/issue-subscribers-backend-x86

    Author: Simon Pilgrim (RKSimon)

    Details This was raised at the 2026 devmtg x86 roundtable.

    X86 still doesn't make any attempt to materialize any vector constant patterns apart from all-zero and all-ones, we have no mechanism to determine the cost of materialization or when they can be hoisted (LICM etc.) into spare registers (vs cheap rematerialization).

    @preames has proposed he raise an initial pathfinder patch that we can then add additional patterns to for specific ISAs etc.

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

    backend:X86metaissueIssue to collect references to a group of similar or related issues.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions