From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx07-00178001.pphosted.com (mx07-00178001.pphosted.com [185.132.182.106]) by sourceware.org (Postfix) with ESMTPS id 335833858408 for ; Tue, 28 Sep 2021 13:28:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 335833858408 Received: from pps.filterd (m0046668.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 18S85HfD005608; Tue, 28 Sep 2021 15:28:41 +0200 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 3bby7v9rp3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 28 Sep 2021 15:28:41 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id EE84510002A; Tue, 28 Sep 2021 15:28:40 +0200 (CEST) Received: from Webmail-eu.st.com (sfhdag2node2.st.com [10.75.127.5]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id C844720CD67; Tue, 28 Sep 2021 15:28:40 +0200 (CEST) Received: from [10.131.138.188] (10.75.127.47) by SFHDAG2NODE2.st.com (10.75.127.5) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Tue, 28 Sep 2021 15:28:39 +0200 Message-ID: <71756c7c-489a-8a26-23de-210503bc6552@foss.st.com> Date: Tue, 28 Sep 2021 15:28:32 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0 Subject: Re: [PATCH 02/13] arm: Add tests for PR target/100757 Content-Language: en-US To: Kyrylo Tkachov CC: "gcc-patches@gcc.gnu.org" References: <20210907091531.1034282-1-christophe.lyon@foss.st.com> <20210907091531.1034282-3-christophe.lyon@foss.st.com> From: Christophe LYON In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.75.127.47] X-ClientProxiedBy: SFHDAG1NODE3.st.com (10.75.127.3) To SFHDAG2NODE2.st.com (10.75.127.5) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.391,FMLib:17.0.607.475 definitions=2021-09-28_05,2021-09-28_01,2020-04-07_01 X-Spam-Status: No, score=-9.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, GIT_PATCH_0, KAM_NUMSUBJECT, KAM_SHORT, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Sep 2021 13:28:48 -0000 On 28/09/2021 13:12, Kyrylo Tkachov wrote: > >> -----Original Message----- >> From: Gcc-patches > bounces+kyrylo.tkachov=arm.com@gcc.gnu.org> On Behalf Of Christophe >> Lyon via Gcc-patches >> Sent: 07 September 2021 10:15 >> To: gcc-patches@gcc.gnu.org >> Subject: [PATCH 02/13] arm: Add tests for PR target/100757 >> >> These tests currently trigger an ICE which is fixed later in the patch >> series. >> >> The pr100757*.c testcases are derived from >> gcc.c-torture/compile/20160205-1.c, forcing the use of MVE, and using >> various types and return values different from 0 and 1 to avoid >> commonalization with boolean masks. In addition, since we should not >> need these masks, the tests make sure they are not present. > Ok, but I'd rather it was committed together with the patch that fixes the ICE. > I don't mind if it's a separate commit or rolled into that patch. Sure, I'll wait for the main patch approval. I split it this way to hopefully make the reviews easier, to exercise the testcase without the fix proposal. Thanks, Christophe > > Thanks, > Kyrill > >> 2021-09-01 Christophe Lyon >> >> gcc/testsuite/ >> PR target/100757 >> * gcc.target/arm/simd/pr100757-2.c: New. >> * gcc.target/arm/simd/pr100757-3.c: New. >> * gcc.target/arm/simd/pr100757-4.c: New. >> * gcc.target/arm/simd/pr100757.c: New. >> >> diff --git a/gcc/testsuite/gcc.target/arm/simd/pr100757-2.c >> b/gcc/testsuite/gcc.target/arm/simd/pr100757-2.c >> new file mode 100644 >> index 00000000000..c2262b4d81e >> --- /dev/null >> +++ b/gcc/testsuite/gcc.target/arm/simd/pr100757-2.c >> @@ -0,0 +1,20 @@ >> +/* { dg-do compile } */ >> +/* { dg-require-effective-target arm_v8_1m_mve_fp_ok } */ >> +/* { dg-add-options arm_v8_1m_mve_fp } */ >> +/* { dg-additional-options "-O3 -funsafe-math-optimizations" } */ >> +/* Derived from gcc.c-torture/compile/20160205-1.c. */ >> + >> +float a[32]; >> +int fn1(int d) { >> + int c = 4; >> + for (int b = 0; b < 32; b++) >> + if (a[b] != 2.0f) >> + c = 5; >> + return c; >> +} >> + >> +/* { dg-final { scan-assembler-times {\t.word\t1073741824\n} 4 } } */ /* >> Constant 2.0f. */ >> +/* { dg-final { scan-assembler-times {\t.word\t4\n} 4 } } */ /* Initial value >> for c. */ >> +/* { dg-final { scan-assembler-times {\t.word\t5\n} 4 } } */ /* Possible >> value for c. */ >> +/* { dg-final { scan-assembler-not {\t.word\t1\n} } } */ /* 'true' mask. */ >> +/* { dg-final { scan-assembler-not {\t.word\t0\n} } } */ /* 'false' mask. */ >> diff --git a/gcc/testsuite/gcc.target/arm/simd/pr100757-3.c >> b/gcc/testsuite/gcc.target/arm/simd/pr100757-3.c >> new file mode 100644 >> index 00000000000..e604555c04c >> --- /dev/null >> +++ b/gcc/testsuite/gcc.target/arm/simd/pr100757-3.c >> @@ -0,0 +1,20 @@ >> +/* { dg-do compile } */ >> +/* { dg-require-effective-target arm_v8_1m_mve_fp_ok } */ >> +/* { dg-add-options arm_v8_1m_mve_fp } */ >> +/* { dg-additional-options "-O3 -funsafe-math-optimizations" } */ >> +/* Copied from gcc.c-torture/compile/20160205-1.c. */ >> + >> +float a[32]; >> +float fn1(int d) { >> + float c = 4.0f; >> + for (int b = 0; b < 32; b++) >> + if (a[b] != 2.0f) >> + c = 5.0f; >> + return c; >> +} >> + >> +/* { dg-final { scan-assembler-times {\t.word\t1073741824\n} 4 } } */ /* >> Constant 2.0f. */ >> +/* { dg-final { scan-assembler-times {\t.word\t1084227584\n} 4 } } */ /* >> Initial value for c (4.0). */ >> +/* { dg-final { scan-assembler-times {\t.word\t1082130432\n} 4 } } */ /* >> Possible value for c (5.0). */ >> +/* { dg-final { scan-assembler-not {\t.word\t1\n} } } */ /* 'true' mask. */ >> +/* { dg-final { scan-assembler-not {\t.word\t0\n} } } */ /* 'false' mask. */ >> diff --git a/gcc/testsuite/gcc.target/arm/simd/pr100757-4.c >> b/gcc/testsuite/gcc.target/arm/simd/pr100757-4.c >> new file mode 100644 >> index 00000000000..c12040c517f >> --- /dev/null >> +++ b/gcc/testsuite/gcc.target/arm/simd/pr100757-4.c >> @@ -0,0 +1,19 @@ >> +/* { dg-do compile } */ >> +/* { dg-require-effective-target arm_v8_1m_mve_ok } */ >> +/* { dg-add-options arm_v8_1m_mve } */ >> +/* { dg-additional-options "-O3" } */ >> +/* Derived from gcc.c-torture/compile/20160205-1.c. */ >> + >> +unsigned int a[32]; >> +int fn1(int d) { >> + int c = 2; >> + for (int b = 0; b < 32; b++) >> + if (a[b]) >> + c = 3; >> + return c; >> +} >> + >> +/* { dg-final { scan-assembler-times {\t.word\t0\n} 4 } } */ /* 'false' mask. >> */ >> +/* { dg-final { scan-assembler-not {\t.word\t1\n} } } */ /* 'true' mask. */ >> +/* { dg-final { scan-assembler-times {\t.word\t2\n} 4 } } */ /* Initial value >> for c. */ >> +/* { dg-final { scan-assembler-times {\t.word\t3\n} 4 } } */ /* Possible >> value for c. */ >> diff --git a/gcc/testsuite/gcc.target/arm/simd/pr100757.c >> b/gcc/testsuite/gcc.target/arm/simd/pr100757.c >> new file mode 100644 >> index 00000000000..41d6e4e2d7a >> --- /dev/null >> +++ b/gcc/testsuite/gcc.target/arm/simd/pr100757.c >> @@ -0,0 +1,19 @@ >> +/* { dg-do compile } */ >> +/* { dg-require-effective-target arm_v8_1m_mve_ok } */ >> +/* { dg-add-options arm_v8_1m_mve } */ >> +/* { dg-additional-options "-O3" } */ >> +/* Derived from gcc.c-torture/compile/20160205-1.c. */ >> + >> +int a[32]; >> +int fn1(int d) { >> + int c = 2; >> + for (int b = 0; b < 32; b++) >> + if (a[b]) >> + c = 3; >> + return c; >> +} >> + >> +/* { dg-final { scan-assembler-times {\t.word\t0\n} 4 } } */ /* 'false' mask. >> */ >> +/* { dg-final { scan-assembler-not {\t.word\t1\n} } } */ /* 'true' mask. */ >> +/* { dg-final { scan-assembler-times {\t.word\t2\n} 4 } } */ /* Initial value >> for c. */ >> +/* { dg-final { scan-assembler-times {\t.word\t3\n} 4 } } */ /* Possible >> value for c. */ >> -- >> 2.25.1