GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Missing ldar intrinsics for clang-cl targeting arm64 windows · Issue #121689 · llvm/llvm-project

Missing ldar intrinsics for clang-cl targeting arm64 windows #121689

New issue
Copy link
New issue
Copy link
Open
Open
Missing ldar intrinsics for clang-cl targeting arm64 windows#121689
Copy link
Labels
clang:headersHeaders provided by Clang, e.g. for intrinsicsplatform:windows

Description

@BenMoran98
BenMoran98
opened on Jan 5, 2025
Issue body actions

Hello Developers!

This is an issue regarding compilation of c source code that contains ARM64 based intrinsic using clang-cl from llvm toolchain. Does intrinsic like '__ldar8' and '__ldar64' are supported by clang-cl tool? I am trying to compile the source code that involve these intrinsic on ARM64 based PC.

My source :
Image
Error:
Image

Thanks!!!

Activity

Next
  1. llvmbot
    added
    new issue
    on Jan 5, 2025
  2. EugeneZelenko
    added
    clang:headersHeaders provided by Clang, e.g. for intrinsics
    platform:windows
    and removed
    new issue
    on Jan 5, 2025
  3. DavidSpickett commented on Jan 7, 2025

    @DavidSpickett
    DavidSpickett
    on Jan 7, 2025
    Contributor
    More actions

    I think we are missing these. Full list from MSVC is here - https://learn.microsoft.com/en-us/cpp/intrinsics/arm64-intrinsics?view=msvc-170.

    Judging by https://github.com/numpy/numpy/blob/main/numpy/_core/src/common/npy_atomic.h, we need:

    • __ldar8
    • __ldar64
    • __ldar32
    • __ldar16, just to complete the set.

    https://clang.llvm.org/docs/MSVCCompatibility.html#simd-and-instruction-set-intrinsic-behavior may be relevant if these instructions are part of an optional extension.

  4. DavidSpickett
    changed the title [-]Missing intrinsic for clang-cl targeting arm64 windows[/-] [+]Missing ldar intrinsics for clang-cl targeting arm64 windows[/+] on Jan 7, 2025
  5. DavidSpickett commented on Jan 7, 2025

    @DavidSpickett
    DavidSpickett
    on Jan 7, 2025
    Contributor
    More actions

    This gives all the supported intriniscs:

    $ cat clang/include/clang/Basic/BuiltinsAArch64.def | grep ALL_MS | cut -d'(' -f2 | cut -d',' -f1
    <...>
    _CountLeadingOnes64
    _CountLeadingSigns
    _CountLeadingSigns64
    _CountLeadingZeros
    _CountLeadingZeros64
    _CountOneBits
    _CountOneBits64
    __prefetch
    __hlt
    

    (normally I'd look for a header file but these are compiler builtins as I understand it)
    Or look in ./lib/clang/20/include/intrin.h.

  6. DavidSpickett commented on Jan 7, 2025

    @DavidSpickett
    DavidSpickett
    on Jan 7, 2025
    Contributor
    More actions

    Related: #65405

  7. MGN-GIT commented on Jan 7, 2025

    @MGN-GIT
    MGN-GIT
    on Jan 7, 2025
    Contributor
    More actions

    Related: #65405

    Do you have any plans to add support for the above intrinsic?

  8. DavidSpickett commented on Jan 7, 2025

    @DavidSpickett
    DavidSpickett
    on Jan 7, 2025
    Contributor
    More actions

    The ones referenced in that issue are in fact already implemented, it's still open because it's referring to msvc intriniscs generally (I assume).

    I don't see a reason not to support these ldar ones, I will have a go at implementing them.

  9. DavidSpickett commented on Jan 7, 2025

    @DavidSpickett
    DavidSpickett
    on Jan 7, 2025
    Contributor
    More actions

    Also requested by numpy/numpy#28106.

  10. DavidSpickett commented on Mar 3, 2025

    @DavidSpickett
    DavidSpickett
    on Mar 3, 2025
    Contributor
    More actions

    I will have a go at implementing them.

    Unfortunately I no longer have time to look at this.

    (and if you are here because you searched for the error message, the solution that numpy implemented for the issue linked above may be interesting to you)

  11. MGN-GIT commented on Mar 4, 2025

    @MGN-GIT
    MGN-GIT
    on Mar 4, 2025
    Contributor
    More actions

    @DavidSpickett this issue can be closed as the following intrinsics are related with CPP atomics and this issue has been fixed!
    Thanks

  12. DavidSpickett commented on Mar 4, 2025

    @DavidSpickett
    DavidSpickett
    on Mar 4, 2025
    Contributor
    More actions

    As I understand it, a solution was found for numpy that avoids the need for these specific intrinsics. clang-cl is still missing them, so I will keep this issue open.

    Reacted by Mugundan S
  13. zatrazz
    added a commit that references this issue on Apr 8, 2026

    [aarch64] Add support for the __ldar{8|16|32|64} MS intrinsics (llvm#…

    2d792ad
  14. 4 remaining items

  15. zatrazz
    added 9 commits that reference this issue on Apr 10, 2026

    [aarch64] Add support for the __ldar{8|16|32|64} MS intrinsics (llvm#…

    1feff54

    [aarch64] Add support for the __ldar{8|16|32|64} MS intrinsics (llvm#…

    d9311b7

    [aarch64] Add support for the __ldapr{8|16|32|64} MS intrinsics (llvm…

    57f4f63

    [aarch64] Add support for the __ldar{8|16|32|64} MS intrinsics (llvm#…

    81ce8ba

    [aarch64] Add support for the __ldapr{8|16|32|64} MS intrinsics (llvm…

    b5348e4

    [aarch64] Add support for the __ldar{8|16|32|64} MS intrinsics (llvm#…

    5b00c57

    [aarch64] Add support for the __ldar{8|16|32|64} MS intrinsics (llvm#…

    83c36e1

    [aarch64] Add support for the __ldar{8|16|32|64} MS intrinsics (llvm#…

    af0d646

    [aarch64] Add support for the __ldar{8|16|32|64} MS intrinsics (llvm#…

    0ed3912
  16. zatrazz
    added 3 commits that reference this issue on May 29, 2026

    [aarch64] Add support for the __ldar{8|16|32|64} MS intrinsics (llvm#…

    2e0d19b

    [aarch64] Add support for the __ldar{8|16|32|64} MS intrinsics (llvm#…

    0d17781

    [aarch64] Add support for the __ldar{8|16|32|64} MS intrinsics (llvm#…

    564eefc
  17. zatrazz
    added a commit that references this issue on Jun 19, 2026

    [aarch64] Add support for the __ldar{8|16|32|64} MS intrinsics (llvm#…

    11a156c
  18. zatrazz
    added 2 commits that reference this issue on Sep 1, 2026

    [aarch64] Add support for the __ldar{8|16|32|64} MS intrinsics (llvm#…

    7a24a29

    [aarch64] Add support for the __ldar{8|16|32|64} MS intrinsics (llvm#…

    8c30cbf
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

    clang:headersHeaders provided by Clang, e.g. for intrinsicsplatform:windows

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402792 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.