From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 134A03858D28 for ; Mon, 3 Jul 2023 15:57:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 134A03858D28 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=us.ibm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=us.ibm.com Received: from pps.filterd (m0353722.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 363FlDKp017427; Mon, 3 Jul 2023 15:57:48 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : subject : from : to : cc : date : in-reply-to : references : content-type : mime-version : content-transfer-encoding; s=pp1; bh=lFWQhuiyWzkoBQ03wUYz3+WRcrD1k1G1Ru+xjXpjCfo=; b=pU8cI2tmRpBnNHXWKkoNZvC5fdqAnYpHU+0dbJHErQQzUgD03k/NIlHyPap/FUsEUxap hwQQ9rnaP0XzcsSANVq4yM0sW2nbXljy+YpCdtm6do/pW3n0przDh9A7NdqQs2F60B14 bRBRqzGYYFlWza3eHMbMcGCiCclPgM6cxJ2fhtseJoJuIkbJP5IpsjaQdvIsWs6l4mN5 pi0mbqptHQ3QPvy87CD4UdTB7M9jBpbJyQj7MTowQp1V9KUjY1H3hQIICXXZiWl2Ez5l EIHSF1M31ek/+I8UHG3hYUibrtYNiK8LvEeoB6xSFK9LUmBtOcPoD20RBEZ88QYmolpV sw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3rm19dr8c2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 03 Jul 2023 15:57:48 +0000 Received: from m0353722.ppops.net (m0353722.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 363FoJfo025157; Mon, 3 Jul 2023 15:57:47 GMT Received: from ppma03wdc.us.ibm.com (ba.79.3fa9.ip4.static.sl-reverse.com [169.63.121.186]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3rm19dr8bv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 03 Jul 2023 15:57:47 +0000 Received: from pps.filterd (ppma03wdc.us.ibm.com [127.0.0.1]) by ppma03wdc.us.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 363DoD3O017209; Mon, 3 Jul 2023 15:57:47 GMT Received: from smtprelay05.wdc07v.mail.ibm.com ([9.208.129.117]) by ppma03wdc.us.ibm.com (PPS) with ESMTPS id 3rjbs5k1kk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 03 Jul 2023 15:57:47 +0000 Received: from smtpav03.wdc07v.mail.ibm.com (smtpav03.wdc07v.mail.ibm.com [10.39.53.230]) by smtprelay05.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 363Fvk4S66519518 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 3 Jul 2023 15:57:46 GMT Received: from smtpav03.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0D2F35805A; Mon, 3 Jul 2023 15:57:46 +0000 (GMT) Received: from smtpav03.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5B2D65805C; Mon, 3 Jul 2023 15:57:45 +0000 (GMT) Received: from li-e362e14c-2378-11b2-a85c-87d605f3c641.ibm.com (unknown [9.61.18.149]) by smtpav03.wdc07v.mail.ibm.com (Postfix) with ESMTP; Mon, 3 Jul 2023 15:57:45 +0000 (GMT) Message-ID: Subject: Re: [PATCH] rs6000: Update the vsx-vector-6.* tests. From: Carl Love To: "Kewen.Lin" Cc: Peter Bergner , Segher Boessenkool , gcc-patches@gcc.gnu.org, David Edelsohn Date: Mon, 03 Jul 2023 08:57:44 -0700 In-Reply-To: References: <5197d0d8ab5e975ed7e1e928820769e5921f5796.camel@us.ibm.com> <621ac0734ae83c7ca6af00d804a3d3bc2bbbea5b.camel@us.ibm.com> <3f8d0bdc-bddf-d178-ee76-8d41c4b8755f@linux.ibm.com> <4d3135956e493fc12311af8fce18d043769ab7a4.camel@us.ibm.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 (3.28.5-18.el8) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: GwH1LgNSo1a_YJXO46DZo9YdsSTSjvlb X-Proofpoint-GUID: IBrqhOcms3hkekjHotbReO3fnGinLoxQ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-07-03_11,2023-06-30_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 malwarescore=0 clxscore=1015 phishscore=0 priorityscore=1501 mlxscore=0 bulkscore=0 adultscore=0 suspectscore=0 lowpriorityscore=0 spamscore=0 mlxlogscore=728 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2307030141 X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Kewen: On Fri, 2023-06-30 at 15:20 -0700, Carl Love wrote: > Segher never liked the above way of looking at the assembly. He > prefers: > gcc -S -g -mcpu=power8 -o vsx-vector-6-func-2lop.s vsx-vector-6- > func- > 2lop.c > > grep xxlor vsx-vector-6-func-2lop.s | wc > 34 68 516 > > So, again, I get the same count of 34 on both makalu and genoa. But > again, that doesn't agree with what make script/scan-assembler thinks > the counts should be. > > When I looked at the vsx-vector-6-func-2lop.s I see on BE: > > .... > lxvd2x 0,10,9 > xxlor 0,12,0 > xxlnor 0,0,0 > ... > > I was guessing that it was adjusting the data layout from the load. > But looking again more carefully versus LE: > > .... > lxvd2x 0,31,9 > xxpermdi 0,0,0,2 > xxlor 0,12,0 > xxlnor 0,0,0 > xxpermdi 0,0,0,2 > .... > > the xxpermdi is probably what is really doing the data layout change. > > So, we have the issue that looking at the assembly gives different > instruction counts then what > > dg-final { scan-assembler-times {\mxxlor\M} } > > comes up with??? Now I am really confused. I don't know how the > scan- > assembler-times works but I will go see if I can find it and see if I > can figure out what the issue is. I would expect that the scan- > assembler is working off the --save-temp files, which get deleted as > part of the run. I would guess that scan-assembler does a grep to > find > the instructions and then maybe uses wc to count them??? I will go > see > if I can figure out how scan-assembler-times works. OK, I figured out why I was getting 34 xxlor instructions instead of the 22 that the scan-assembler-times was getting. The difference was when I compiled the program I forgot to use -O2. So with -O2 I get the same number of xxlor instructins as scan-assembler-instructions. I get 34 if I do not specify optimization. So, I think the scan-assembler-times are all correct. As Peter says, counting xxlor is a bit problematic in general. We could just drop counting xxlor or have the LE/BE count qualifier for the instructions. Your call. Carl