llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

Missing `__prefetch` builtin on clang-cl for Windows on Arm

Open everton1984 opened this issue 2 years ago • 2 comments

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.

everton1984 avatar Feb 09 '24 16:02 everton1984

This was fixed by https://github.com/llvm/llvm-project/pull/67174

Please re-check and close if that's the case.

ceseo avatar Mar 12 '24 21:03 ceseo

Works now if I use 18.1.0. Thanks.

everton1984 avatar Mar 14 '24 18:03 everton1984