From patchwork Wed Nov 15 17:02:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tamar Christina X-Patchwork-Id: 165502 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b909:0:b0:403:3b70:6f57 with SMTP id t9csp2675828vqg; Wed, 15 Nov 2023 09:03:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IFJ0qGNX+R7xW2xXVyb5EELhEiy2slMHdcsS6nrJ01+8ybXyMXg+bhNc4mAB++Rzyzoh5LN X-Received: by 2002:a05:6214:f02:b0:670:63cc:210c with SMTP id gw2-20020a0562140f0200b0067063cc210cmr8932515qvb.39.1700067782188; Wed, 15 Nov 2023 09:03:02 -0800 (PST) ARC-Seal: i=4; a=rsa-sha256; t=1700067782; cv=pass; d=google.com; s=arc-20160816; b=jUe1UGaqf28/KQDyQDLx2S0oUi4m6QurYCKqx6OFhk0QwbOzfJB8U14/uFUFKyhf4T PDuxP5xlQRyR8a62KhqQrEPY7yEdiiOlS2wB7/a7WjsJmEbfoWazalXXM2e4vMlHuWWL uEUPWYLilUWKlL4kS/a0HvVl+D75vQ57pNidb5EY0joB3bpHgCPCvOkSAAm6rImcn5ff AhAv0xAcyNK7wSKL2iH83HeGS83Uz/r5QBkeQHHaDMRp07+V1JCasdYlFesAlSlzF4xW 3FDuNYkS4NQ3HK5TWgiiKrvC8j0IByjq1OvprzS3Ff8Y9LRWQN+EddsarnnxCsRKykbW mtgA== ARC-Message-Signature: i=4; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:original-authentication-results :nodisclaimer:mime-version:content-disposition:message-id:subject:cc :to:from:date:authentication-results-original:dkim-signature :dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=Oh8ZeFolVtL5UoczoVdvIWRFHe0J2ZYmcP7GWlH0smc=; fh=A1gjXEMUlzxnxUbUxlff6kC1EuQ8Y+iSE/p7rbwCbIM=; b=eEnFMWMioIb26QOG9iD+A2m9oST72NrFn26pZ1mRe2Ti5iFsNQ4P9hvWzpMnOh11j6 kxwfEqFaNEQqF2f6v1X0XmT43pvrJnNcgwBXG3zwtsJhtOVQ48v721zWA64cpvFjA97w I8VrTxDJjP0QnI+pAJJ6oVZhh06uk9x+tfXXTbqL/3I+8j0olmBaud85VUwhfuQS6qrh 1yGzF22XDuTYrCgLydeOOKTAvEZKzT2fdCwiMlhpJMs/C/q34KdrpINAyUda44sTgjat ZS7aXDWgaBzVmN9c1/WaiplmkHWFVO9NUE+/UKa5d0a8yfP4LkOXzw9vh5iRtnOJu4jp GsCQ== ARC-Authentication-Results: i=4; mx.google.com; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=q4DrljLZ; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=q4DrljLZ; arc=pass (i=3); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id g17-20020ad45151000000b0066d7eb831f1si9549514qvq.562.2023.11.15.09.03.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 09:03:02 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=q4DrljLZ; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=q4DrljLZ; arc=pass (i=3); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E6E8E3858412 for ; Wed, 15 Nov 2023 17:03:01 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2040.outbound.protection.outlook.com [40.107.21.40]) by sourceware.org (Postfix) with ESMTPS id 703DE3858C74 for ; Wed, 15 Nov 2023 17:02:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 703DE3858C74 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 703DE3858C74 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.21.40 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1700067749; cv=pass; b=mzrWRSWuIseT0hZkoAhR7GlDpO4Tp58ZAgCQP90NpU4zQ87GLi7YirigwphJTVjNXqE3mprUYqRCkjHguIKgBW8UYymgDrbdVQz1L/gua+teAvFgYd7BB4HJSuM8I0Za4pwcYUGzKKLZcHKGi+cNH2dXfl8hChi0EC8zWK14l2g= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1700067749; c=relaxed/simple; bh=QbT1JzmFO5XZj9EFiim3zcSSiFZThlM9AmJ1YRljs24=; h=DKIM-Signature:DKIM-Signature:Date:From:To:Subject:Message-ID: MIME-Version; b=bvholldMoTj/rFhenhuGKUcnpIPQeD4F4XyepjnnDUZ4Pcxsac5FVVwT2i8Gs46Sja8x6V+80cbKmq6kD064UDn4XabpZyOHZ64oeZ/x4ipI4g35e/pKK+4Viu80kzHz+QFplcVjX94nrUY7Nqv1oy6VEvawIqVoVTMeLXyHBhw= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=mVMo3HoIvanQNlUH+xj0cZfCtwNQiEM1B1SrtWs+rPKGiR1sN/ITKAGpC6lRc9AfjDmDpCnNL7I3CH60F1zJNEOywu96oGCdwbg3r+G7S4IkFc42BJFfMs5iB031yF6JaV78meHWpoFHI1YbisC8yoIDC/kE1tR9fYjHHa2wSTx3HGZx7qrQZC6jhiRpgXWaUyrc9MX+mEVnXqfTEqesditHTHXw1FXpl6fX/k+wt3UFXA6wcuZaoXv+Wi/8lnEboajFAqtjdFEKixW1zXfthnUfTTTPyivGUdeqYfRt5alQ4czEOg+OiG1//3c9cRp/23VqjNfzJMgk9OT9Yd24CQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Oh8ZeFolVtL5UoczoVdvIWRFHe0J2ZYmcP7GWlH0smc=; b=mt9TrYrTr04ifyIenYNpkevNf+5EbXXIzbHfpDJ0gAL5cq1I72Cy8Q2L+zLwcA6RJhFliqYJ7XJULckXjRllZhAArElMzqwlIa9F2AZwKkoCGYK9/HZfn7pdrtB+iBNRtKo8e8FZTYS7+RaIypRAD83DZtONXcip9izSC+b5hx9P6iaRhe4g85rGJq84DQ3IIGfZd0jUFdPsIrybhYeZmws/7N3ER21rN+UHDxIPuljyOLwvrKZnxtEyi+j3MzH8g6lz8rZ0JQm6AbGCFU+GcseMlRshZmaOIkMZnYac37mBWdjrbohH/4bbbAU4KgjG3pVj1Wy9HhdLLk9iohiYxw== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Oh8ZeFolVtL5UoczoVdvIWRFHe0J2ZYmcP7GWlH0smc=; b=q4DrljLZhNrgOP+8+Kjw5TUuLo2Eo/PsLNueu6L3Xw7hJBf9NRj9r/Slw4EcIM++qwND3PN3VT02yWFaOPPZJE8gdAYtMxKePXDUuvFNZoPvz1m/Zc+gUCef6/OtqMFN7ubR+5Q9IObhIOvmMp+1U3ymK9QQtzcG4IV9wjS92j4= Received: from AM6P194CA0090.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:8f::31) by AM9PR08MB6211.eurprd08.prod.outlook.com (2603:10a6:20b:2de::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7002.19; Wed, 15 Nov 2023 17:02:23 +0000 Received: from AM4PEPF00027A67.eurprd04.prod.outlook.com (2603:10a6:209:8f:cafe::92) by AM6P194CA0090.outlook.office365.com (2603:10a6:209:8f::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7002.18 via Frontend Transport; Wed, 15 Nov 2023 17:02:23 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM4PEPF00027A67.mail.protection.outlook.com (10.167.16.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7002.20 via Frontend Transport; Wed, 15 Nov 2023 17:02:23 +0000 Received: ("Tessian outbound 7c4ecdadb9e7:v228"); Wed, 15 Nov 2023 17:02:23 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 3d324cbd331a6e7a X-CR-MTA-TID: 64aa7808 Received: from ac5d11f1bb5e.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 56877A1A-1184-4F6F-9B60-C65C747E3831.1; Wed, 15 Nov 2023 17:02:17 +0000 Received: from EUR02-AM0-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id ac5d11f1bb5e.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 15 Nov 2023 17:02:17 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=A/JxCc3w9tH33sDz2O253nxVUUPJ8P8JLOMz7p2YJOppzLJsiMg5U9mhuwun2bdbtYrYu/EDkMtb5nPAjEeVkaVahKPNJ2IdU1PseD1hb4H8y48NMsOBu9p07nitXj93oFADbAZ4aaaF0JAzLQrlGJwLzkf4vA2I5qTwUzTr/kvr+t5bXXjESkaaQyIvdDoxSFWpUAU0J8uQIjt8xP4BNPyualQfLN+ME2oydjCbMIIm/cN2mjzbMR0cRnYk5SdqRt276U/Uo1pvMzicXLIbfc8dT+1r7Uj5IP6YfE4lKJ9FDg5/BAWejel8X4NvsFb5eQLY9PXKgjxq0nt9pZJACA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Oh8ZeFolVtL5UoczoVdvIWRFHe0J2ZYmcP7GWlH0smc=; b=Tal4PUZF2DUVe+X/Ba0CSUvhn4SEIMBWJrMj0/aQMFKJL09D1mGJVz1n1iGhYj9xVMz+We7Qvutm2EXkv50DYyGWP1qkuJFqKILvfOkmyBtYkWal4zpN1O7fL1zx04fvpbElCrBSdKHFw2DHYmtfMANsn53LihUiVjf2AZH1IlvTpiPbQbviRxAWJBDCB/Q5rUo0pdd/3wBIE1JmDmMB0Q2xgj824ceRHV5io4SwtMCY2kc7f9mX/GJ1DWZfP+RZp8Fkkf91pfatGJ8RtVgOAdSt3jBqXDF0+c8XfC5Pcw6rGyYrFHVBseNkFeFJgM4KH9FwPPbRN155LFal3EVUUQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Oh8ZeFolVtL5UoczoVdvIWRFHe0J2ZYmcP7GWlH0smc=; b=q4DrljLZhNrgOP+8+Kjw5TUuLo2Eo/PsLNueu6L3Xw7hJBf9NRj9r/Slw4EcIM++qwND3PN3VT02yWFaOPPZJE8gdAYtMxKePXDUuvFNZoPvz1m/Zc+gUCef6/OtqMFN7ubR+5Q9IObhIOvmMp+1U3ymK9QQtzcG4IV9wjS92j4= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from VI1PR08MB5325.eurprd08.prod.outlook.com (2603:10a6:803:13e::17) by PAVPR08MB9040.eurprd08.prod.outlook.com (2603:10a6:102:32d::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7002.18; Wed, 15 Nov 2023 17:02:15 +0000 Received: from VI1PR08MB5325.eurprd08.prod.outlook.com ([fe80::9679:2ab0:99c6:54a3]) by VI1PR08MB5325.eurprd08.prod.outlook.com ([fe80::9679:2ab0:99c6:54a3%6]) with mapi id 15.20.6977.029; Wed, 15 Nov 2023 17:02:14 +0000 Date: Wed, 15 Nov 2023 17:02:10 +0000 From: Tamar Christina To: gcc-patches@gcc.gnu.org Cc: nd@arm.com, Richard.Earnshaw@arm.com, Marcus.Shawcroft@arm.com, Kyrylo.Tkachov@arm.com, richard.sandiford@arm.com Subject: [PATCH]AArch64: only discount MLA for vector and scalar statements Message-ID: Content-Disposition: inline X-ClientProxiedBy: LO3P265CA0014.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:bb::19) To VI1PR08MB5325.eurprd08.prod.outlook.com (2603:10a6:803:13e::17) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: VI1PR08MB5325:EE_|PAVPR08MB9040:EE_|AM4PEPF00027A67:EE_|AM9PR08MB6211:EE_ X-MS-Office365-Filtering-Correlation-Id: 5a6f8688-4e1c-451a-ba4e-08dbe5fca361 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: +yjdjD7jppx2Bw1oGpX3bqCIee+5YQWpG7GoSXRhAlVc7iVtnWZfIcGKASiu3M2K2b03u6xW2xxLGFeRdxe2RVjj2RUVqLsfs8XGLc7E2nbPC89UW4828WvX8aWXii2Tmx+ZKYRbNxFPi/w/IJka4Bgi73Xu9ICmvVkQIDcm6HMI1r/cSGDWY4sjPxUCgi1ZWnmiXCeD3xon6PlCmCCTMLxf489vX2YjBSHRgsBgGq88I9d86xiCBnmKW+jIqMdqaBjX34tJwhEOyXL+733UmWs50CIWhhzqZPq3zfJFxDVoA3tBr4IUVhS7itoC0iVIcR8Lr3cTu9OnxXMHvxIFnSPHCs125GQx7lAFaurxsGnHopYBb91Bwy+vqUZ+lUqXrYZrPemTXynJUTz5PptfoDBs85oRnXHs9VgSUggBLsAlF8ELFcxB48bP2Na8xa0Cv1Bvdm1hoX0w3Zv/0BRaAR2cQzwaAMl4HklsO9DunycaWSW+v2PVwN+XOmArdoKFoPSBAmvSYy8SjP0rDsCnZirqj1FzysppCE3ZsbPWuwPjH65aLtkzlr3EJHhSO7BOEm04ia1btz8elihzhtTblfHW9D74B42Sx5yIuGvu/P3ZSMUkQcY2/OyZxLiXUp4f5tWW+YklrNZPRMZd/OqlW1DMb5/+lZdnFahzbKBfY3E= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR08MB5325.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(39860400002)(396003)(346002)(366004)(376002)(136003)(230922051799003)(64100799003)(451199024)(1800799009)(186009)(2616005)(235185007)(26005)(478600001)(6666004)(6506007)(5660300002)(6512007)(84970400001)(4743002)(2906002)(8936002)(8676002)(4326008)(33964004)(44832011)(44144004)(316002)(41300700001)(66899024)(38100700002)(6486002)(66476007)(66556008)(66946007)(6916009)(36756003)(86362001)(4216001)(2700100001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAVPR08MB9040 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM4PEPF00027A67.eurprd04.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 6e30f0ce-5fc9-43df-f153-08dbe5fc9dd9 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9KXOQ4yH7ymfRFYfiNUpI5u7O46/AwtJ+q4N/ymy5uVUPtQ9Y6v2u5EZrFmRQlgEwvmqxrEXu/zOPXI+TtyHYrQRkgqfUD51745ArbdjMf/edo/zBVgczYRK8oEyjNKsKtkkGVip8W5TxkLwMeD+xmTMUNTbv8rnDoZdU38yeHpeRikkwiKf/q2tc/pkVH3rVeToiOpGJeRZbYpTu2buqikK+ilhSfmtMngqyRD3LcAR/79ycJLqQTIWDmFFMexRTS4pTb3PzpPcKF1gTY1v582gnX1VBv7/gDM8tjb6GCWAkoRGZYXSLoUIDpNJ2ZXedIvS4Sacv/7siygEAA3jS4cAeJuSrvuGaTRcghZBrGwq5hGttDxzIp/NWyq7AcI2Hj/yNsCHrqaJU08bNl/rL5ECX6eNVCgo6SrYiL0dQ6DLkfhsCE6vv5sq6eMc1hbtGpURk8GwDwTIHmHNPbS8gz/MIxA/nNLFJ7AOr4vM8EvkRtu35ppk6BmJTOlQ+Oiuw7magzIrjOUxaVpuNdmb6qfC/S9EyToPLBCrVAkI6RYpvq7aBkD7csoq5C8KkpVRsinuVKRZP5X0rob+iHHJPGfmnbkiGJunnLMeUCiGBgUq9tM4EEbrcXXQIYBmRa2kk+hthYIB7SOS6vY0o99U85gdmByUjoUlcAJe6n2Vm0zv3QyFDFsBd48dx+dZmODyVuBiqGNUZ38OvOIabkqme7x9VF3EIXQKwHpIRpgqTYmkGZTllK5ArjkrENNjISJ2F8ufTXWRtszQrn7ARxHsbDw96HkA0YWAdMDCMaewGyqx91KCFA1qMfXTAcss2omj X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(13230031)(4636009)(376002)(39860400002)(396003)(136003)(346002)(230922051799003)(82310400011)(64100799003)(451199024)(1800799009)(186009)(36840700001)(46966006)(40470700004)(2906002)(478600001)(6486002)(6512007)(6506007)(44144004)(33964004)(2616005)(40460700003)(86362001)(6666004)(70586007)(5660300002)(316002)(235185007)(44832011)(70206006)(66899024)(6916009)(8676002)(8936002)(4326008)(82740400003)(47076005)(81166007)(41300700001)(26005)(84970400001)(356005)(36756003)(36860700001)(4743002)(336012)(40480700001)(4216001)(2700100001); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Nov 2023 17:02:23.8042 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5a6f8688-4e1c-451a-ba4e-08dbe5fca361 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AM4PEPF00027A67.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR08MB6211 X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, FORGED_SPF_HELO, GIT_PATCH_0, KAM_DMARC_NONE, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782650274852734831 X-GMAIL-MSGID: 1782650274852734831 Hi All, In testcases gcc.dg/tree-ssa/slsr-19.c and gcc.dg/tree-ssa/slsr-20.c we have a fairly simple computation. On the current generic costing we generate: f: add w0, w0, 2 madd w1, w0, w1, w1 lsl w0, w1, 1 ret but on any other cost model but generic (including the new up coming generic) we generate: f: adrp x2, .LC0 dup v31.2s, w0 fmov s30, w1 ldr d29, [x2, #:lo12:.LC0] add v31.2s, v31.2s, v29.2s mul v31.2s, v31.2s, v30.s[0] addp v31.2s, v31.2s, v31.2s fmov w0, s31 ret .LC0: .word 2 .word 4 This seems to be because the vectorizer thinks the vector transfers are free: x1_4 + x2_6 1 times vector_stmt costs 0 in body x1_4 + x2_6 1 times vec_to_scalar costs 0 in body This happens because the stmt it's using to get the cost of register transfers for the given type happens to be one feeding into a MUL. we incorrectly discount the + for the register transfer. This is fixed by guarding the check for aarch64_multiply_add_p with a kind check and only do it for scalar_stmt and vector_stmt. I'm sending this separate to my patch series but it's required for it. It also seems to fix overvectorization cases in fotonik3d_r in SPECCPU 2017. Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. Ok for master? Thanks, Tamar gcc/ChangeLog: * config/aarch64/aarch64.cc (aarch64_adjust_stmt_cost): Guard mla. (aarch64_vector_costs::count_ops): Likewise. --- inline copy of patch -- diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc index 06ec22057e10fd591710aa4c795a78f34eeaa8e5..0f05877ead3dca6477ebc70f53c632e4eb48d439 100644 --- diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc index 06ec22057e10fd591710aa4c795a78f34eeaa8e5..0f05877ead3dca6477ebc70f53c632e4eb48d439 100644 --- a/gcc/config/aarch64/aarch64.cc +++ b/gcc/config/aarch64/aarch64.cc @@ -14587,7 +14587,7 @@ aarch64_adjust_stmt_cost (vec_info *vinfo, vect_cost_for_stmt kind, } gassign *assign = dyn_cast (STMT_VINFO_STMT (stmt_info)); - if (assign) + if ((kind == scalar_stmt || kind == vector_stmt) && assign) { /* For MLA we need to reduce the cost since MLA is 1 instruction. */ if (!vect_is_reduction (stmt_info) @@ -14669,7 +14669,9 @@ aarch64_vector_costs::count_ops (unsigned int count, vect_cost_for_stmt kind, } /* Assume that multiply-adds will become a single operation. */ - if (stmt_info && aarch64_multiply_add_p (m_vinfo, stmt_info, m_vec_flags)) + if (stmt_info + && (kind == scalar_stmt || kind == vector_stmt) + && aarch64_multiply_add_p (m_vinfo, stmt_info, m_vec_flags)) return; /* Assume that bool AND with compare operands will become a single --- a/gcc/config/aarch64/aarch64.cc +++ b/gcc/config/aarch64/aarch64.cc @@ -14587,7 +14587,7 @@ aarch64_adjust_stmt_cost (vec_info *vinfo, vect_cost_for_stmt kind, } gassign *assign = dyn_cast (STMT_VINFO_STMT (stmt_info)); - if (assign) + if ((kind == scalar_stmt || kind == vector_stmt) && assign) { /* For MLA we need to reduce the cost since MLA is 1 instruction. */ if (!vect_is_reduction (stmt_info) @@ -14669,7 +14669,9 @@ aarch64_vector_costs::count_ops (unsigned int count, vect_cost_for_stmt kind, } /* Assume that multiply-adds will become a single operation. */ - if (stmt_info && aarch64_multiply_add_p (m_vinfo, stmt_info, m_vec_flags)) + if (stmt_info + && (kind == scalar_stmt || kind == vector_stmt) + && aarch64_multiply_add_p (m_vinfo, stmt_info, m_vec_flags)) return; /* Assume that bool AND with compare operands will become a single