llvm.org GIT mirror llvm / b142bc0
[TargetParser][AArch64] Add support for RDM feature in the target parser. Differential Revision: https://reviews.llvm.org/D37081 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311659 91177308-0d34-0410-b5e6-96231b3b80d8 Chad Rosier 2 years ago
5 changed file(s) with 25 addition(s) and 14 deletion(s). Raw diff Collapse all Expand all
2323 AARCH64_ARCH("armv8.1-a", ARMV8_1A, "8.1-A", "v8.1a",
2424 ARMBuildAttrs::CPUArch::v8_A, FK_CRYPTO_NEON_FP_ARMV8,
2525 (AArch64::AEK_CRC | AArch64::AEK_CRYPTO | AArch64::AEK_FP |
26 AArch64::AEK_SIMD | AArch64::AEK_LSE))
26 AArch64::AEK_SIMD | AArch64::AEK_LSE | AArch64::AEK_RDM))
2727 AARCH64_ARCH("armv8.2-a", ARMV8_2A, "8.2-A", "v8.2a",
2828 ARMBuildAttrs::CPUArch::v8_A, FK_CRYPTO_NEON_FP_ARMV8,
2929 (AArch64::AEK_CRC | AArch64::AEK_CRYPTO | AArch64::AEK_FP |
30 AArch64::AEK_SIMD | AArch64::AEK_RAS | AArch64::AEK_LSE))
30 AArch64::AEK_SIMD | AArch64::AEK_RAS | AArch64::AEK_LSE |
31 AArch64::AEK_RDM))
3132 AARCH64_ARCH("armv8.3-a", ARMV8_3A, "8.3-A", "v8.3a",
3233 ARMBuildAttrs::CPUArch::v8_A, FK_CRYPTO_NEON_FP_ARMV8,
3334 (AArch64::AEK_CRC | AArch64::AEK_CRYPTO | AArch64::AEK_FP |
3435 AArch64::AEK_SIMD | AArch64::AEK_RAS | AArch64::AEK_LSE |
35 AArch64::AEK_RCPC))
36 AArch64::AEK_RDM | AArch64::AEK_RCPC))
3637 #undef AARCH64_ARCH
3738
3839 #ifndef AARCH64_ARCH_EXT_NAME
4344 AARCH64_ARCH_EXT_NAME("none", AArch64::AEK_NONE, nullptr, nullptr)
4445 AARCH64_ARCH_EXT_NAME("crc", AArch64::AEK_CRC, "+crc", "-crc")
4546 AARCH64_ARCH_EXT_NAME("lse", AArch64::AEK_LSE, "+lse", "-lse")
47 AARCH64_ARCH_EXT_NAME("rdm", AArch64::AEK_RDM, "+rdm", "-rdm")
4648 AARCH64_ARCH_EXT_NAME("crypto", AArch64::AEK_CRYPTO, "+crypto","-crypto")
4749 AARCH64_ARCH_EXT_NAME("dotprod", AArch64::AEK_DOTPROD, "+dotprod","-dotprod")
4850 AARCH64_ARCH_EXT_NAME("fp", AArch64::AEK_FP, "+fp-armv8", "-fp-armv8")
8082 AARCH64_CPU_NAME("exynos-m3", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false,
8183 (AArch64::AEK_CRC))
8284 AARCH64_CPU_NAME("falkor", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false,
83 (AArch64::AEK_CRC))
85 (AArch64::AEK_CRC | AArch64::AEK_RDM))
8486 AARCH64_CPU_NAME("kryo", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false,
8587 (AArch64::AEK_CRC))
8688 AARCH64_CPU_NAME("thunderx2t99", ARMV8_1A, FK_CRYPTO_NEON_FP_ARMV8, false,
166166 AEK_PROFILE = 1 << 6,
167167 AEK_RAS = 1 << 7,
168168 AEK_LSE = 1 << 8,
169 AEK_SVE = 1 << 9,
170 AEK_DOTPROD = 1 << 10,
171 AEK_RCPC = 1 << 11
169 AEK_RDM = 1 << 9,
170 AEK_SVE = 1 << 10,
171 AEK_DOTPROD = 1 << 11,
172 AEK_RCPC = 1 << 12
172173 };
173174
174175 StringRef getCanonicalArchName(StringRef Arch);
457457 Features.push_back("+ras");
458458 if (Extensions & AArch64::AEK_LSE)
459459 Features.push_back("+lse");
460 if (Extensions & AArch64::AEK_RDM)
461 Features.push_back("+rdm");
460462 if (Extensions & AArch64::AEK_SVE)
461463 Features.push_back("+sve");
462464 if (Extensions & AArch64::AEK_RCPC)
0 ; RUN: llc < %s -verify-machineinstrs -mtriple=arm64-eabi -aarch64-neon-syntax=generic | FileCheck %s --check-prefix=CHECK-V8a
11 ; RUN: llc < %s -verify-machineinstrs -mtriple=arm64-eabi -mattr=+rdm -aarch64-neon-syntax=generic | FileCheck %s --check-prefix=CHECK-V81a
2 ; RUN: llc < %s -verify-machineinstrs -mtriple=arm64-eabi -mcpu=falkor -aarch64-neon-syntax=generic | FileCheck %s --check-prefix=CHECK-V81a
23 ; RUN: llc < %s -verify-machineinstrs -mtriple=arm64-eabi -mattr=+v8.1a -aarch64-neon-syntax=generic | FileCheck %s --check-prefix=CHECK-V81a
34 ; RUN: llc < %s -verify-machineinstrs -mtriple=arm64-eabi -mattr=+v8.1a -aarch64-neon-syntax=apple | FileCheck %s --check-prefix=CHECK-V81a-apple
45
670670 "cortex-a55", "armv8.2-a", "crypto-neon-fp-armv8",
671671 AArch64::AEK_CRC | AArch64::AEK_CRYPTO | AArch64::AEK_FP |
672672 AArch64::AEK_SIMD | AArch64::AEK_RAS | AArch64::AEK_LSE |
673 AArch64::AEK_FP16 | AArch64::AEK_DOTPROD | AArch64::AEK_RCPC,
674 "8.2-A"));
673 AArch64::AEK_RDM | AArch64::AEK_FP16 | AArch64::AEK_DOTPROD |
674 AArch64::AEK_RCPC, "8.2-A"));
675675 EXPECT_TRUE(testAArch64CPU(
676676 "cortex-a57", "armv8-a", "crypto-neon-fp-armv8",
677677 AArch64::AEK_CRC | AArch64::AEK_CRYPTO | AArch64::AEK_FP |
688688 "cortex-a75", "armv8.2-a", "crypto-neon-fp-armv8",
689689 AArch64::AEK_CRC | AArch64::AEK_CRYPTO | AArch64::AEK_FP |
690690 AArch64::AEK_SIMD | AArch64::AEK_RAS | AArch64::AEK_LSE |
691 AArch64::AEK_FP16 | AArch64::AEK_DOTPROD | AArch64::AEK_RCPC,
692 "8.2-A"));
691 AArch64::AEK_RDM | AArch64::AEK_FP16 | AArch64::AEK_DOTPROD |
692 AArch64::AEK_RCPC, "8.2-A"));
693693 EXPECT_TRUE(testAArch64CPU(
694694 "cyclone", "armv8-a", "crypto-neon-fp-armv8",
695695 AArch64::AEK_CRYPTO | AArch64::AEK_FP | AArch64::AEK_SIMD, "8-A"));
708708 EXPECT_TRUE(testAArch64CPU(
709709 "falkor", "armv8-a", "crypto-neon-fp-armv8",
710710 AArch64::AEK_CRC | AArch64::AEK_CRYPTO | AArch64::AEK_FP |
711 AArch64::AEK_SIMD, "8-A"));
711 AArch64::AEK_SIMD | AArch64::AEK_RDM, "8-A"));
712712 EXPECT_TRUE(testAArch64CPU(
713713 "kryo", "armv8-a", "crypto-neon-fp-armv8",
714714 AArch64::AEK_CRC | AArch64::AEK_CRYPTO | AArch64::AEK_FP |
716716 EXPECT_TRUE(testAArch64CPU(
717717 "thunderx2t99", "armv8.1-a", "crypto-neon-fp-armv8",
718718 AArch64::AEK_CRC | AArch64::AEK_CRYPTO | AArch64::AEK_LSE |
719 AArch64::AEK_FP | AArch64::AEK_SIMD, "8.1-A"));
719 AArch64::AEK_RDM | AArch64::AEK_FP | AArch64::AEK_SIMD, "8.1-A"));
720720 EXPECT_TRUE(testAArch64CPU(
721721 "thunderx", "armv8-a", "crypto-neon-fp-armv8",
722722 AArch64::AEK_CRC | AArch64::AEK_CRYPTO | AArch64::AEK_SIMD |
784784 AArch64::ArchKind::INVALID, "ras"));
785785 EXPECT_FALSE(testAArch64Extension("exynos-m1",
786786 AArch64::ArchKind::INVALID, "ras"));
787 EXPECT_TRUE(testAArch64Extension("falkor",
788 AArch64::ArchKind::INVALID, "rdm"));
787789 EXPECT_FALSE(testAArch64Extension("kryo",
788790 AArch64::ArchKind::INVALID, "ras"));
789791 EXPECT_FALSE(testAArch64Extension("thunderx2t99",
810812 unsigned Extensions = AArch64::AEK_CRC | AArch64::AEK_CRYPTO |
811813 AArch64::AEK_FP | AArch64::AEK_SIMD |
812814 AArch64::AEK_FP16 | AArch64::AEK_PROFILE |
813 AArch64::AEK_RAS | AArch64::AEK_SVE |
815 AArch64::AEK_RAS | AArch64::AEK_LSE |
816 AArch64::AEK_RDM | AArch64::AEK_SVE |
814817 AArch64::AEK_DOTPROD | AArch64::AEK_RCPC;
815818
816819 for (unsigned i = 0; i <= Extensions; i++)
840843 {"fp16", "nofp16", "+fullfp16", "-fullfp16"},
841844 {"profile", "noprofile", "+spe", "-spe"},
842845 {"ras", "noras", "+ras", "-ras"},
846 {"lse", "nolse", "+lse", "-lse"},
847 {"rdm", "nordm", "+rdm", "-rdm"},
843848 {"sve", "nosve", "+sve", "-sve"},
844849 {"dotprod", "nodotprod", "+dotprod", "-dotprod"},
845850 {"rcpc", "norcpc", "+rcpc", "-rcpc" }};