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 2F3C93858424 for ; Thu, 8 Sep 2022 13:04:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2F3C93858424 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 (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 288D0LSb006378 for ; Thu, 8 Sep 2022 13:04:30 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : subject : to : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pp1; bh=yCZfFeJsvlMRFeVeD8t/YK1CSmHWY3oSPUuixFiMNME=; b=nRR09/C9bYFMBEVvHKFLUGameDRT30OlCrEHkw9P6nYkCAZwiZkSzZbTYKD22I4eBRMY QL8kKVI32LCDNsIkM/tilNklX4XasX7AErHlNZIxQAfE5SDiWwuaQ246Qlw0DCXLnEA5 ca87OgyaSIBSaXTa2/Wf0Cbgfe1NFZdZW6PnWWonjSry5GIasAVnIja2Ix/zw23gk32C W8rQcoqwej1fN2oGZdm52phO4z4aACmw5ssRLJVzEBtqqwX/FIO9jk/k0YpEV7VkF8G6 kwKXU0uKdPP09U4qlKBfEG4hnlAowWduxpNyPWRcJ7cu7ULbuwHFta57fhdseo3KhnPU kQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3jffmxu7wf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 08 Sep 2022 13:04:30 +0000 Received: from m0098421.ppops.net (m0098421.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 288D4Sir032379 for ; Thu, 8 Sep 2022 13:04:29 GMT Received: from ppma05fra.de.ibm.com (6c.4a.5195.ip4.static.sl-reverse.com [149.81.74.108]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3jffmxu7tp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 08 Sep 2022 13:04:29 +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 288Cqoa0026444; Thu, 8 Sep 2022 13:04:26 GMT Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by ppma05fra.de.ibm.com with ESMTP id 3jbxj8vwr2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 08 Sep 2022 13:04:26 +0000 Received: from b06wcsmtp001.portsmouth.uk.ibm.com (b06wcsmtp001.portsmouth.uk.ibm.com [9.149.105.160]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 288D4OLP42402186 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 8 Sep 2022 13:04:24 GMT Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 88700A405B; Thu, 8 Sep 2022 13:04:24 +0000 (GMT) Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 62012A4054; Thu, 8 Sep 2022 13:04:24 +0000 (GMT) Received: from [9.171.42.140] (unknown [9.171.42.140]) by b06wcsmtp001.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Thu, 8 Sep 2022 13:04:24 +0000 (GMT) Message-ID: Date: Thu, 8 Sep 2022 15:04:23 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [RFC] postreload cse'ing vector constants Content-Language: en-US To: Jeff Law , gcc-patches@gcc.gnu.org References: <3b0984ef-c532-c29c-732a-1c9b569e134c@linux.ibm.com> <7ecca009-32ac-3b2f-e552-55414300113e@gmail.com> <70a54b9a-30ea-5673-3a41-9585b3abf627@linux.ibm.com> <5b687817-126e-d463-9d88-b3d7d2dad861@gmail.com> From: Robin Dapp In-Reply-To: <5b687817-126e-d463-9d88-b3d7d2dad861@gmail.com> Content-Type: text/plain; charset=UTF-8 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: QmlvU3e4JizmQecm4PlhyHpYkootf5bD X-Proofpoint-GUID: 59QsO-U1khcCEfS4wy5CinWEGqzEUdub Content-Transfer-Encoding: quoted-printable X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 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-08_08,2022-09-08_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 mlxlogscore=999 clxscore=1015 priorityscore=1501 spamscore=0 lowpriorityscore=0 suspectscore=0 malwarescore=0 adultscore=0 impostorscore=0 bulkscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2209080047 X-Spam-Status: No, score=-6.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,KAM_SHORT,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: > Which is this from the mail archives: >=20 > https://gcc.gnu.org/pipermail/gcc-patches/1998-June/000308.html >=20 > I would tend to agree that for equal cost that the constant would be=20 > preferred since that should be better from a scheduling/dependency=20 > standpoint.=C2=A0=C2=A0 So it seems to me we can drive this purely from a= costing=20 > standpoint. I did bootstrapping and ran the testsuite on x86(-64), aarch64, Power9 and s390. Everything looks good except two additional fails on x86 where code actually looks worse. gcc.target/i386/keylocker-encodekey128.c 17c17,18 < movaps %xmm4, k2(%rip) --- > pxor %xmm0, %xmm0 > movaps %xmm0, k2(%rip) gcc.target/i386/keylocker-encodekey256.c: 19c19,20 < movaps %xmm4, k3(%rip) --- > pxor %xmm0, %xmm0 > movaps %xmm0, k3(%rip) Regards Robin