From patchwork Tue Jan 11 05:27:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xionghu Luo X-Patchwork-Id: 49822 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1604D3890423 for ; Tue, 11 Jan 2022 05:28:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1604D3890423 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1641878893; bh=La7wkWnpThMb0QwHn75gpgji91T4bDWycfXgyCfoGhM=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=ydYPgqQs8Ta+4QF8c2ygmavkvxf0Fgj7sJwc2cLKPwSftsaRC6VjeLy8UZJC4rpAj 6L5MAkoPmxgO5cE94vi+IQ7tXsq/9BK/NYpySFp9YQe5e/HLCFubxUj0gpabKVmIGB wLn4pC02MWi5lNScB9en6zIPbkziflcwI331TWSE= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id 95F193858C3A; Tue, 11 Jan 2022 05:27:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 95F193858C3A Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 20B4cFgR029405; Tue, 11 Jan 2022 05:27:41 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3dh1b4jaek-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 11 Jan 2022 05:27:41 +0000 Received: from m0098394.ppops.net (m0098394.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 20B5FCo2017579; Tue, 11 Jan 2022 05:27:40 GMT Received: from ppma05fra.de.ibm.com (6c.4a.5195.ip4.static.sl-reverse.com [149.81.74.108]) by mx0a-001b2d01.pphosted.com with ESMTP id 3dh1b4jadw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 11 Jan 2022 05:27:40 +0000 Received: from pps.filterd (ppma05fra.de.ibm.com [127.0.0.1]) by ppma05fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 20B5KOa6015336; Tue, 11 Jan 2022 05:27:38 GMT Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by ppma05fra.de.ibm.com with ESMTP id 3df2891fk9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 11 Jan 2022 05:27:38 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 20B5RZcM45875482 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 11 Jan 2022 05:27:35 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1EFE1AE053; Tue, 11 Jan 2022 05:27:35 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C9E75AE04D; Tue, 11 Jan 2022 05:27:33 +0000 (GMT) Received: from marlin.aus.stglabs.ibm.com (unknown [9.40.194.84]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 11 Jan 2022 05:27:33 +0000 (GMT) To: gcc-patches@gcc.gnu.org Subject: [PATCH] testsuite: Fix regression on m32 by r12-6087 [PR103820] Date: Mon, 10 Jan 2022 23:27:19 -0600 Message-Id: <20220111052719.3283397-1-luoxhu@linux.ibm.com> X-Mailer: git-send-email 2.27.0.90.geebb51ba8c MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: cPkG5zJ0Ny9jx5HzvlSu4h2dyVloo9k2 X-Proofpoint-ORIG-GUID: jZyLnScp71_Ah8bYb9620EfGAV8KqrmE X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-01-11_01,2022-01-10_02,2021-12-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 clxscore=1015 suspectscore=0 bulkscore=0 malwarescore=0 priorityscore=1501 mlxscore=0 spamscore=0 phishscore=0 impostorscore=0 mlxlogscore=917 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2201110023 X-Spam-Status: No, score=-11.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, 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-Patchwork-Original-From: Xionghu Luo via Gcc-patches From: Xionghu Luo Reply-To: Xionghu Luo Cc: segher@kernel.crashing.org, Xionghu Luo , wschmidt@linux.ibm.com, linkw@gcc.gnu.org, dje.gcc@gmail.com Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" r12-6087 will avoid move cold bb out of hot loop, while the original intent of this testcase is to hoist divides out of loop and CSE them to only one divide. So increase the loop count to turn the cold bb to hot bb again. Then the 3 divides could be rewritten with same reciptmp. Tested pass on Power-Linux {32,64}, x86 {64,32} and i686-linux, OK for master? gcc/testsuite/ChangeLog: PR 103820 * gcc.dg/tree-ssa/recip-3.c: Adjust. --- gcc/testsuite/gcc.dg/tree-ssa/recip-3.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/testsuite/gcc.dg/tree-ssa/recip-3.c b/gcc/testsuite/gcc.dg/tree-ssa/recip-3.c index 641c91e719e..410b28044b4 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/recip-3.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/recip-3.c @@ -1,7 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O1 -fno-trapping-math -funsafe-math-optimizations -fdump-tree-recip" } */ -double F[2] = { 0.0, 0.0 }, e; +double F[5] = { 0.0, 0.0 }, e; /* In this case the optimization is interesting. */ float h () @@ -13,7 +13,7 @@ float h () d = 2.*e; E = 1. - d; - for( i=0; i < 2; i++ ) + for( i=0; i < 5; i++ ) if( d > 0.01 ) { P = ( W < E ) ? (W - E)/d : (E - W)/d; @@ -23,4 +23,4 @@ float h () F[0] += E / d; } -/* { dg-final { scan-tree-dump-times " / " 5 "recip" } } */ +/* { dg-final { scan-tree-dump-times " / " 1 "recip" } } */