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 E7D393858428 for ; Wed, 7 Sep 2022 12:20:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E7D393858428 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 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 287AkKT3008686 for ; Wed, 7 Sep 2022 12:20:12 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=Zo3QF6C+TDi0S0cR2g2XhP0/hl903t5DGZN22tzvqoI=; b=YktUHnuqICiPhOaM0abgp6EnEC0O9qwqaotXWcGSGY2X/pGuAut2Y5s2PMa11qyaM2SV HMUC71PbPhWQjQuvLaeFQ9QhAwZxfGXCZ9gEr8LuZUpx9h74TuzHZKAGEgSjXfD/OvPX eBBxpfTwobbyPmZfxgOBXdfdOewCjLjIdfjDMc09wzyb20wKgOjMetKaIzaSbFzLp4je gCzIe9G+4sODTL5u3COFGileEAhBwP4aI7sh+sSTrrrI2+QHNOrVKKLkD2T1CyhpRMtw 560HDUdspIQHER7O9EviXLWAfUIlIy2TooO4PlsbssYKXrdo9Znqk7wKp/3v9qqnvVVs jA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3jesuajtsa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 07 Sep 2022 12:20:12 +0000 Received: from m0098417.ppops.net (m0098417.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 287BbTjc029862 for ; Wed, 7 Sep 2022 12:20:11 GMT Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3jesuajtrk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 07 Sep 2022 12:20:11 +0000 Received: from pps.filterd (ppma04ams.nl.ibm.com [127.0.0.1]) by ppma04ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 287C6FBD020625; Wed, 7 Sep 2022 12:20:10 GMT Received: from b06avi18626390.portsmouth.uk.ibm.com (b06avi18626390.portsmouth.uk.ibm.com [9.149.26.192]) by ppma04ams.nl.ibm.com with ESMTP id 3jbxj8w4nm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 07 Sep 2022 12:20:09 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06avi18626390.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 287CGbMa40763658 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 7 Sep 2022 12:16:37 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B7713A404D; Wed, 7 Sep 2022 12:20:07 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 85808A4040; Wed, 7 Sep 2022 12:20:07 +0000 (GMT) Received: from [9.171.19.250] (unknown [9.171.19.250]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Wed, 7 Sep 2022 12:20:07 +0000 (GMT) Message-ID: <3d928191-a2f5-f314-c03b-d4e590282ce9@linux.ibm.com> Date: Wed, 7 Sep 2022 14:20:07 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [PATCH] expand: Convert cst - x into cst xor x. Content-Language: en-US To: Richard Biener Cc: GCC Patches , Andrew Pinski References: <938fbb10-926f-a588-1e90-1d7b72d1d7f8@linux.ibm.com> From: Robin Dapp In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: YJ4s56ypcQTCLVm9OwKe1CjUWGFY7bsv X-Proofpoint-GUID: VeRFdZmffG3b3f9vJhgYqOI6r1fYLis9 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-09-07_06,2022-09-07_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 lowpriorityscore=0 clxscore=1015 malwarescore=0 adultscore=0 priorityscore=1501 suspectscore=0 phishscore=0 impostorscore=0 bulkscore=0 mlxlogscore=574 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2209070046 X-Spam-Status: No, score=-7.2 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 List-Id: > The question is really whether xor or sub is "better" statically. I can't > think of any reasons. On s390, why does xor end up "better"? There is an xor with immediate (as opposed to no "subtract from immediate") which saves an instruction, usually. On x86, I think the usual argument for xor is that it's shorter (if flags etc. are not needed). It's not that I don't want to implement it in the backend, just that I understood the original PR in a way that it would make sense to have this conversion available for more targets. If there are too many confounding factors that prevent this situation from being statically costed properly, then sure, not much use in implementing it generally. Regards Robin