From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 370AC383601E for ; Fri, 23 Jul 2021 00:46:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 370AC383601E Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 16N0YVH6179835; Thu, 22 Jul 2021 20:46:31 -0400 Received: from ppma02fra.de.ibm.com (47.49.7a9f.ip4.static.sl-reverse.com [159.122.73.71]) by mx0b-001b2d01.pphosted.com with ESMTP id 39yjf31ejc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 22 Jul 2021 20:46:31 -0400 Received: from pps.filterd (ppma02fra.de.ibm.com [127.0.0.1]) by ppma02fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 16N0h66H021327; Fri, 23 Jul 2021 00:46:29 GMT Received: from b06avi18626390.portsmouth.uk.ibm.com (b06avi18626390.portsmouth.uk.ibm.com [9.149.26.192]) by ppma02fra.de.ibm.com with ESMTP id 39upu89p8n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 23 Jul 2021 00:46:29 +0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06avi18626390.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 16N0hxks16515336 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 23 Jul 2021 00:43:59 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 421F711C050; Fri, 23 Jul 2021 00:46:26 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3440411C04C; Fri, 23 Jul 2021 00:46:24 +0000 (GMT) Received: from [9.200.48.233] (unknown [9.200.48.233]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 23 Jul 2021 00:46:23 +0000 (GMT) Subject: Re: [PATCH, rs6000] fix failure test cases caused by disabling mode promotion for pseudos [PR100952] To: Segher Boessenkool Cc: gcc-patches , Bill Schmidt References: <3544e148-761a-1691-0b49-7d131739dd76@linux.ibm.com> <20210721225119.GM1583@gate.crashing.org> From: HAO CHEN GUI Message-ID: Date: Fri, 23 Jul 2021 08:46:21 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <20210721225119.GM1583@gate.crashing.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-TM-AS-GCONF: 00 X-Proofpoint-GUID: iZpPmc7ZiZXu2_Bn6CMgDUZae7qXMTQk X-Proofpoint-ORIG-GUID: iZpPmc7ZiZXu2_Bn6CMgDUZae7qXMTQk X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-07-22_16:2021-07-22, 2021-07-22 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 bulkscore=0 phishscore=0 clxscore=1015 priorityscore=1501 malwarescore=0 mlxscore=0 mlxlogscore=999 adultscore=0 spamscore=0 impostorscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2107230001 X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, NICE_REPLY_A, RCVD_IN_MSPIKE_H2, 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: Fri, 23 Jul 2021 00:46:35 -0000 Segher,    Thanks for your advice. I tested it. "{ dg-final { scan-rtl-dump-times {\(compare:CC \((?:and|zero_extend):(?:DI) \((?:sub)?reg:[SD]I} 1 "combine" } }" works well. On 22/7/2021 上午 6:51, Segher Boessenkool wrote: > Hi! > > On Tue, Jul 06, 2021 at 11:11:05AM +0800, HAO CHEN GUI wrote: >>    The patch changed matching conditions in pr81384.c and pr56605.c. >> The original conditions failed to match due to mode promotion disabled. >> PR target/100952 >> * gcc/testsuite/gcc.target/powerpc/pr56605.c: Change matching >> conditions. >> * gcc/testsuite/gcc.target/powerpc/pr81348.c: Likewise. >> >> diff --git a/gcc/testsuite/gcc.target/powerpc/pr56605.c b/gcc/testsuite/gcc.target/powerpc/pr56605.c >> index 29efd815adc..2b7ddbd7410 100644 >> --- a/gcc/testsuite/gcc.target/powerpc/pr56605.c >> +++ b/gcc/testsuite/gcc.target/powerpc/pr56605.c >> @@ -11,5 +11,5 @@ void foo (short* __restrict sb, int* __restrict ia) >> ia[i] = (int) sb[i]; >> } >> >> -/* { dg-final { scan-rtl-dump-times "\\\(compare:CC \\\((?:and|zero_extend):DI \\\(reg:\[SD\]I" 1 "combine" } } */ >> +/* { dg-final { scan-rtl-dump-times "\\\(compare:CC \\\((?:and|zero_extend):SI \\\(subreg:SI \\\(reg:\[SD\]I" 1 "combine" } } */ > So, this testcase only runs on 64-bit machines (even only on lp64 > configurations). But do we now always get a subreg? And, can that > change again some time in the future? > > Writing it as > /* { dg-final { scan-rtl-dump-times {\(compare:CC \((?:and|zero_extend):SI \(subreg:SI \(reg:[SD]I} 1 "combine" } } */ > is easier to read btw. > > If you get a subreg:SI of a reg:SI here, something is wrong. And you > cannot have a zero_extend:SI of anything :SI either. > > So what the original matched were > (compare:CC (and:DI (reg:DI > and > (compare:CC (zero_extend:DI (reg:SI > and now you want to allow a subreg:SI in that last one as well (and you > do not really care what it is a subreg of, you don't check what offset > anyway), so maybe just > /* { dg-final { scan-rtl-dump-times {\(compare:CC \((?:and|zero_extend):(?:DI \((?:sub)?reg:[SD]I} 1 "combine" } } */ > will do what you want? > >> --- a/gcc/testsuite/gcc.target/powerpc/pr81348.c >> +++ b/gcc/testsuite/gcc.target/powerpc/pr81348.c >> @@ -19,5 +19,5 @@ void d(void) >> ***c = e; >> } >> >> -/* { dg-final { scan-assembler {\mlxsihzx\M} } } */ >> -/* { dg-final { scan-assembler {\mvextsh2d\M} } } */ >> +/* { dg-final { scan-assembler {\mlha\M} } } */ >> +/* { dg-final { scan-assembler {\mmtvsrwa\M} } } */ > (This test should not test for powerpc64*-*-* but powerpc*-*-* btw, > and that means it can just be left out, so just > /* { dg-do compile { target lp64 } } */ > and nothing more). > > Okay for trunk with those changes (the RE and lp64). Thanks! > (Test if it works of course; I did not :-) ) > > > Segher