[clang] [ARM64EC] Fix compilation of intrin.h in ARM64EC mode. (PR #87717)

Max Winkler via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 4 18:19:00 PDT 2024


MaxEW707 wrote:

I didn't realize ARM64EC was supported by clang.

You are missing one `#if defined(__x86_64__) && !defined(__arm64ec__)` check here, https://github.com/llvm/llvm-project/blob/main/clang/lib/Headers/intrin0.h#L47.
Doesn't appear to be anyway to comment on lines that aren't in the diff view on github :(.

> If we actually need some of these intrinsics in ARM64EC mode, we can revisit later.

For `intrin0.h` looks like we are missing a some intrinsics that msvc stl does use.

Adding `__arm64ec__` to the following lines should match `intrin0.h` that is shipped with msvc 1939.
https://github.com/llvm/llvm-project/blob/main/clang/lib/Headers/intrin0.h#L30
https://github.com/llvm/llvm-project/blob/main/clang/lib/Headers/intrin0.h#L86

Since we are intending to revisit adding missing intrinsics later I will do that over the weekend when I have some free time if you decide not to do it in this PR :).


https://github.com/llvm/llvm-project/pull/87717


More information about the cfe-commits mailing list