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 D3AE63858C2D for ; Tue, 16 Aug 2022 05:53:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D3AE63858C2D Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27G5P016007265; Tue, 16 Aug 2022 05:53:42 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3j02064fma-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 16 Aug 2022 05:53:42 +0000 Received: from m0098419.ppops.net (m0098419.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 27G42H1i015699; Tue, 16 Aug 2022 05:53:41 GMT Received: from ppma01fra.de.ibm.com (46.49.7a9f.ip4.static.sl-reverse.com [159.122.73.70]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3j02064fm1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 16 Aug 2022 05:53:41 +0000 Received: from pps.filterd (ppma01fra.de.ibm.com [127.0.0.1]) by ppma01fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 27G5oUpu011729; Tue, 16 Aug 2022 05:53:39 GMT Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by ppma01fra.de.ibm.com with ESMTP id 3hx3k921y0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 16 Aug 2022 05:53:39 +0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 27G5rbgm23658828 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 16 Aug 2022 05:53:37 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 49C6411C054; Tue, 16 Aug 2022 05:53:37 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7C34811C04A; Tue, 16 Aug 2022 05:53:35 +0000 (GMT) Received: from [9.197.241.24] (unknown [9.197.241.24]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 16 Aug 2022 05:53:35 +0000 (GMT) Message-ID: <0054a837-ec76-a626-4566-932cb4fbffec@linux.ibm.com> Date: Tue, 16 Aug 2022 13:53:33 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCH v3] rs6000: Adjust mov optabs for opaque modes [PR103353] Content-Language: en-US To: Segher Boessenkool Cc: Peter Bergner , GCC Patches , David Edelsohn , will schmidt References: <09c34b29-feea-d26e-2c4f-5e096ab286bc@linux.ibm.com> <20220623190619.GU25951@gate.crashing.org> <6ded988f-6684-e42e-ca82-d81ff55178d2@linux.ibm.com> <20220624164917.GX25951@gate.crashing.org> <1647e4bb-fa61-065f-d90d-b56503f44770@linux.ibm.com> <20220815213006.GK25951@gate.crashing.org> From: "Kewen.Lin" In-Reply-To: <20220815213006.GK25951@gate.crashing.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: U16L9Iy5smQZdi5oiXe0KpG5ZgFpHAdY X-Proofpoint-GUID: yG1-M7miIQQFByCkj-ihDcvMQAc03KvX X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-16_03,2022-08-16_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 spamscore=0 clxscore=1015 malwarescore=0 mlxscore=0 adultscore=0 priorityscore=1501 bulkscore=0 phishscore=0 suspectscore=0 lowpriorityscore=0 mlxlogscore=759 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2208160021 X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_MSPIKE_H2, 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 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, 16 Aug 2022 05:53:46 -0000 Hi Segher, Thanks for the review! on 2022/8/16 05:30, Segher Boessenkool wrote: > Hi! > > On Mon, Jun 27, 2022 at 10:47:26AM +0800, Kewen.Lin wrote: >> on 2022/6/25 00:49, Segher Boessenkool wrote: >> Many thanks for all the further explanation above! The attached patch >> updated the misleading comments as you pointed out and suggested, could >> you help to have another look? > > Please do not send proposed patches in the middle of a mail thread. It > is harder to track things than needed this way, and it makes it hard to > apply your patches as well (for test builds, say). > Got it! >> Subject: [PATCH] rs6000: Adjust mov optabs for opaque modes [PR103353] >> >> As PR103353 shows, we may want to continue to expand built-in >> function __builtin_vsx_lxvp, even if we have already emitted >> error messages about some missing required conditions. As >> shown in that PR, without one explicit mov optab on OOmode >> provided, it would call emit_move_insn recursively. > >> - rs6000_emit_move (operands[0], operands[1], OOmode); >> - DONE; >> + if (TARGET_MMA) { >> + rs6000_emit_move (operands[0], operands[1], OOmode); >> + DONE; >> + } > > if (TARGET_MMA) > { > rs6000_emit_move (operands[0], operands[1], OOmode); > DONE; > } > Good catch, done! >> + /* PR103353 shows we may want to continue to expand the __builtin_vsx_lxvp >> + built-in function, even if we have already emitted error messages about >> + some missing required conditions. As shown in that PR, without one >> + explicit mov optab on OOmode provided, it would call emit_move_insn >> + recursively. So we allow this pattern to be generated when we are >> + expanding to RTL and have seen errors. It would not cause further ICEs >> + as the compilation would stop soon after expanding. */ >> + else if (currently_expanding_to_rtl && seen_error ()) >> + ; > > The comment goes inside this "else if" branch. Maybe make it a braced > block if the semicolon looks out of place without it. > Done. > Removing the TARGET_MMA requirement is the correct thing to do no matter > what: this is not an MMA insn at all after all, and neither is it only > useful if MMA is enabled, etc. Yeah, it needs one subsequent patch as we agree on. > > Is the later "unreachable" ever useful? If not, you could just fall > through after that "if (TARGET_MMA)" thing. Worst that will happen you > get an OO move in the insn stream that we will error on later :-) Yeah, I agree that "just FAIL" works for this issue, but for now without the valid condition in the context we only expect this expansion to just perform for bif further expansion (knowing it's taken as bad), the "unreachable" is meant to punt the other unexpected cases. :) > > The patch is okay for trunk with the indentation fixed. Thanks! > Indentation and comments problems addressed, committed in r13-2062. Thanks again! BR, Kewen