[llvm] r363780 - Make TargetParserTest.ARMExtensionFeatures not run out of memory on 32-bit (PR42316)
Hans Wennborg via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 19 02:46:37 PDT 2019
Author: hans
Date: Wed Jun 19 02:46:37 2019
New Revision: 363780
URL: http://llvm.org/viewvc/llvm-project?rev=363780&view=rev
Log:
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.
Modified:
llvm/trunk/unittests/Support/TargetParserTest.cpp
Modified: llvm/trunk/unittests/Support/TargetParserTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/TargetParserTest.cpp?rev=363780&r1=363779&r2=363780&view=diff
==============================================================================
--- llvm/trunk/unittests/Support/TargetParserTest.cpp (original)
+++ llvm/trunk/unittests/Support/TargetParserTest.cpp Wed Jun 19 02:46:37 2019
@@ -569,15 +569,16 @@ TEST(TargetParserTest, ARMFPURestriction
}
TEST(TargetParserTest, ARMExtensionFeatures) {
- std::vector<StringRef> 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_FP16 |
ARM::AEK_FP16FML | ARM::AEK_FP_DP;
- for (unsigned i = 0; i <= Extensions; i++)
+ for (unsigned i = 0; i <= Extensions; i++) {
+ std::vector<StringRef> Features;
EXPECT_TRUE(i == 0 ? !ARM::getExtensionFeatures(i, Features)
: ARM::getExtensionFeatures(i, Features));
+ }
}
TEST(TargetParserTest, ARMFPUFeatures) {
More information about the llvm-commits
mailing list