llvm.org GIT mirror llvm / df07044
[AArch64, ARM] Add support for Samsung Exynos M4 Create a separate feature set for Exynos M4 and add test cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334115 91177308-0d34-0410-b5e6-96231b3b80d8 Evandro Menezes 1 year, 4 months ago
12 changed file(s) with 63 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
8181 (AArch64::AEK_CRC))
8282 AARCH64_CPU_NAME("exynos-m3", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false,
8383 (AArch64::AEK_CRC))
84 AARCH64_CPU_NAME("exynos-m4", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false,
85 (AArch64::AEK_CRC))
8486 AARCH64_CPU_NAME("falkor", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false,
8587 (AArch64::AEK_CRC | AArch64::AEK_RDM))
8688 AARCH64_CPU_NAME("saphira", ARMV8_3A, FK_CRYPTO_NEON_FP_ARMV8, false,
252252 ARM_CPU_NAME("exynos-m1", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false, ARM::AEK_CRC)
253253 ARM_CPU_NAME("exynos-m2", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false, ARM::AEK_CRC)
254254 ARM_CPU_NAME("exynos-m3", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false, ARM::AEK_CRC)
255 ARM_CPU_NAME("exynos-m4", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false, ARM::AEK_CRC)
255256 ARM_CPU_NAME("kryo", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false, ARM::AEK_CRC)
256257 // Non-standard Arch names.
257258 ARM_CPU_NAME("iwmmxt", IWMMXT, FK_NONE, true, ARM::AEK_NONE)
486486 def : ProcessorModel<"exynos-m1", ExynosM1Model, [ProcExynosM1]>;
487487 def : ProcessorModel<"exynos-m2", ExynosM1Model, [ProcExynosM2]>;
488488 def : ProcessorModel<"exynos-m3", ExynosM3Model, [ProcExynosM3]>;
489 def : ProcessorModel<"exynos-m4", ExynosM3Model, [ProcExynosM3]>;
489490 def : ProcessorModel<"falkor", FalkorModel, [ProcFalkor]>;
490491 def : ProcessorModel<"saphira", FalkorModel, [ProcSaphira]>;
491492 def : ProcessorModel<"kryo", KryoModel, [ProcKryo]>;
991991 FeatureCrypto,
992992 FeatureCRC]>;
993993
994 def : ProcNoItin<"exynos-m4", [ARMv8a, ProcExynosM1,
995 FeatureHWDivThumb,
996 FeatureHWDivARM,
997 FeatureCrypto,
998 FeatureCRC]>;
999
9941000 def : ProcNoItin<"kryo", [ARMv8a, ProcKryo,
9951001 FeatureHWDivThumb,
9961002 FeatureHWDivARM,
1111 ; RUN: llc < %s -mtriple=arm64-unknown-unknown -mcpu=exynos-m1 2>&1 | FileCheck %s
1212 ; RUN: llc < %s -mtriple=arm64-unknown-unknown -mcpu=exynos-m2 2>&1 | FileCheck %s
1313 ; RUN: llc < %s -mtriple=arm64-unknown-unknown -mcpu=exynos-m3 2>&1 | FileCheck %s
14 ; RUN: llc < %s -mtriple=arm64-unknown-unknown -mcpu=exynos-m4 2>&1 | FileCheck %s
1415 ; RUN: llc < %s -mtriple=arm64-unknown-unknown -mcpu=falkor 2>&1 | FileCheck %s
1516 ; RUN: llc < %s -mtriple=arm64-unknown-unknown -mcpu=saphira 2>&1 | FileCheck %s
1617 ; RUN: llc < %s -mtriple=arm64-unknown-unknown -mcpu=kryo 2>&1 | FileCheck %s
0 ; RUN: llc %s -o - -mtriple=aarch64-unknown -mattr=fuse-address | FileCheck %s
11 ; RUN: llc %s -o - -mtriple=aarch64-unknown -mcpu=exynos-m3 | FileCheck %s
2 ; RUN: llc %s -o - -mtriple=aarch64-unknown -mcpu=exynos-m4 | FileCheck %s
23
34 target triple = "aarch64-unknown"
45
66 ; RUN: llc %s -o - -mtriple=aarch64-unknown -mcpu=exynos-m1 | FileCheck %s
77 ; RUN: llc %s -o - -mtriple=aarch64-unknown -mcpu=exynos-m2 | FileCheck %s
88 ; RUN: llc %s -o - -mtriple=aarch64-unknown -mcpu=exynos-m3 | FileCheck %s
9 ; RUN: llc %s -o - -mtriple=aarch64-unknown -mcpu=exynos-m4 | FileCheck %s
910
1011 declare <16 x i8> @llvm.aarch64.crypto.aese(<16 x i8> %d, <16 x i8> %k)
1112 declare <16 x i8> @llvm.aarch64.crypto.aesmc(<16 x i8> %d)
0 ; RUN: llc %s -o - -mtriple=aarch64-unknown -mattr=fuse-csel | FileCheck %s
11 ; RUN: llc %s -o - -mtriple=aarch64-unknown -mcpu=exynos-m3 | FileCheck %s
2 ; RUN: llc %s -o - -mtriple=aarch64-unknown -mcpu=exynos-m4 | FileCheck %s
23
34 target triple = "aarch64-unknown"
45
11 ; RUN: llc %s -o - -mtriple=aarch64-unknown -mattr=+fuse-literals | FileCheck %s --check-prefix=CHECK --check-prefix=CHECKFUSE
22 ; RUN: llc %s -o - -mtriple=aarch64-unknown -mcpu=cortex-a57 | FileCheck %s --check-prefix=CHECK --check-prefix=CHECKFUSE
33 ; RUN: llc %s -o - -mtriple=aarch64-unknown -mcpu=exynos-m3 | FileCheck %s --check-prefix=CHECK --check-prefix=CHECKFUSE
4 ; RUN: llc %s -o - -mtriple=aarch64-unknown -mcpu=exynos-m4 | FileCheck %s --check-prefix=CHECK --check-prefix=CHECKFUSE
45
56 @g = common local_unnamed_addr global i8* null, align 8
67
77 ; RUN: llc -mtriple=aarch64-linux-gnuabi -mcpu=exynos-m1 -o - %s | FileCheck %s
88 ; RUN: llc -mtriple=aarch64-linux-gnuabi -mcpu=exynos-m2 -o - %s | FileCheck %s
99 ; RUN: llc -mtriple=aarch64-linux-gnuabi -mcpu=exynos-m3 -o - %s | FileCheck %s
10 ; RUN: llc -mtriple=aarch64-linux-gnuabi -mcpu=exynos-m4 -o - %s | FileCheck %s
1011 ; RUN: llc -mtriple=aarch64-linux-gnuabi -mcpu=falkor -o - %s | FileCheck %s
1112 ; RUN: llc -mtriple=aarch64-linux-gnuabi -mcpu=saphira -o - %s | FileCheck %s
1213 ; RUN: llc -mtriple=aarch64-linux-gnuabi -mcpu=kryo -o - %s | FileCheck %s
142142 ; RUN: llc < %s -mtriple=armv8-linux-gnueabi -mcpu=exynos-m3 | FileCheck %s --check-prefix=EXYNOS-M3
143143 ; RUN: llc < %s -mtriple=armv8-linux-gnueabi -mcpu=exynos-m3 -enable-unsafe-fp-math -disable-fp-elim -enable-no-infs-fp-math -enable-no-nans-fp-math -fp-contract=fast | FileCheck %s --check-prefix=EXYNOS-M1-FAST
144144 ; RUN: llc < %s -mtriple=armv8-linux-gnueabi -mcpu=exynos-m3 -enable-sign-dependent-rounding-fp-math | FileCheck %s --check-prefix=DYN-ROUNDING
145 ; RUN: llc < %s -mtriple=armv8-linux-gnueabi -mcpu=exynos-m4 | FileCheck %s --check-prefix=EXYNOS-M4
146 ; RUN: llc < %s -mtriple=armv8-linux-gnueabi -mcpu=exynos-m4 -enable-unsafe-fp-math -disable-fp-elim -enable-no-infs-fp-math -enable-no-nans-fp-math -fp-contract=fast | FileCheck %s --check-prefix=EXYNOS-M1-FAST
147 ; RUN: llc < %s -mtriple=armv8-linux-gnueabi -mcpu=exynos-m4 -enable-sign-dependent-rounding-fp-math | FileCheck %s --check-prefix=DYN-ROUNDING
145148 ; RUN: llc < %s -mtriple=armv8.1a-linux-gnueabi -enable-unsafe-fp-math -disable-fp-elim -enable-no-infs-fp-math -enable-no-nans-fp-math -fp-contract=fast | FileCheck %s --check-prefix=GENERIC-ARMV8_1-A-FAST
146149 ; RUN: llc < %s -mtriple=armv8.1a-linux-gnueabi -enable-sign-dependent-rounding-fp-math | FileCheck %s --check-prefix=DYN-ROUNDING
147150 ; RUN: llc < %s -mtriple=armv7-none-linux-gnueabi -mcpu=cortex-a7 | FileCheck %s --check-prefix=CORTEX-A7-CHECK
181184 ; RUN: llc < %s -mtriple=armv8-none-linux-gnueabi -mcpu=exynos-m2 -mattr=+strict-align | FileCheck %s --check-prefix=STRICT-ALIGN
182185 ; RUN: llc < %s -mtriple=armv8-none-linux-gnueabi -mcpu=exynos-m3 | FileCheck %s --check-prefix=NO-STRICT-ALIGN
183186 ; RUN: llc < %s -mtriple=armv8-none-linux-gnueabi -mcpu=exynos-m3 -mattr=+strict-align | FileCheck %s --check-prefix=STRICT-ALIGN
187 ; RUN: llc < %s -mtriple=armv8-none-linux-gnueabi -mcpu=exynos-m4 | FileCheck %s --check-prefix=NO-STRICT-ALIGN
188 ; RUN: llc < %s -mtriple=armv8-none-linux-gnueabi -mcpu=exynos-m4 -mattr=+strict-align | FileCheck %s --check-prefix=STRICT-ALIGN
184189
185190 ; ARMv7a
186191 ; RUN: llc < %s -mtriple=armv7-none-linux-gnueabi -mcpu=cortex-a7 | FileCheck %s --check-prefix=NO-STRICT-ALIGN
16121617 ; EXYNOS-M3-NOT: .eabi_attribute 28
16131618 ; EXYNOS-M3: .eabi_attribute 38, 1
16141619
1620 ; EXYNOS-M4: .cpu exynos-m4
1621 ; EXYNOS-M4: .eabi_attribute 6, 14
1622 ; EXYNOS-M4: .eabi_attribute 7, 65
1623 ; EXYNOS-M4: .eabi_attribute 8, 1
1624 ; EXYNOS-M4: .eabi_attribute 9, 2
1625 ; EXYNOS-M4: .fpu crypto-neon-fp-armv8
1626 ; EXYNOS-M4: .eabi_attribute 12, 3
1627 ; EXYNOS-M4-NOT: .eabi_attribute 27
1628 ; EXYNOS-M4: .eabi_attribute 36, 1
1629 ; EXYNOS-M4: .eabi_attribute 42, 1
1630 ; EXYNOS-M4-NOT: .eabi_attribute 44
1631 ; EXYNOS-M4: .eabi_attribute 68, 3
1632 ; EXYNOS-M4-NOT: .eabi_attribute 19
1633 ;; We default to IEEE 754 compliance
1634 ; EXYNOS-M4: .eabi_attribute 20, 1
1635 ; EXYNOS-M4: .eabi_attribute 21, 1
1636 ; EXYNOS-M4-NOT: .eabi_attribute 22
1637 ; EXYNOS-M4: .eabi_attribute 23, 3
1638 ; EXYNOS-M4: .eabi_attribute 24, 1
1639 ; EXYNOS-M4: .eabi_attribute 25, 1
1640 ; EXYNOS-M4-NOT: .eabi_attribute 28
1641 ; EXYNOS-M4: .eabi_attribute 38, 1
1642
16151643 ; GENERIC-FPU-VFPV3-FP16: .fpu vfpv3-fp16
16161644 ; GENERIC-FPU-VFPV3-D16-FP16: .fpu vfpv3-d16-fp16
16171645 ; GENERIC-FPU-VFPV3XD: .fpu vfpv3xd
252252 "8-A"));
253253 EXPECT_TRUE(testARMCPU("exynos-m1", "armv8-a", "crypto-neon-fp-armv8",
254254 ARM::AEK_CRC | ARM::AEK_SEC | ARM::AEK_MP |
255 ARM::AEK_VIRT | ARM::AEK_HWDIVARM |
256 ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP,
255 ARM::AEK_VIRT | ARM::AEK_HWDIVARM |
256 ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP,
257257 "8-A"));
258258 EXPECT_TRUE(testARMCPU("exynos-m2", "armv8-a", "crypto-neon-fp-armv8",
259259 ARM::AEK_CRC | ARM::AEK_SEC | ARM::AEK_MP |
260 ARM::AEK_VIRT | ARM::AEK_HWDIVARM |
261 ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP,
260 ARM::AEK_VIRT | ARM::AEK_HWDIVARM |
261 ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP,
262262 "8-A"));
263263 EXPECT_TRUE(testARMCPU("exynos-m3", "armv8-a", "crypto-neon-fp-armv8",
264264 ARM::AEK_CRC | ARM::AEK_SEC | ARM::AEK_MP |
265 ARM::AEK_VIRT | ARM::AEK_HWDIVARM |
266 ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP,
265 ARM::AEK_VIRT | ARM::AEK_HWDIVARM |
266 ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP,
267 "8-A"));
268 EXPECT_TRUE(testARMCPU("exynos-m4", "armv8-a", "crypto-neon-fp-armv8",
269 ARM::AEK_CRC | ARM::AEK_SEC | ARM::AEK_MP |
270 ARM::AEK_VIRT | ARM::AEK_HWDIVARM |
271 ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP,
267272 "8-A"));
268273 EXPECT_TRUE(testARMCPU("cortex-m23", "armv8-m.base", "none",
269274 ARM::AEK_HWDIVTHUMB, "8-M.Baseline"));
278283 "7-S"));
279284 }
280285
281 static constexpr unsigned NumARMCPUArchs = 82;
286 static constexpr unsigned NumARMCPUArchs = 83;
282287
283288 TEST(TargetParserTest, testARMCPUArchList) {
284289 SmallVector List;
727732 AArch64::AEK_CRC | AArch64::AEK_CRYPTO | AArch64::AEK_FP |
728733 AArch64::AEK_SIMD, "8-A"));
729734 EXPECT_TRUE(testAArch64CPU(
735 "exynos-m4", "armv8-a", "crypto-neon-fp-armv8",
736 AArch64::AEK_CRC | AArch64::AEK_CRYPTO | AArch64::AEK_FP |
737 AArch64::AEK_SIMD, "8-A"));
738 EXPECT_TRUE(testAArch64CPU(
730739 "falkor", "armv8-a", "crypto-neon-fp-armv8",
731740 AArch64::AEK_CRC | AArch64::AEK_CRYPTO | AArch64::AEK_FP |
732741 AArch64::AEK_SIMD | AArch64::AEK_RDM, "8-A"));
760769 "8-A"));
761770 }
762771
763 static constexpr unsigned NumAArch64CPUArchs = 19;
772 static constexpr unsigned NumAArch64CPUArchs = 20;
764773
765774 TEST(TargetParserTest, testAArch64CPUArchList) {
766775 SmallVector List;
822831 EXPECT_FALSE(testAArch64Extension("exynos-m2",
823832 AArch64::ArchKind::INVALID, "ras"));
824833 EXPECT_FALSE(testAArch64Extension("exynos-m3",
834 AArch64::ArchKind::INVALID, "ras"));
835 EXPECT_FALSE(testAArch64Extension("exynos-m4",
825836 AArch64::ArchKind::INVALID, "ras"));
826837 EXPECT_TRUE(testAArch64Extension("falkor",
827838 AArch64::ArchKind::INVALID, "rdm"));