<div dir="ltr">I saw this test timeout internally (not sure how, it doesn't seem _that_ slow), so I committed r363851 as a different fix which I think should also suffice for the memory growth issue -- but I don't have a 32-bit machine to verify on, so PTAL.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jun 19, 2019 at 2:43 AM Hans Wennborg via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Author: hans<br>
Date: Wed Jun 19 02:46:37 2019<br>
New Revision: 363780<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=363780&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=363780&view=rev</a><br>
Log:<br>
Make TargetParserTest.ARMExtensionFeatures not run out of memory on 32-bit (PR42316)<br>
<br>
The test still probably shouldn't run this loop 17 million times, but at<br>
least now it won't run out of memory.<br>
<br>
Modified:<br>
llvm/trunk/unittests/Support/TargetParserTest.cpp<br>
<br>
Modified: llvm/trunk/unittests/Support/TargetParserTest.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/TargetParserTest.cpp?rev=363780&r1=363779&r2=363780&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/TargetParserTest.cpp?rev=363780&r1=363779&r2=363780&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/unittests/Support/TargetParserTest.cpp (original)<br>
+++ llvm/trunk/unittests/Support/TargetParserTest.cpp Wed Jun 19 02:46:37 2019<br>
@@ -569,15 +569,16 @@ TEST(TargetParserTest, ARMFPURestriction<br>
}<br>
<br>
TEST(TargetParserTest, ARMExtensionFeatures) {<br>
- std::vector<StringRef> Features;<br>
unsigned Extensions = ARM::AEK_CRC | ARM::AEK_CRYPTO | ARM::AEK_DSP |<br>
ARM::AEK_HWDIVARM | ARM::AEK_HWDIVTHUMB | ARM::AEK_MP |<br>
ARM::AEK_SEC | ARM::AEK_VIRT | ARM::AEK_RAS | ARM::AEK_FP16 |<br>
ARM::AEK_FP16FML | ARM::AEK_FP_DP;<br>
<br>
- for (unsigned i = 0; i <= Extensions; i++)<br>
+ for (unsigned i = 0; i <= Extensions; i++) {<br>
+ std::vector<StringRef> Features;<br>
EXPECT_TRUE(i == 0 ? !ARM::getExtensionFeatures(i, Features)<br>
: ARM::getExtensionFeatures(i, Features));<br>
+ }<br>
}<br>
<br>
TEST(TargetParserTest, ARMFPUFeatures) {<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>