Skip to content

Vectorization generates unaligned moves for properly aligned data #39250

@llvmbot

Description

@llvmbot
Bugzilla Link 39903
Version trunk
OS All
Attachments Code that shows the problem in compiler explorer.
Reporter LLVM Bugzilla Contributor
CC @RKSimon,@zygoloid

Extended Description

A simple FMA loop operating on data that is aligned with alignas(64) is generating vmovups instructions when it could, and should, be generating vmovaps.

Since the nehalem architecture the cost of a vmovups relative to vmovaps is not as large as it once was, but it is noticeable and if the data is guaranteed to be aligned, then vmovaps should be the instruction used.

https://www.godbolt.org/z/CCcjYu

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions