[clang] [clang][AArch64] Add getHostCPUFeatures to query for enabled features in cpu info (PR #97749)

via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 24 00:58:21 PDT 2024


neildhickey wrote:

> Looks ok to me, X86 and ARM already do this.
> 
> > One point we noticed is that it could end up turning "aes+sha2" into "crypto" and "crypto" back into "sha2+aes+sha3+sm4", as it uses the old meaning of "crypto"
> 
> Then this needs to be fixed before this PR can go in, we don't want to be making binaries folks can't run. @davemgreen do we have a way that @neildhickey can reproduce that easily?

Perhaps this is the part of code causing the issue
```
#if defined(__aarch64__)
  // If we have all crypto bits we can add the feature
  if (crypto == (CAP_AES | CAP_PMULL | CAP_SHA1 | CAP_SHA2))
    Features["crypto"] = true;
#endif
```

If so I can change this to remove the addition of crypto and just assert the features found in the cpuinfo file

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


More information about the cfe-commits mailing list