[all-commits] [llvm/llvm-project] cc9fa5: [AArch64] Remove AES, SHA2, SHA3 and SM4 features ...

David Green via All-commits all-commits at lists.llvm.org
Mon Jan 23 10:39:31 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cc9fa501ea668d197c8b55da17b76680fe79b231
      https://github.com/llvm/llvm-project/commit/cc9fa501ea668d197c8b55da17b76680fe79b231
  Author: David Green <david.green at arm.com>
  Date:   2023-01-23 (Mon, 23 Jan 2023)

  Changed paths:
    M clang/lib/Basic/Targets/AArch64.cpp
    M clang/test/CodeGen/aarch64-targetattr.c
    M clang/test/Preprocessor/aarch64-target-features.c
    M llvm/include/llvm/TargetParser/AArch64TargetParser.h
    M llvm/unittests/TargetParser/TargetParserTest.cpp

  Log Message:
  -----------
  [AArch64] Remove AES, SHA2, SHA3 and SM4 features from armv8.6-a+

The Armv8.6-a and later architecture definitions included AES, SHA2,
SHA3 and SM4, but this did not have an effect when specifying
-march=armv8.6-a. The did not set preprocessor features
(https://godbolt.org/z/1YKad6M8e) or enable the relevant instructions
(like eor3 from sha3: https://godbolt.org/z/vY9v4MqvG). Similarly
architectures armv8 to armv8.5 defined +crypto, but this did not effect
the -march's, only the -mcpu with those architectures. I believe this
was working as intended.

After D141411 we now add the default features for architectures except
for +crypto, which has had the effect of enabling aes/sha2/sha3/sm4 when
-march=armv8.6-a is used. This patch removed those crypto features
again, going back to how things were before. It also removes the
AEK_CRYPTO feature from lower architecture levels, moving it to the cpus
that use it. This shouldn't make any changes, but a few extra tests have
been added for preprocessor features that have improved since llvm 15.

The -mcpu=ampere1 cpu is the only armv8.6+ cpu at present. For that, the
AES, SHA2 and SHA3 features have been re-added to the CPU definition to
keep it in-line with the gcc definition from
https://github.com/gcc-mirror/gcc/commit/db2f5d661239737157cf131de7d4df1c17d8d88d.

Differential Revision: https://reviews.llvm.org/D141606




More information about the All-commits mailing list