Skip to content

codegen should allow optional CPU features #16570

@stakach

Description

@stakach

I am not sure if this is an issue on x86_64 too but it would be nice to be able to compile code with instructions that the current CPU doesn't support as for SIMD it'll be a runtime check to see if we can execute those instructions.

https://github.com/spider-gazelle/simd/actions/runs/21024822417/job/60446724131

The issue we're seeing here is that the Mac M chips don't support SVE or SVE2 instructions, only NEON.
We're checking at runtime what is supported and using the compatible code path.

https://github.com/spider-gazelle/simd/blob/main/src/simd.cr#L67-L78

So really we should only warn if there are incompatible instructions as it might be deliberate.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions