llvm.org GIT mirror llvm / 1e28f6e
Make TargetParserTest.ARMExtensionFeatures not run out of memory on 32-bit (PR42316) The test still probably shouldn't run this loop 17 million times, but at least now it won't run out of memory. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363780 91177308-0d34-0410-b5e6-96231b3b80d8 Hans Wennborg a month ago
1 changed file(s) with 3 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
568568 }
569569
570570 TEST(TargetParserTest, ARMExtensionFeatures) {
571 std::vector Features;
572571 unsigned Extensions = ARM::AEK_CRC | ARM::AEK_CRYPTO | ARM::AEK_DSP |
573572 ARM::AEK_HWDIVARM | ARM::AEK_HWDIVTHUMB | ARM::AEK_MP |
574573 ARM::AEK_SEC | ARM::AEK_VIRT | ARM::AEK_RAS | ARM::AEK_FP16 |
575574 ARM::AEK_FP16FML | ARM::AEK_FP_DP;
576575
577 for (unsigned i = 0; i <= Extensions; i++)
576 for (unsigned i = 0; i <= Extensions; i++) {
577 std::vector Features;
578578 EXPECT_TRUE(i == 0 ? !ARM::getExtensionFeatures(i, Features)
579579 : ARM::getExtensionFeatures(i, Features));
580 }
580581 }
581582
582583 TEST(TargetParserTest, ARMFPUFeatures) {