llvm-project
llvm-project copied to clipboard
Missing `__prefetch` builtin on clang-cl for Windows on Arm
Looking at the list of intrinsice for ARM64 platform https://learn.microsoft.com/en-us/cpp/intrinsics/arm64-intrinsics?view=msvc-170 in the list we see the __prefetch() builtin. I have tried the following code with clang 17.0.6 on my Windows on Arm machine
#include <intrin.h>
int main(int argc, char* argv[])
{
void *address = (void *)0xF11F11;
__prefetch((void*) address);
return 0;
}
which results in
.\test.cpp(6,2): error: use of undeclared identifier '__prefetch'
6 | __prefetch((void*) address);
| ^
1 error generated.
This code compiles perfectly fine with normal cl.
This was fixed by https://github.com/llvm/llvm-project/pull/67174
Please re-check and close if that's the case.
Works now if I use 18.1.0. Thanks.