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 92D1B3858C35 for ; Tue, 12 Dec 2023 06:08:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 92D1B3858C35 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linux.ibm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 92D1B3858C35 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=148.163.158.5 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702361321; cv=none; b=xMhZRL8c43/jHWg397nZW4xBGsF3oLhxSa5SUboc2uw1QK7+JRla07u8vTHN6nAcFxCyXXOkfylrYiH4tsWM6QOh6WBPi8FXT4GkDSTGv7bVJKPnhicam6Mtt2toXtiRgEirK5aoxDr5+XbIWhw+e4HTa3j77nUn5WIngBxzrwU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702361321; c=relaxed/simple; bh=mg2QTGtaTbkNuiQ+w1AqRvTdkMYge5jaHyNLTmQi89Q=; h=DKIM-Signature:Message-ID:Date:Subject:From:To:MIME-Version; b=M/LUz/JSZjkItwju6xcDAhLWciTdxZmueRC1V7rNztZbLrZOYZNsisBVb+KUurthYEA3ozg5oVUQ2jF8NUqIjD7YX9igOlwMxxofc4k1dYaVvs+xNtxGly6JyM0eEaalRTSt/aqNLHuTFCZl5e6BUqirm+6A2iQ3wYl8zbz/PRM= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0353725.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3BC5uCw5023400; Tue, 12 Dec 2023 06:08:39 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : subject : from : to : cc : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pp1; bh=Xtrid3lqWFyWqcLPnTE/k7fSzvrqmlBJOhb4jOc2S2U=; b=rqCM46tD2h7paDh8jX26EmpgndBdqCBENcbgJh+ket3136BkKUG9ZMzIoXnLOeuK03sA 4r4w7Ab6bsfO5SEmrzNwYZnK4dmF+wWkYetv/a+oOqLHihpRNe2GzEBBuNSVJI1yf/x9 y2AvInuTW57TdqOfnGNBUIDbzvOt6g2YTPsPz9hLvzqZJVQXUaP0yOWQ+87HvZZmx9iU RibNipPa6FlWA+OraBrZeEx/Z4d395Afp2dr9zGOMzre9J3WCwlIvz4UxVXiNyWrvbc9 05vDV/5e98xhu66ogDBeWMblolmbV7EaI0uVfZxwcfZVkMU2t2NJxLuQT1uSq10B01yu 4A== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3uxew44099-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Dec 2023 06:08:38 +0000 Received: from m0353725.ppops.net (m0353725.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 3BC67sQm022148; Tue, 12 Dec 2023 06:08:38 GMT Received: from ppma11.dal12v.mail.ibm.com (db.9e.1632.ip4.static.sl-reverse.com [50.22.158.219]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3uxew44092-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Dec 2023 06:08:38 +0000 Received: from pps.filterd (ppma11.dal12v.mail.ibm.com [127.0.0.1]) by ppma11.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 3BC4vpVu013864; Tue, 12 Dec 2023 06:08:37 GMT Received: from smtprelay07.fra02v.mail.ibm.com ([9.218.2.229]) by ppma11.dal12v.mail.ibm.com (PPS) with ESMTPS id 3uw591xdgp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Dec 2023 06:08:37 +0000 Received: from smtpav03.fra02v.mail.ibm.com (smtpav03.fra02v.mail.ibm.com [10.20.54.102]) by smtprelay07.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 3BC68Ymp15925932 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 12 Dec 2023 06:08:34 GMT Received: from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B02DB20040; Tue, 12 Dec 2023 06:08:34 +0000 (GMT) Received: from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BC3462004B; Tue, 12 Dec 2023 06:08:32 +0000 (GMT) Received: from [9.200.53.32] (unknown [9.200.53.32]) by smtpav03.fra02v.mail.ibm.com (Postfix) with ESMTP; Tue, 12 Dec 2023 06:08:32 +0000 (GMT) Message-ID: <37053c25-3466-bf62-91c4-01489bccbb8c@linux.ibm.com> Date: Tue, 12 Dec 2023 14:08:31 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: PING^8 [PATCH 0/9] rs6000: Rework rs6000_emit_vector_compare Content-Language: en-US From: "Kewen.Lin" To: segher@kernel.crashing.org, dje.gcc@gmail.com Cc: bergner@linux.ibm.com, meissner@linux.ibm.com, gcc-patches@gcc.gnu.org References: <20221124091557.514727-1-linkw@linux.ibm.com> <59fbb646-c855-c4cd-10f9-40996f4e9720@linux.ibm.com> <73b2a139-0664-6dda-13c1-622d51745b30@linux.ibm.com> <804f6ee1-eb62-ea72-648e-1ac9036d0606@linux.ibm.com> <12207532-fe3a-b433-43ef-7e375939467c@linux.ibm.com> <01eb348a-80d2-6338-69e7-73ff693af215@linux.ibm.com> <972f5452-29e0-b062-dfbc-8641d978d5ec@linux.ibm.com> In-Reply-To: <972f5452-29e0-b062-dfbc-8641d978d5ec@linux.ibm.com> Content-Type: text/plain; charset=UTF-8 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: u4UFHSjJgM7Wq-UO72Vy44z2WsBd5Cra X-Proofpoint-ORIG-GUID: XUaFVsicyB8J7Y_dy8HTd6u7h6QR-0PF Content-Transfer-Encoding: 7bit X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-12_02,2023-12-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 spamscore=0 clxscore=1015 malwarescore=0 lowpriorityscore=0 suspectscore=0 phishscore=0 priorityscore=1501 mlxscore=0 mlxlogscore=999 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2312120046 X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,KAM_SHORT,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,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: Hi, Gentle ping this series: https://gcc.gnu.org/pipermail/gcc-patches/2022-November/607146.html BR, Kewen >>>>>>> on 2022/11/24 17:15, Kewen Lin wrote: >>>>>>>> Hi, >>>>>>>> >>>>>>>> Following Segher's suggestion, this patch series is to rework >>>>>>>> function rs6000_emit_vector_compare for vector float and int >>>>>>>> in multiple steps, it's based on the previous attempts [1][2]. >>>>>>>> As mentioned in [1], the need to rework this for float is to >>>>>>>> make a centralized place for vector float comparison handlings >>>>>>>> instead of supporting with swapping ops and reversing code etc. >>>>>>>> dispersedly. It's also for a subsequent patch to handle >>>>>>>> comparison operators with or without trapping math (PR105480). >>>>>>>> With the handling on vector float reworked, we can further make >>>>>>>> the handling on vector int simplified as shown. >>>>>>>> >>>>>>>> For Segher's concern about whether this rework causes any >>>>>>>> assembly change, I constructed two testcases for vector float[3] >>>>>>>> and int[4] respectively before, it showed the most are fine >>>>>>>> excepting for the difference on LE and UNGT, it's demonstrated >>>>>>>> as improvement since it uses GE instead of GT ior EQ. The >>>>>>>> associated test case in patch 3/9 is a good example. >>>>>>>> >>>>>>>> Besides, w/ and w/o the whole patch series, I built the whole >>>>>>>> SPEC2017 at options -O3 and -Ofast separately, checked the >>>>>>>> differences on object assembly. The result showed that the >>>>>>>> most are unchanged, except for: >>>>>>>> >>>>>>>> * at -O3, 521.wrf_r has 9 object files and 526.blender_r has >>>>>>>> 9 object files with differences. >>>>>>>> >>>>>>>> * at -Ofast, 521.wrf_r has 12 object files, 526.blender_r has >>>>>>>> one and 527.cam4_r has 4 object files with differences. >>>>>>>> >>>>>>>> By looking into these differences, all significant differences >>>>>>>> are caused by the known improvement mentined above transforming >>>>>>>> GT ior EQ to GE, which can also affect unrolling decision due >>>>>>>> to insn count. Some other trivial differences are branch >>>>>>>> target offset difference, nop difference for alignment, vsx >>>>>>>> register number differences etc. >>>>>>>> >>>>>>>> I also evaluated the runtime performance for these changed >>>>>>>> benchmarks, the result is neutral. >>>>>>>> >>>>>>>> These patches are bootstrapped and regress-tested >>>>>>>> incrementally on powerpc64-linux-gnu P7 & P8, and >>>>>>>> powerpc64le-linux-gnu P9 & P10. >>>>>>>> >>>>>>>> Is it ok for trunk? >>>>>>>> >>>>>>>> BR, >>>>>>>> Kewen >>>>>>>> ----- >>>>>>>> [1] https://gcc.gnu.org/pipermail/gcc-patches/2022-November/606375.html >>>>>>>> [2] https://gcc.gnu.org/pipermail/gcc-patches/2022-November/606376.html >>>>>>>> [3] https://gcc.gnu.org/pipermail/gcc-patches/2022-November/606504.html >>>>>>>> [4] https://gcc.gnu.org/pipermail/gcc-patches/2022-November/606506.html >>>>>>>> >>>>>>>> Kewen Lin (9): >>>>>>>> rs6000: Rework vector float comparison in rs6000_emit_vector_compare - p1 >>>>>>>> rs6000: Rework vector float comparison in rs6000_emit_vector_compare - p2 >>>>>>>> rs6000: Rework vector float comparison in rs6000_emit_vector_compare - p3 >>>>>>>> rs6000: Rework vector float comparison in rs6000_emit_vector_compare - p4 >>>>>>>> rs6000: Rework vector integer comparison in rs6000_emit_vector_compare - p1 >>>>>>>> rs6000: Rework vector integer comparison in rs6000_emit_vector_compare - p2 >>>>>>>> rs6000: Rework vector integer comparison in rs6000_emit_vector_compare - p3 >>>>>>>> rs6000: Rework vector integer comparison in rs6000_emit_vector_compare - p4 >>>>>>>> rs6000: Rework vector integer comparison in rs6000_emit_vector_compare - p5 >>>>>>>> >>>>>>>> gcc/config/rs6000/rs6000.cc | 180 ++++++-------------- >>>>>>>> gcc/testsuite/gcc.target/powerpc/vcond-fp.c | 25 +++ >>>>>>>> 2 files changed, 74 insertions(+), 131 deletions(-) >>>>>>>> create mode 100644 gcc/testsuite/gcc.target/powerpc/vcond-fp.c >>>>>>>> >>