[clang] [llvm] [PowerPC][X86] Make cpu id builtins target independent and lower for PPC (PR #68919)

via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 30 07:30:05 PST 2024


Aokamal wrote:

Hi, 

Sorry I kind of don't know much about the change. We have the following code snippet
```
#if ABSL_HAVE_BUILTIN(__builtin_cpu_supports)
  if (__builtin_cpu_supports("avx2")) {
    ...
  }
#endif
```

when run with arm cpu, it fails with `error: builtin is not supported on this target` on the second if. Does it mean  ABSL_HAVE_BUILTIN is not accurate here ?

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


More information about the cfe-commits mailing list