Index: unittests/Support/TargetParserTest.cpp =================================================================== --- unittests/Support/TargetParserTest.cpp +++ unittests/Support/TargetParserTest.cpp @@ -444,6 +444,12 @@ ARM::ArchKind::INVALID, "crypto")); EXPECT_FALSE(testARMExtension("cortex-a53", ARM::ArchKind::INVALID, "ras")); + EXPECT_FALSE(testARMExtension("cortex-a53", + ARM::ArchKind::INVALID, "fp16")); + EXPECT_TRUE(testARMExtension("cortex-a55", + ARM::ArchKind::INVALID, "fp16")); + EXPECT_TRUE(testARMExtension("cortex-a75", + ARM::ArchKind::INVALID, "fp16")); EXPECT_FALSE(testARMExtension("cortex-r52", ARM::ArchKind::INVALID, "ras")); EXPECT_FALSE(testARMExtension("iwmmxt", ARM::ArchKind::INVALID, "crc")); @@ -474,6 +480,9 @@ EXPECT_FALSE(testARMExtension("generic", ARM::ArchKind::ARMV8A, "ras")); EXPECT_FALSE(testARMExtension("generic", ARM::ArchKind::ARMV8_1A, "ras")); EXPECT_FALSE(testARMExtension("generic", ARM::ArchKind::ARMV8_2A, "spe")); + EXPECT_FALSE(testARMExtension("generic", ARM::ArchKind::ARMV8_2A, "fp16")); + EXPECT_FALSE(testARMExtension("generic", ARM::ArchKind::ARMV8_3A, "fp16")); + EXPECT_FALSE(testARMExtension("generic", ARM::ArchKind::ARMV8_4A, "fp16")); EXPECT_FALSE(testARMExtension("generic", ARM::ArchKind::ARMV8R, "ras")); EXPECT_FALSE(testARMExtension("generic", ARM::ArchKind::ARMV8MBaseline, "crc")); @@ -527,7 +536,7 @@ std::vector Features; unsigned Extensions = ARM::AEK_CRC | ARM::AEK_CRYPTO | ARM::AEK_DSP | ARM::AEK_HWDIVARM | ARM::AEK_HWDIVTHUMB | ARM::AEK_MP | - ARM::AEK_SEC | ARM::AEK_VIRT | ARM::AEK_RAS; + ARM::AEK_SEC | ARM::AEK_VIRT | ARM::AEK_RAS | ARM::AEK_FP16; for (unsigned i = 0; i <= Extensions; i++) EXPECT_TRUE(i == 0 ? !ARM::getExtensionFeatures(i, Features) @@ -852,7 +861,11 @@ EXPECT_TRUE(testAArch64Extension("saphira", AArch64::ArchKind::INVALID, "profile")); EXPECT_FALSE(testAArch64Extension("saphira", - AArch64::ArchKind::INVALID, "fullfp16")); + AArch64::ArchKind::INVALID, "fp16")); + EXPECT_TRUE(testAArch64Extension("cortex-a55", + AArch64::ArchKind::INVALID, "fp16")); + EXPECT_TRUE(testAArch64Extension("cortex-a75", + AArch64::ArchKind::INVALID, "fp16")); EXPECT_FALSE(testAArch64Extension("thunderx2t99", AArch64::ArchKind::INVALID, "ras")); EXPECT_FALSE(testAArch64Extension("thunderx", @@ -870,6 +883,12 @@ "generic", AArch64::ArchKind::ARMV8_1A, "ras")); EXPECT_FALSE(testAArch64Extension( "generic", AArch64::ArchKind::ARMV8_2A, "spe")); + EXPECT_FALSE(testAArch64Extension( + "generic", AArch64::ArchKind::ARMV8_2A, "fp16")); + EXPECT_FALSE(testAArch64Extension( + "generic", AArch64::ArchKind::ARMV8_3A, "fp16")); + EXPECT_FALSE(testAArch64Extension( + "generic", AArch64::ArchKind::ARMV8_4A, "fp16")); } TEST(TargetParserTest, AArch64ExtensionFeatures) {