Adjust the assert in aarch64_get_extension_string_for_isa_flags to check
that the isa_flags parameter has no alias bits set.  This is the check I
intended to use when adding the assert in r15-7196-gb53781ce1e49fc, but
I accidentally checked the global aarch64_isa_flags value instead.

Additionally, remove the cpuinfo feature string entries for alias
features, so that the bits are left unset during host_detect_local_cpu.
Setting the bits would trigger the fixed assert, but was otherwise
harmless because aarch64_get_extension_string_for_isa_flags would ignore
the value of those bits.



I overlooked an unnecessary use of those bits in the driver.  Is this version
ok for master?


gcc/ChangeLog:

        * common/config/aarch64/aarch64-common.cc
        (aarch64_get_extension_string_for_isa_flags): Check isa_flags.
        * config/aarch64/aarch64-option-extensions.def
        (CRYPTO, SVE2_AES, SVE2_BITPERM, SVE2_SHA3, SVE2_SM4): Remove
        cpuinfo feature string.


diff --git a/gcc/common/config/aarch64/aarch64-common.cc 
b/gcc/common/config/aarch64/aarch64-common.cc
index 
fc7e84ae966c889ec1a666677bddc265e9b9e41c..d38ddb41c5964f17290e88732c83888b7b2597cd
 100644
--- a/gcc/common/config/aarch64/aarch64-common.cc
+++ b/gcc/common/config/aarch64/aarch64-common.cc
@@ -642,7 +642,7 @@ aarch64_get_extension_string_for_isa_flags
   /* The alias bits should only be used to support the aliases
      during option processing, and should be cleared at all other times.
      Verify this property for the supplied flags bitmask.  */
-  gcc_assert (!(feature_deps::alias_flags & aarch64_isa_flags));
+  gcc_assert (!(feature_deps::alias_flags & isa_flags));
   aarch64_feature_flags current_flags = default_arch_flags;
 
   /* As a special case, do not assume that the assembler will enable CRC
diff --git a/gcc/config/aarch64/aarch64-option-extensions.def 
b/gcc/config/aarch64/aarch64-option-extensions.def
index 
85483f38cc47358333827bf2d70a39522f868074..fbd5ea0d6e5a80ef772f4fa4081d049bf6006fbd
 100644
--- a/gcc/config/aarch64/aarch64-option-extensions.def
+++ b/gcc/config/aarch64/aarch64-option-extensions.def
@@ -150,7 +150,7 @@ AARCH64_FMV_FEATURE("aes", PMULL, (AES))
 /* +nocrypto disables AES, SHA2 and SM4, and anything that depends on them
    (such as SHA3 and the SVE2 crypto extensions).  */
 AARCH64_OPT_EXTENSION_ALIAS("crypto", CRYPTO, (AES, SHA2), (), (AES, SHA2, 
SM4),
-                           (AES, SHA2), "aes pmull sha1 sha2")
+                           (AES, SHA2), "")
 
 AARCH64_OPT_EXTENSION("sha3", SHA3, (SHA2), (), (), "sha3 sha512")
 
@@ -209,26 +209,26 @@ AARCH64_OPT_FMV_EXTENSION("sve2", SVE2, (SVE), (), (), 
"sve2")
 
 AARCH64_OPT_EXTENSION("sve-aes", SVE_AES, (AES), (), (), "sveaes | smeaes")
 
-AARCH64_OPT_EXTENSION_ALIAS("sve2-aes", SVE2_AES, (SVE2, SVE_AES), (), 
(SVE_AES), (SVE_AES), "sveaes")
+AARCH64_OPT_EXTENSION_ALIAS("sve2-aes", SVE2_AES, (SVE2, SVE_AES), (), 
(SVE_AES), (SVE_AES), "")
 
 AARCH64_FMV_FEATURE("sve2-aes", SVE_PMULL128, (SVE2, SVE_AES))
 
 AARCH64_OPT_EXTENSION("sve-bitperm", SVE_BITPERM, (), (), (), "svebitperm | 
smesbitperm")
 
 AARCH64_OPT_EXTENSION_ALIAS("sve2-bitperm", SVE2_BITPERM, (SVE2, SVE_BITPERM), 
(), (SVE_BITPERM),
-                           (SVE_BITPERM), "svebitperm")
+                           (SVE_BITPERM), "")
 
 AARCH64_FMV_FEATURE("sve2-bitperm", SVE_BITPERM, (SVE2, SVE_BITPERM))
 
 AARCH64_OPT_EXTENSION("sve-sha3", SVE_SHA3, (SHA3), (), (), "svesha3")
 
-AARCH64_OPT_EXTENSION_ALIAS("sve2-sha3", SVE2_SHA3, (SVE2, SVE_SHA3), (), 
(SVE_SHA3), (SVE_SHA3), "svesha3")
+AARCH64_OPT_EXTENSION_ALIAS("sve2-sha3", SVE2_SHA3, (SVE2, SVE_SHA3), (), 
(SVE_SHA3), (SVE_SHA3), "")
 
 AARCH64_FMV_FEATURE("sve2-sha3", SVE_SHA3, (SVE2, SVE_SHA3))
 
 AARCH64_OPT_EXTENSION("sve-sm4", SVE_SM4, (SM4), (), (), "svesm4")
 
-AARCH64_OPT_EXTENSION_ALIAS("sve2-sm4", SVE2_SM4, (SVE2, SVE_SM4), (), 
(SVE_SM4), (SVE_SM4), "svesm4")
+AARCH64_OPT_EXTENSION_ALIAS("sve2-sm4", SVE2_SM4, (SVE2, SVE_SM4), (), 
(SVE_SM4), (SVE_SM4), "")
 
 AARCH64_FMV_FEATURE("sve2-sm4", SVE_SM4, (SVE2, SVE_SM4))
 

Reply via email to