From patchwork Mon Nov 6 10:20:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tamar Christina X-Patchwork-Id: 161922 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp2558327vqu; Mon, 6 Nov 2023 02:20:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IHmLL5vWc6IGoDiD69Io+DBT5seXtKU+MLmBJix7EgR7UNI119tkR4a5spgz6yUDMIWsHyd X-Received: by 2002:ac8:57c2:0:b0:41e:3eef:736d with SMTP id w2-20020ac857c2000000b0041e3eef736dmr33214905qta.5.1699266051077; Mon, 06 Nov 2023 02:20:51 -0800 (PST) ARC-Seal: i=4; a=rsa-sha256; t=1699266051; cv=pass; d=google.com; s=arc-20160816; b=Fq6Dkh5cRaBya/3fnt4mWx2+bZ/ZZHz8eNYdnaMnssRyY5DeF4S/lQBpqzhizEYRqe sY0znvHTu/gDzY99OAieils/+QvqcSffYA3CdkzPRU/Cy0jt70uX70uMHEPPu+9QzRD4 ggc10sOjmc2ymlYLW5NMZLQWzUAggniZZJP5TtlZ2wILfphiNzInxYnrmpFAlyJ8qboG 2FIvtpOF7i/PEr1JIq8UABgpG303dLMcW/btDz1h9rATFWo6PXVIeWL2ATHyCvQ6+l1O nUqWkWyEHiELu85iqIv9oxDXarKAgyYodb4oWduZBdjHt+Ss3z5BBqyLCcEcHo3MVULL 7ASQ== 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=USB+lSpy2eOPaUuF6/uJOxkKawNSv+LnwHMP66a8afI=; fh=6lLuKcPp5JwcfhLsQ40FQN1vJS1KxlKbf2GiViQwbCM=; b=C8Mjr5Ren7UBUTHVhHwVeV0IJUh0szVlqll8SPQ24XefduCPDvZdbVBk7TrRsdk9t7 TFVp82Ymyl7bOvHSJhZq4QtVPyMihhmvdcobipis1PN5Ers+g9mnEjP8dBIP3mNRyfzV f3m0pprOrEs8M2+d08jScGMDfz7x7cEsjHLtCc2lXkfDUziRjhXUhOKtp9pTqzmX5UNl irWmqP13TL2VEyU8FRkICbQwkbnxsir4o/aYhhhsDLrsBXN69hPknt5PvipHmO7fhhVX kRx+aRrPz2C3IeLQau4ocy5VhaTJyfDKrCt0aZFhrLjvics+qMKi29pqr47ggCmQ5rq3 ovjA== ARC-Authentication-Results: i=4; mx.google.com; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=AG6NDL0a; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=AG6NDL0a; arc=pass (i=3); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c 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. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id u7-20020a05622a198700b0041e8d67072bsi5324036qtc.560.2023.11.06.02.20.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 02:20:51 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=AG6NDL0a; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=AG6NDL0a; arc=pass (i=3); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c 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 A7E75385B81D for ; Mon, 6 Nov 2023 10:20:50 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2067.outbound.protection.outlook.com [40.107.247.67]) by sourceware.org (Postfix) with ESMTPS id 39CB23858D28 for ; Mon, 6 Nov 2023 10:20:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 39CB23858D28 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 39CB23858D28 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.247.67 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1699266025; cv=pass; b=wTJ6ePG+2ssX8NY58awwZlhX1fsOyeHEvVEiHBojdz9iKGE/f2gtRX8e0FV6y+/+LQLirofPmxXCszaUXUh+TCrLc+KeVCGjuQFTps478s5o+uFeBl7rHZoa/dA9X9eqpu9SBBotaWakukIuK8lOcZ91ivP6L033eNmCIlEasdw= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1699266025; c=relaxed/simple; bh=NqCPJvL55C8ehTdxMTJEgq37dtARR0kj1nGyTNsc3uE=; h=DKIM-Signature:DKIM-Signature:Date:From:To:Subject:Message-ID: MIME-Version; b=QkZUdGaNuhAFXdD4LDcGCDNI+cyxsPoo8cvyZUoSw7Q4sguEPkHLdNW1G2FjEHXbWQUw023a5tT659zE+c67SpXq6vyeSqbAERNyO0kvdSxMfFeVyQlMmOgOk87U8bAI3Q1lLZBBeLX41ocOZELGubTWHYHkSdM7wymdptV85hQ= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=YMed8lBqLqu/D3gPftc7eD0t++1opXSNqEeQZ211rM8RtqC/30HeYVaBF5zd3hyCq9WHPcAFLE9au7zI3rRpbs4X8HHal23KEzpWuJQYOyNF7yTV/JLloBspvQYZ8KWxooLmkU4LfTmk4hIA0P6Msp5S7fTuEPdXF5UICX6qoC7xN4g0Ea7bdZPVyqnltmab8JzoDIHfewfuQjDenZx5TvEV+EAw2xCvX+F7TMr/88r5g4R/76jy4/M4i2lw/Gj8jTuiOOrnMbbnYLddhUY9egXr9KBmrYrQi3TugS7X+36+O5va6iJpW1IavRdqgCTNID4hbP2NPYFwkzoGhtWZ1w== 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=USB+lSpy2eOPaUuF6/uJOxkKawNSv+LnwHMP66a8afI=; b=O/qPo0mrlDql1jpSaCRDQFMCzAcmF+qrXHaJ8WEWVtUNz9hESrwYvuMkBnP5kEoazRcPtT7roHiNY7OeqLzrrb6ZW6/9BqT8AMUTfldu3Cv2WogqzxTiH6yClVleUkZKlUECR6M5hLTS3a7pkj4hF43N/8nZljV2+l2XaIGSP024EMir3ljAGA6e+lvQ3YScS8bklotlpmKp7Mxfe+IzoorGXAIlzLiNc0O2sL4+KUZs11uA7yTby9D4brcPHuo8MG25pfp+p/O6Uzua7lLCvyI9SWrLHTIxgBkwNySfuEUp6LTUIIZd/mhBmxFwGeHjq8cjJjjBA3Kj96cV2+GKWg== 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=USB+lSpy2eOPaUuF6/uJOxkKawNSv+LnwHMP66a8afI=; b=AG6NDL0ahHZUNC7ueWIBPuQTqvIeQODNvMJGHo52x/PMnFsSGy9u79S6liSiFy1TJ8/X+Ub3OfRV0vwbhk8n44c9q69Z5567KPB+XuplSt7MemDMQ3Pr7fCiY8zVOgvMdFGb8quvdi93eMolTSO0ZRJqxYTQaGHQoX+k/K3XZSM= Received: from AM9P192CA0015.EURP192.PROD.OUTLOOK.COM (2603:10a6:20b:21d::20) by DB9PR08MB8358.eurprd08.prod.outlook.com (2603:10a6:10:3da::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.27; Mon, 6 Nov 2023 10:20:17 +0000 Received: from AMS0EPF000001AC.eurprd05.prod.outlook.com (2603:10a6:20b:21d:cafe::80) by AM9P192CA0015.outlook.office365.com (2603:10a6:20b:21d::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.27 via Frontend Transport; Mon, 6 Nov 2023 10:20:17 +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 AMS0EPF000001AC.mail.protection.outlook.com (10.167.16.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6977.16 via Frontend Transport; Mon, 6 Nov 2023 10:20:16 +0000 Received: ("Tessian outbound 7c4ecdadb9e7:v228"); Mon, 06 Nov 2023 10:20:16 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 27b4043cfdfd220f X-CR-MTA-TID: 64aa7808 Received: from d9c12637e8d5.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 65F4E35E-3DDE-46D9-A2FE-E9B769846610.1; Mon, 06 Nov 2023 10:20:09 +0000 Received: from EUR02-AM0-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id d9c12637e8d5.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 06 Nov 2023 10:20:08 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Bt1gAsO8Cs3tP7tiwcBs1pWYiJC0QDpf5m8E74QhsbN3wk6QhPY+pv5+NSblQnmxhCZEBMlFZ5clyB6tJWyQjyAZZacRFtnP89YcOAbrimMl7sRnz9pPB7SkqnNMDRNc3qh38lYZ0d2NyruF54kQLTsZWGoKvpNfUc2DKnFbCBk5Ml1mDYuWt3UTxgQ4Ijk6BkEbbLaPbd+YAisa4mwfoajSvp7y104s31Eu9rzpXDs4bZE/LJkYz96GLl2j9LyXCvXj8YGrpID1ns508jhSKvh8btYb3/4aLjxpSrsFwaE/P1U/vMnkzY58e7yfc9D5qJfPcZkN2XYcEk63saYGAg== 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=USB+lSpy2eOPaUuF6/uJOxkKawNSv+LnwHMP66a8afI=; b=mzxnII+vGEelHMY2KnaQrgM9kWiD9HWMNPNA5x0eeb7OGer44g+iBYipVxJvonEPgJt4goW/u/UnupZGUA6l3YZ68rKuZAk91qVkrlUIX42Vj2F+KV8fmVK5HScMxDdpPOR/j/MJXaqeDtDZLHHi87l0YzABHbUQ6wIbJx/5JBJoT/OU6uCY2hlsZKGbsZr83MVSiU4CDjFVes1eWOMNaQHn3TLBquUb/7KEuPm9im8buFZYNQoh+cZ3121QRbTFTlW8cmp05qpeC1XswWNInfDCHykp7qS0eZuBJK2y6n3EssTXgWkn4ZthP6PwMCQBCaHfarmvlu/HamGUuSavVQ== 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=USB+lSpy2eOPaUuF6/uJOxkKawNSv+LnwHMP66a8afI=; b=AG6NDL0ahHZUNC7ueWIBPuQTqvIeQODNvMJGHo52x/PMnFsSGy9u79S6liSiFy1TJ8/X+Ub3OfRV0vwbhk8n44c9q69Z5567KPB+XuplSt7MemDMQ3Pr7fCiY8zVOgvMdFGb8quvdi93eMolTSO0ZRJqxYTQaGHQoX+k/K3XZSM= 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 DU0PR08MB9679.eurprd08.prod.outlook.com (2603:10a6:10:445::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.28; Mon, 6 Nov 2023 10:20:05 +0000 Received: from VI1PR08MB5325.eurprd08.prod.outlook.com ([fe80::26aa:efdd:a74a:27d0]) by VI1PR08MB5325.eurprd08.prod.outlook.com ([fe80::26aa:efdd:a74a:27d0%5]) with mapi id 15.20.6954.028; Mon, 6 Nov 2023 10:20:05 +0000 Date: Mon, 6 Nov 2023 10:20:01 +0000 From: Tamar Christina To: gcc-patches@gcc.gnu.org Cc: nd@arm.com, rguenther@suse.de, jlaw@ventanamicro.com Subject: [PATCH v3 1/2]middle-end: expand copysign handling from lockstep to nested iters Message-ID: Content-Disposition: inline X-ClientProxiedBy: LO4P265CA0075.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:2bd::16) To VI1PR08MB5325.eurprd08.prod.outlook.com (2603:10a6:803:13e::17) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: VI1PR08MB5325:EE_|DU0PR08MB9679:EE_|AMS0EPF000001AC:EE_|DB9PR08MB8358:EE_ X-MS-Office365-Filtering-Correlation-Id: b51b6dc5-f918-46e7-8738-08dbdeb1f8e6 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: o8ruevTH0oqSx/1dEbknpk9I50S5zgcuj5DjqXiLKQTzogNMrObON4vutYO1rkwPdT+ZLNbSP5lMjyjHJhTFvdVnHTxqpGewIFE+I68I69a2P38Ea1Thw5BRcprdtVXBMbqtIcnOXG5MQo69azX0/09n8kZl+gbvaY8LuDOEgi5fmD1W36ucccVrwJ8oO2NWEijzKli2f8Qc1DcK2U5ntF4Ri/GPysD7tz6HJoVpVIV8dwrM3KkB1qGFE/UTUsdMYgOT6d/hWUjc0ZyI4CCL908vDtPHt4hYxGFFE2YmOaPISRlzPpA/PTXKS2QkLEbAoz6pR6vK/72UpTvQ0iZDKf7bAdbSZ/AOJdGzD3U0xjB8fQCKzWlTaqY0dGdzkKv8tspK/EURA65fD3nzz5dkYPWIKvXIApCIaF+hmDvN+GgDS4Rto86d1fAuj7e+uCjExiEW7bXZvyJov65Z8lzl7jY7h8ZtY3nGcIEyeOQhcIVUbwoR7YvGB4OjeIGN2rMYIhkLra7ytgoJ2hh+vUKqSbYudYuzpgoW3MhAyAB7F/akkqFIEIWwcfPyghcVfgqWE3tlekLQ1xcWSSNPmdSed4LT3Qyneh8eLNZl85yXVQt14K3Qvcdrff/kNuvagGP5UWC+L2l6oH64QBvpudWuRA== 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)(136003)(366004)(396003)(376002)(346002)(39860400002)(230922051799003)(64100799003)(1800799009)(451199024)(186009)(83380400001)(36756003)(4326008)(8936002)(44832011)(86362001)(41300700001)(2906002)(8676002)(478600001)(6666004)(33964004)(44144004)(6486002)(6506007)(38100700002)(316002)(6916009)(5660300002)(235185007)(66476007)(66556008)(6512007)(26005)(2616005)(66946007)(4216001)(2700100001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB9679 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: AMS0EPF000001AC.eurprd05.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 21612f24-2042-48e7-6b58-08dbdeb1f0e5 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +QAF7p9GSpLVTDIZQyCB+MdN5SkLC60BKRqUsssT30Bp9IATKD/YhWcMVw4QEgmbWxjWWL4wmbRsMa4PbPEKugLoSBJnNepIHG6PgSZqNZ2/QyEQCD9ejDuUCxn7BAZoiLHk/ZVwN2l2nChd30JVMMlIttev6RbnO4slvr5t4yBm+w8/eHuNKdU1semgO89cb19QB5aScKdUxYOzyF0axT5qSH+VdFF3Ru8G5eH6ItttprPpu+S4csVN2t07oObkSi9Es4KBz8DPK8yYMkYy0cejSLJneag4/1SkRnbt9KO2c7oI50o0izRFBEOkeQhwhjhf85VPZuuJHx2is3QlPNToBA2blTW9bNAYbH0M9AjymTaEWpaab59BIfdGR0F8it0xV3vel6neym4ZOT+obCZL6NChc6VCS4NNLDgjrQvjEFRF29PCV3XCYtddPwFSzM87WD74O4aPdh52Z4yvMOovMS5sRG7ZzZ93ew0b8Go+p7cdGo2Dvosex/Jd4YOndW37iMaiFLoGqqPuFP7XKJaqohzPLiamCnm1T+zqGcGryUb9IMYWoCspNy7U2w+eADrJj6pEk3tMcu1Dycj0grtruXoEvhHLM3u7S+EgQ3OB8pTrQ2xayR1vHz0k3319oS+NRTzS/snPhe3HlPHvwkqOMg3EZow8kKLw+kvObjEha6UI7EXNQvKew/mxN6vzSoswhpYu6/CVH334JXVmAR/HuZQ/AfgVxr3uMZE2e/XFBtWZtA0x6QZZXFcqwbiq4jGvVLGLvRrWTYzJfOpOJ/rM1kyL/PSDBSt7OaypRss= 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)(346002)(136003)(376002)(39860400002)(396003)(230922051799003)(1800799009)(186009)(82310400011)(64100799003)(451199024)(36840700001)(40470700004)(46966006)(2906002)(36860700001)(8676002)(41300700001)(6916009)(478600001)(316002)(70586007)(8936002)(70206006)(4326008)(36756003)(356005)(6486002)(47076005)(40480700001)(5660300002)(44832011)(235185007)(86362001)(81166007)(83380400001)(336012)(40460700003)(82740400003)(107886003)(2616005)(6506007)(6666004)(26005)(44144004)(33964004)(6512007)(4216001)(2700100001); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Nov 2023 10:20:16.8867 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b51b6dc5-f918-46e7-8738-08dbdeb1f8e6 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: AMS0EPF000001AC.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB8358 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: 1781809598361473276 X-GMAIL-MSGID: 1781809598361473276 Hi All, various optimizations in match.pd only happened on COPYSIGN in lock step which means they exclude IFN_COPYSIGN. COPYSIGN however is restricted to only the C99 builtins and so doesn't work for vectors. The patch expands these optimizations to work as nested iters. This is needed for the second patch which will add the testcase. Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. Ok for master? Thanks, Tamar gcc/ChangeLog: PR tree-optimization/109154 * match.pd: expand existing copysign optimizations. --- inline copy of patch -- diff --git a/gcc/match.pd b/gcc/match.pd index 7d651a6582d169793cca4f9a70e334dd80014d92..db95931df0672cf4ef08cca36085c3aa6831519e 100644 --- diff --git a/gcc/match.pd b/gcc/match.pd index 7d651a6582d169793cca4f9a70e334dd80014d92..db95931df0672cf4ef08cca36085c3aa6831519e 100644 --- a/gcc/match.pd +++ b/gcc/match.pd @@ -1074,37 +1074,37 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) /* cos(copysign(x, y)) -> cos(x). Similarly for cosh. */ (for coss (COS COSH) - copysigns (COPYSIGN) - (simplify - (coss (copysigns @0 @1)) - (coss @0))) + (for copysigns (COPYSIGN) + (simplify + (coss (copysigns @0 @1)) + (coss @0)))) /* pow(copysign(x, y), z) -> pow(x, z) if z is an even integer. */ (for pows (POW) - copysigns (COPYSIGN) - (simplify - (pows (copysigns @0 @2) REAL_CST@1) - (with { HOST_WIDE_INT n; } - (if (real_isinteger (&TREE_REAL_CST (@1), &n) && (n & 1) == 0) - (pows @0 @1))))) + (for copysigns (COPYSIGN) + (simplify + (pows (copysigns @0 @2) REAL_CST@1) + (with { HOST_WIDE_INT n; } + (if (real_isinteger (&TREE_REAL_CST (@1), &n) && (n & 1) == 0) + (pows @0 @1)))))) /* Likewise for powi. */ (for pows (POWI) - copysigns (COPYSIGN) - (simplify - (pows (copysigns @0 @2) INTEGER_CST@1) - (if ((wi::to_wide (@1) & 1) == 0) - (pows @0 @1)))) + (for copysigns (COPYSIGN) + (simplify + (pows (copysigns @0 @2) INTEGER_CST@1) + (if ((wi::to_wide (@1) & 1) == 0) + (pows @0 @1))))) (for hypots (HYPOT) - copysigns (COPYSIGN) - /* hypot(copysign(x, y), z) -> hypot(x, z). */ - (simplify - (hypots (copysigns @0 @1) @2) - (hypots @0 @2)) - /* hypot(x, copysign(y, z)) -> hypot(x, y). */ - (simplify - (hypots @0 (copysigns @1 @2)) - (hypots @0 @1))) + (for copysigns (COPYSIGN) + /* hypot(copysign(x, y), z) -> hypot(x, z). */ + (simplify + (hypots (copysigns @0 @1) @2) + (hypots @0 @2)) + /* hypot(x, copysign(y, z)) -> hypot(x, y). */ + (simplify + (hypots @0 (copysigns @1 @2)) + (hypots @0 @1)))) /* copysign(x, CST) -> [-]abs (x). */ (for copysigns (COPYSIGN_ALL) --- a/gcc/match.pd +++ b/gcc/match.pd @@ -1074,37 +1074,37 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) /* cos(copysign(x, y)) -> cos(x). Similarly for cosh. */ (for coss (COS COSH) - copysigns (COPYSIGN) - (simplify - (coss (copysigns @0 @1)) - (coss @0))) + (for copysigns (COPYSIGN) + (simplify + (coss (copysigns @0 @1)) + (coss @0)))) /* pow(copysign(x, y), z) -> pow(x, z) if z is an even integer. */ (for pows (POW) - copysigns (COPYSIGN) - (simplify - (pows (copysigns @0 @2) REAL_CST@1) - (with { HOST_WIDE_INT n; } - (if (real_isinteger (&TREE_REAL_CST (@1), &n) && (n & 1) == 0) - (pows @0 @1))))) + (for copysigns (COPYSIGN) + (simplify + (pows (copysigns @0 @2) REAL_CST@1) + (with { HOST_WIDE_INT n; } + (if (real_isinteger (&TREE_REAL_CST (@1), &n) && (n & 1) == 0) + (pows @0 @1)))))) /* Likewise for powi. */ (for pows (POWI) - copysigns (COPYSIGN) - (simplify - (pows (copysigns @0 @2) INTEGER_CST@1) - (if ((wi::to_wide (@1) & 1) == 0) - (pows @0 @1)))) + (for copysigns (COPYSIGN) + (simplify + (pows (copysigns @0 @2) INTEGER_CST@1) + (if ((wi::to_wide (@1) & 1) == 0) + (pows @0 @1))))) (for hypots (HYPOT) - copysigns (COPYSIGN) - /* hypot(copysign(x, y), z) -> hypot(x, z). */ - (simplify - (hypots (copysigns @0 @1) @2) - (hypots @0 @2)) - /* hypot(x, copysign(y, z)) -> hypot(x, y). */ - (simplify - (hypots @0 (copysigns @1 @2)) - (hypots @0 @1))) + (for copysigns (COPYSIGN) + /* hypot(copysign(x, y), z) -> hypot(x, z). */ + (simplify + (hypots (copysigns @0 @1) @2) + (hypots @0 @2)) + /* hypot(x, copysign(y, z)) -> hypot(x, y). */ + (simplify + (hypots @0 (copysigns @1 @2)) + (hypots @0 @1)))) /* copysign(x, CST) -> [-]abs (x). */ (for copysigns (COPYSIGN_ALL)