From patchwork Tue Aug 20 13:06:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tamar Christina X-Patchwork-Id: 1974407 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=NasLGy4A; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=NasLGy4A; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Wp8rq2kM0z1yXZ for ; Tue, 20 Aug 2024 23:07:39 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3C7BE386D60B for ; Tue, 20 Aug 2024 13:07:37 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on20607.outbound.protection.outlook.com [IPv6:2a01:111:f403:260d::607]) by sourceware.org (Postfix) with ESMTPS id 16F0F3845140 for ; Tue, 20 Aug 2024 13:07:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 16F0F3845140 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 16F0F3845140 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:260d::607 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1724159231; cv=pass; b=FHmnRGZltIoVSrpAItKwoQCpJDo2j+flTV5OUVLt+5r5BtQF/ZNPqFtj9gRMs5fuyNxibMEwWsxGWxGiNctb/e18W7tKa+Wf86vj70tdBNKO5n5bJJPw0voH3C6Bji4hrnKY1AdfJ6Q5KemkSGYOrGNVS/MxpIea28UwLH8RFdI= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1724159231; c=relaxed/simple; bh=Izfcy3HxyoTW01/am+uOLhcZFnFP2xKmN8iYSc69v84=; h=DKIM-Signature:DKIM-Signature:Date:From:To:Subject:Message-ID: MIME-Version; b=LlVqDhWa8pCLtO010++s00dqkiZsC22BEGGN6mLZY4TFJBxQeo9SnQyc0siq25k7fQHcTOnW1AxIxheA6l9cYAd1W58/OclpcyW4ddcG2FXkvwFYV5gbf6XZFczRYrVitsVoCudeWuN+XKg+wV3IpEjyAkLdHZR0Y2t79YVfU+Y= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=MDycce5tugM6erBvhT4qmEnX8EhrLphU0MQ1hQejsnTuA2Cmb4jAoiA2YN8JPsDxts5cqWRSH2mOD7yck0t378rr/ZlxU0mFA8rZ/bUakzrhOF2Hy5M+4on1euv22u1lXH+O82Z1gvrxUt/kPaMEhX2tTai5y00YpMbaexBhVxep8bSfu5HgXilMvhNMeIOGWWMYFoO/rEa+GYOHsL5j/Moy2tiY3bY/A9q14KtS9UkTaaE1zdBWndr3IBdlDSLWDIBRUAf7kJtzGeA2BpY+VjCnLhOozi2HCjbLzu6gIupqcydW4JTWcmSFkEyl/wz0uqEYvNZGs6JNw82tft5h7g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=xLb1RFAdNRQNAa+yKdDQkj441D4TvxvZRS//dBDN7hM=; b=VjLa17vQQMm8EDM59emG8ue4C2FSoJTjJA1MjAWF3jdhM6+drMaE4tmpfVfZExO4h0SpAO1OloeBtIMnlB3FusVtofV69DwvNg8E0esEqsmScOebWB1cdQuMlNpBYKxDyPJiccke4GgRZuaNA5Dz05hYyYe+jKuanvZAyX0tqUzotvbOFNDvEEzgd0S+OMVa+RwneFzTBp/xHYz0WIZawqMHYNoQX3vm5QTQVNkMEzUheGpDOEpZKFoAN32mA35ioXiHoPvKtPKCAZ6xm5oqEsZxGMAn+zZsm+eT/cM4wgbM5dVgjsfVZlZGLoLOZIIjZ6NyUb58NoZheSyuCy5lGQ== 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=arm.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=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xLb1RFAdNRQNAa+yKdDQkj441D4TvxvZRS//dBDN7hM=; b=NasLGy4AVlApv298ONFk2MFzqFJ6zc7jW9Ve07BoehVpA4LWyanvlNB4nHeOxVCIOhl/CcVcUhCxQSXpdclpWp8ZZq20JcHwfofYTN+Z5DlD/c151gOGoIpJjJta27v42qPqtzcWTbta1kYTtaQ3BiF/GhIOMvGK3teUPH02hKc= Received: from AS8P189CA0038.EURP189.PROD.OUTLOOK.COM (2603:10a6:20b:458::13) by AS8PR08MB8466.eurprd08.prod.outlook.com (2603:10a6:20b:568::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.12; Tue, 20 Aug 2024 13:06:15 +0000 Received: from AMS0EPF000001B4.eurprd05.prod.outlook.com (2603:10a6:20b:458:cafe::b1) by AS8P189CA0038.outlook.office365.com (2603:10a6:20b:458::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.25 via Frontend Transport; Tue, 20 Aug 2024 13:06:15 +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=arm.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 AMS0EPF000001B4.mail.protection.outlook.com (10.167.16.168) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.7897.11 via Frontend Transport; Tue, 20 Aug 2024 13:06:15 +0000 Received: ("Tessian outbound f2759ff2c19a:v403"); Tue, 20 Aug 2024 13:06:15 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 4bed3ec0878380bf X-CR-MTA-TID: 64aa7808 Received: from Lafc01e25976a.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 4DBF2D3B-4375-4636-89F4-0BBBEB424AEF.1; Tue, 20 Aug 2024 13:06:08 +0000 Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id Lafc01e25976a.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 20 Aug 2024 13:06:08 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=YwqGGY5EWpIZukvbvRxuFrJ34vt/WWgDLHwJgVrD6ffuPY7onhQAIDQLF6PMVNzyNxYywudwLQjsGZVUHq/wj6Q6tQ1EigJdgn/EqCBwncVLovPhupEcaaPZDLvW9kpXO4yvxs2oLZiZ+eqeY/pNYvoKb8N8FC0dIdIMQfttfhiWC7o+VAgHy0embbgbD+WBvy6HmPQM71HPT3GABQG7Z7IRf3sWx2utahDPboWeZbg8Mqve4ZJPvFSTKfvK1CwTZP7gBgFZRUIxjZXbkxd1K9JlYzIfEciiH2w+DJ/r6UaqusqcvVenpFnYvm6ImXDCYeRu/vuSKVMprLxB92Lv8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=xLb1RFAdNRQNAa+yKdDQkj441D4TvxvZRS//dBDN7hM=; b=kK1r/ZB4deYMqkVEO1HDhIx4CMBdHG+L3VAw6RHe3m6F1nYc4yGf9mffj29nl8fm8qhcHvZ6SWs0VPSVGYuPvRfx8yaS2T6NGvCuXTj8F/+ROfAjd+8+6WqAyZGMa21s57heLjncV8ZaQ89Jwc/Y25BF47TK+tmLBgFPvRYI0LqstCauQaKkiKeICdN4LrIijoKSfuXBY2HZKfU4IquWQ7A25A2WuA2hXBPRJtLyy8rQpR2O2yCjwKxmIkYxm6OG+0oaWz5lztiODKo71dy3USjJtF0BKxmtntvlL8QaIntdAdten9vaIzSt9iKvPzLv5s2jlc69is6WZcGrBFbsXA== 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=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xLb1RFAdNRQNAa+yKdDQkj441D4TvxvZRS//dBDN7hM=; b=NasLGy4AVlApv298ONFk2MFzqFJ6zc7jW9Ve07BoehVpA4LWyanvlNB4nHeOxVCIOhl/CcVcUhCxQSXpdclpWp8ZZq20JcHwfofYTN+Z5DlD/c151gOGoIpJjJta27v42qPqtzcWTbta1kYTtaQ3BiF/GhIOMvGK3teUPH02hKc= 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 AS8PR08MB8779.eurprd08.prod.outlook.com (2603:10a6:20b:5be::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.13; Tue, 20 Aug 2024 13:06:06 +0000 Received: from VI1PR08MB5325.eurprd08.prod.outlook.com ([fe80::89dc:c731:362b:7c69]) by VI1PR08MB5325.eurprd08.prod.outlook.com ([fe80::89dc:c731:362b:7c69%6]) with mapi id 15.20.7897.010; Tue, 20 Aug 2024 13:06:06 +0000 Date: Tue, 20 Aug 2024 14:06:04 +0100 From: Tamar Christina To: gcc-patches@gcc.gnu.org Cc: nd@arm.com, rguenther@suse.de, jlaw@ventanamicro.com Subject: [PATCH 1/2]middle-end: refactor type to be explicit in operand_equal_p [PR114932] Message-ID: Content-Disposition: inline X-ClientProxiedBy: LO4P123CA0092.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:191::7) To VI1PR08MB5325.eurprd08.prod.outlook.com (2603:10a6:803:13e::17) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: VI1PR08MB5325:EE_|AS8PR08MB8779:EE_|AMS0EPF000001B4:EE_|AS8PR08MB8466:EE_ X-MS-Office365-Filtering-Correlation-Id: 8df05cc4-b6a6-45d9-eceb-08dcc118dfa5 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|366016|1800799024|376014; X-Microsoft-Antispam-Message-Info-Original: bapsUH6m8TXGJ6h+M/FyKSjr8tAGZ8hd/lPpYHA8IVjHkdJIAX07t+4GgPxIRw4xTQSgI7YdK5H2yOgfHU2fUSIn4ys5AhhlJCPansA6CBeUnzYEQsKIstO1KvFujUI1IchaJR6Fi/juv9wE+OpGE6GRNAFPPM0gdUNezvFUPG0hBLjiwf3x2GpdY1ipCrgCTfquqOLPGAmwKgbQs2wiJ3oxZLTq/MmF0uDXZz0/QdMRi4bnzIhxbWqMsVT+aQZh5JX3fe1fjsHhHFSn6HfDiYVGk58Hj1Z6gNSjBQTyK23Y++NcH3jD1VWR8Cc3MHUItx3+BEF1iGgOKgDCyrQSqr1IgSG9ki7xczWyF82hmHB09eS8IY5tHGotVmPfCv39cr1aFWQ3hPk4P2WhxqFeEnsaXpaR2C4xmlrj6wtnQDdKAelO95r5yt1yySJJNFy/9RZZUyVeRB0hWtVLd+OLhdbgRxfDG1X8koNyuv8qEK+aHr766TeBcUFyCcryr2VRMS3btuIFSO+UNS5Qk928Y2LLLZHBRBD+eTyjVP4sODH3LkqqujtA2r65g+clXbMQYuSrmQNlvEErn2IzadvkxZwLtZ6qgO6O0DEIYSbt8H97mIfpisvjyyo89K5fCHmPxA7ORo7/cBC4p8wE/vkDjEeWIHuGaZvsOChfy2epyZZO9ZkKMuJcaq7zJYwyZ1ekmpW8lFwYAo3Fw0jAZ7OBppyX39x/chyboT1ROSq5mBuH8+BrS3as0ShRwtLC8AG1Ago7MkUefW0i9lzt2yPXYdRiU2de7e9B7B8lMN65dhlWFkkNLzkMQK0/rEm2HPUBE0nJFcRuonC65k40W1JEQitWdBr6VgtBeEw4tbj4uhDvGscNfeMuONt/r/WTmT0jFKTjteXPXeQ7Ik8oL/SjUUR8JJbpwMXqWjRA8JcZ9t9kquOdXeMSQHaZhXe5md3IK61P2k4pGiZ0+gyZREnIylDM2rlrqs7f8bG0hMxV9AADsYOO1xR07LFNq2tWWHPAhg+PFtWxhlFXv0Mz4NLrVnZKLRGFiQ+YqbabKXR/vPJgeq//ZJ9QBfWjMFgb1JPsKI1jQ0pDSGKhX7tDYu3JBa1SWwsVuiWSgN20MMJwyo5xrJlTpxluuttJ2QewGrhyURPkn8IeuB4ba2oxlZcKubkSr1jzfpUwIK2eoMZBWM2xuqyugxHB3FSdoNuctNW8Liy9QPHcw/MVyxtTmI6mP2VekEghGzspfgLT1ClYYAywJCrBzpwZRutVNLaqZcGHQxYODXiNEWEcHllWAx5AtJdMH527XbPRosTImRH70EzZE5AJuXzYiaYqSHZRd2HCu7CRByQSuuFOwJVt6qjPwg== 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:(13230040)(366016)(1800799024)(376014); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB8779 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-SkipListedInternetSender: ip=[2603:10a6:803:13e::17]; domain=VI1PR08MB5325.eurprd08.prod.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: AMS0EPF000001B4.eurprd05.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 5f498df7-479f-4ddb-6ac3-08dcc118da17 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|1800799024|35042699022|36860700013|82310400026; X-Microsoft-Antispam-Message-Info: =?utf-8?q?REUOfdwwKsl4Q5Ln/L5hUrmrRUpVaiz?= =?utf-8?q?mKrqJqs6Ww21qEu3BxApaY6JYn44XBnXoZSFHO61dEwLdziMcWJe/mwRJ1NIqKbvw?= =?utf-8?q?uwWQ0sLVn+7BKh3CFUSM04AZoQn7FU1px/z8nH7DIkUdJbAnQ+PYU5TSmolh904Xz?= =?utf-8?q?GRRKHexS4c7f+70y2wKjzKaT0uBegvCnoQHEmxvou9jccSVL1wqcuFAPY03+Fjmn+?= =?utf-8?q?Giv/wX6RHzO2XbbjZcKoIvgoPsmIqOTpPwY08fbXGvHjFk5HhINtYGTElNpaF91y/?= =?utf-8?q?XNcfMlr64K0q25QBLuf+lughfC3JkHmUH1FXuZTAeCywAGHJQEmv+6jf4xlp8+Iyf?= =?utf-8?q?BkwetrlwCxht6m19k1zl5IUeP6L+VpLNTy+Pw5qF9/V51xOPKHLWMUPCE932jHKRl?= =?utf-8?q?4Ef0d9J35x0Tax5YLbHjDsnm6xCnR25szPPsqy/NuNm0yX1x7VNuAZx4Gri8c0dfz?= =?utf-8?q?JTOWjGp/o/fo1KJXkJ696Vmssn74A8aq5vqeVeHv6zdatugy2R3bkwZqUH34UA6zW?= =?utf-8?q?3jLbgvuxuEOZmW+F1fcIZIo9RBHozanv/bdNvEymFDpebrt7gVZPBovMEkrESnb8V?= =?utf-8?q?WAnGum/49rqsMN0oXevfLhMZICsTn5WOMF/Eym9JrnFnv9t8xGcIyoINdNnBDsO7C?= =?utf-8?q?4ewBtnq4xet8zKbJIB6gNu2uP7qazpR/b1+SYR9wGcTEW96NzUatYYVmzEW/c+MjO?= =?utf-8?q?eoSh/WC7XBdmbjlCj3tOA/ycYWfqP9IjHwBEOUudfpws6uZz/f6nB0x4nPb8xx91q?= =?utf-8?q?2Bi4pUk14AeUwIC7fAKKTZJyE1gF9aAPZj6lXuTXscPbQMatiRkw/gO48G4/YsRwv?= =?utf-8?q?kP9a3oxpGXKW64+2hCcRNy+qeFjA2nNHCNN8iTzq6EwHoOBkBLjYkw4XXeeiZAPLO?= =?utf-8?q?Vog2LCLYkenZr7xgSPC+iS+nHlw3RpIZYLFEgRVMklExcM2Xy6cvJ4tiExUl3+Uu/?= =?utf-8?q?CHqieosCR2465/JOXcqxl71wU2m3MYQynTJFpu2v0KHVH/Z9qU+1o+m2fZEoGieUz?= =?utf-8?q?K/fRf0Gzge+4ZCh953v9lHm4kqCz22br8p6KgJUjda/pAZ1HMGOBbngLOh4b9pMJ8?= =?utf-8?q?PH5NtwWELtChkgvhGxiyhKribg6I4qLI6/PfAO1+vuedfwGEOFXYi7H71kRFeLYoK?= =?utf-8?q?Aa4REhXF/bMgEGTny0gNUPLye35blBX9y+MFxOJbjFxvgD4hYtDAb722PkJ9989RF?= =?utf-8?q?v7pVFfCz8G2+baedP8Qjdh8l9caNglVIcmsvtpF2M7EUduw4j642jpFyZQdrENYss?= =?utf-8?q?SiJwU+nWZkjjY8nHLnpoQ8P4CYF2pHQX2ABAYA7la/dyyQ8Jf871j8lxIVrV4+jin?= =?utf-8?q?vmtc3V4xwprIr/FdkgiPmRlVzRFLr+iwbpy2N93Jcd2wvDTENrYI3rfp715fKATpa?= =?utf-8?q?ReLgTVOV/UD?= 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:(13230040)(376014)(1800799024)(35042699022)(36860700013)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Aug 2024 13:06:15.4711 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8df05cc4-b6a6-45d9-eceb-08dcc118dfa5 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: AMS0EPF000001B4.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB8466 X-Spam-Status: No, score=-12.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_LOTSOFHASH, SPF_HELO_NONE, 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~incoming=patchwork.ozlabs.org@gcc.gnu.org Hi All, This is a refactoring with no expected behavioral change. The goal with this is to make the type of the expressions being used explicit. I did not change all the recursive calls to operand_equal_p () to recurse directly to the new function but instead this goes through the top level call which re-extracts the types. This was done because in most of the cases where we recurse type == arg. The second patch makes use of this new flexibility to implement an overload of operand_equal_p which checks for equality under two's complement. Bootstrapped Regtested on aarch64-none-linux-gnu, arm-none-linux-gnueabihf, x86_64-pc-linux-gnu -m32, -m64 and no issues. Ok for master? Thanks, Tamar gcc/ChangeLog: PR tree-optimization/114932 * fold-const.cc (operand_compare::operand_equal_p): Split into one that takes explicit type parameters and use that in public one. * fold-const.h (class operand_compare): Add operand_equal_p private overload. --- -- diff --git a/gcc/fold-const.h b/gcc/fold-const.h index b82ef137e2f2096f86c20df3c7749747e604177e..878545b1148b839e8a8e866f38e31161f0d116c8 100644 --- a/gcc/fold-const.h +++ b/gcc/fold-const.h @@ -273,6 +273,12 @@ protected: true is returned. Then RET is set to corresponding comparsion result. */ bool verify_hash_value (const_tree arg0, const_tree arg1, unsigned int flags, bool *ret); + +private: + /* Return true if two operands are equal. The flags fields can be used + to specify OEP flags described in tree-core.h. */ + bool operand_equal_p (tree, const_tree, tree, const_tree, + unsigned int flags); }; #endif // GCC_FOLD_CONST_H diff --git a/gcc/fold-const.cc b/gcc/fold-const.cc index 8908e7381e72cbbf4a8fd96f18cbf4436aba8441..71e82b1d76d4106c7c23c54af8b35905a1af9f1c 100644 --- a/gcc/fold-const.cc +++ b/gcc/fold-const.cc @@ -3156,6 +3156,17 @@ combine_comparisons (location_t loc, bool operand_compare::operand_equal_p (const_tree arg0, const_tree arg1, unsigned int flags) +{ + return operand_equal_p (TREE_TYPE (arg0), arg0, TREE_TYPE (arg1), arg1, flags); +} + +/* The same as operand_equal_p however the type of ARG0 and ARG1 are assumed to be + the TYPE0 and TYPE1 respectively. */ + +bool +operand_compare::operand_equal_p (tree type0, const_tree arg0, + tree type1, const_tree arg1, + unsigned int flags) { bool r; if (verify_hash_value (arg0, arg1, flags, &r)) @@ -3166,25 +3177,25 @@ operand_compare::operand_equal_p (const_tree arg0, const_tree arg1, /* If either is ERROR_MARK, they aren't equal. */ if (TREE_CODE (arg0) == ERROR_MARK || TREE_CODE (arg1) == ERROR_MARK - || TREE_TYPE (arg0) == error_mark_node - || TREE_TYPE (arg1) == error_mark_node) + || type0 == error_mark_node + || type1 == error_mark_node) return false; /* Similar, if either does not have a type (like a template id), they aren't equal. */ - if (!TREE_TYPE (arg0) || !TREE_TYPE (arg1)) + if (!type0 || !type1) return false; /* Bitwise identity makes no sense if the values have different layouts. */ if ((flags & OEP_BITWISE) - && !tree_nop_conversion_p (TREE_TYPE (arg0), TREE_TYPE (arg1))) + && !tree_nop_conversion_p (type0, type1)) return false; /* We cannot consider pointers to different address space equal. */ - if (POINTER_TYPE_P (TREE_TYPE (arg0)) - && POINTER_TYPE_P (TREE_TYPE (arg1)) - && (TYPE_ADDR_SPACE (TREE_TYPE (TREE_TYPE (arg0))) - != TYPE_ADDR_SPACE (TREE_TYPE (TREE_TYPE (arg1))))) + if (POINTER_TYPE_P (type0) + && POINTER_TYPE_P (type1) + && (TYPE_ADDR_SPACE (TREE_TYPE (type0)) + != TYPE_ADDR_SPACE (TREE_TYPE (type1)))) return false; /* Check equality of integer constants before bailing out due to @@ -3211,12 +3222,15 @@ operand_compare::operand_equal_p (const_tree arg0, const_tree arg1, /* If both types don't have the same precision, then it is not safe to strip NOPs. */ - if (element_precision (TREE_TYPE (arg0)) - != element_precision (TREE_TYPE (arg1))) + if (element_precision (type0) + != element_precision (type1)) return false; STRIP_NOPS (arg0); STRIP_NOPS (arg1); + + type0 = TREE_TYPE (arg0); + type1 = TREE_TYPE (arg1); } #if 0 /* FIXME: Fortran FE currently produce ADDR_EXPR of NOP_EXPR. Enable the @@ -3275,9 +3289,9 @@ operand_compare::operand_equal_p (const_tree arg0, const_tree arg1, /* When not checking adddresses, this is needed for conversions and for COMPONENT_REF. Might as well play it safe and always test this. */ - if (TREE_CODE (TREE_TYPE (arg0)) == ERROR_MARK - || TREE_CODE (TREE_TYPE (arg1)) == ERROR_MARK - || (TYPE_MODE (TREE_TYPE (arg0)) != TYPE_MODE (TREE_TYPE (arg1)) + if (TREE_CODE (type0) == ERROR_MARK + || TREE_CODE (type1) == ERROR_MARK + || (TYPE_MODE (type0) != TYPE_MODE (type1) && !(flags & OEP_ADDRESS_OF))) return false; @@ -3364,8 +3378,8 @@ operand_compare::operand_equal_p (const_tree arg0, const_tree arg1, return true; /* See sem_variable::equals in ipa-icf for a similar approach. */ - tree typ0 = TREE_TYPE (arg0); - tree typ1 = TREE_TYPE (arg1); + tree typ0 = type0; + tree typ1 = type1; if (TREE_CODE (typ0) != TREE_CODE (typ1)) return false; @@ -3444,8 +3458,8 @@ operand_compare::operand_equal_p (const_tree arg0, const_tree arg1, { CASE_CONVERT: case FIX_TRUNC_EXPR: - if (TYPE_UNSIGNED (TREE_TYPE (arg0)) - != TYPE_UNSIGNED (TREE_TYPE (arg1))) + if (TYPE_UNSIGNED (type0) + != TYPE_UNSIGNED (type1)) return false; break; default: @@ -3481,12 +3495,12 @@ operand_compare::operand_equal_p (const_tree arg0, const_tree arg1, case INDIRECT_REF: if (!(flags & OEP_ADDRESS_OF)) { - if (TYPE_ALIGN (TREE_TYPE (arg0)) - != TYPE_ALIGN (TREE_TYPE (arg1))) + if (TYPE_ALIGN (type0) + != TYPE_ALIGN (type1)) return false; /* Verify that the access types are compatible. */ - if (TYPE_MAIN_VARIANT (TREE_TYPE (arg0)) - != TYPE_MAIN_VARIANT (TREE_TYPE (arg1))) + if (TYPE_MAIN_VARIANT (type0) + != TYPE_MAIN_VARIANT (type1)) return false; } flags &= ~OEP_ADDRESS_OF; @@ -3494,8 +3508,8 @@ operand_compare::operand_equal_p (const_tree arg0, const_tree arg1, case IMAGPART_EXPR: /* Require the same offset. */ - if (!operand_equal_p (TYPE_SIZE (TREE_TYPE (arg0)), - TYPE_SIZE (TREE_TYPE (arg1)), + if (!operand_equal_p (TYPE_SIZE (type0), + TYPE_SIZE (type1), flags & ~OEP_ADDRESS_OF)) return false; @@ -3509,15 +3523,15 @@ operand_compare::operand_equal_p (const_tree arg0, const_tree arg1, if (!(flags & OEP_ADDRESS_OF)) { /* Require equal access sizes */ - if (TYPE_SIZE (TREE_TYPE (arg0)) != TYPE_SIZE (TREE_TYPE (arg1)) - && (!TYPE_SIZE (TREE_TYPE (arg0)) - || !TYPE_SIZE (TREE_TYPE (arg1)) - || !operand_equal_p (TYPE_SIZE (TREE_TYPE (arg0)), - TYPE_SIZE (TREE_TYPE (arg1)), + if (TYPE_SIZE (type0) != TYPE_SIZE (type1) + && (!TYPE_SIZE (type0) + || !TYPE_SIZE (type1) + || !operand_equal_p (TYPE_SIZE (type0), + TYPE_SIZE (type1), flags))) return false; /* Verify that access happens in similar types. */ - if (!types_compatible_p (TREE_TYPE (arg0), TREE_TYPE (arg1))) + if (!types_compatible_p (type0, type1)) return false; /* Verify that accesses are TBAA compatible. */ if (!alias_ptr_types_compatible_p @@ -3529,8 +3543,8 @@ operand_compare::operand_equal_p (const_tree arg0, const_tree arg1, != MR_DEPENDENCE_BASE (arg1))) return false; /* Verify that alignment is compatible. */ - if (TYPE_ALIGN (TREE_TYPE (arg0)) - != TYPE_ALIGN (TREE_TYPE (arg1))) + if (TYPE_ALIGN (type0) + != TYPE_ALIGN (type1)) return false; } flags &= ~OEP_ADDRESS_OF; @@ -3802,16 +3816,16 @@ operand_compare::operand_equal_p (const_tree arg0, const_tree arg1, indexed in increasing order and form an initial sequence. We make no effort to compare nonconstant ones in GENERIC. */ - if (!VECTOR_TYPE_P (TREE_TYPE (arg0)) - || !VECTOR_TYPE_P (TREE_TYPE (arg1))) + if (!VECTOR_TYPE_P (type0) + || !VECTOR_TYPE_P (type1)) return false; /* Be sure that vectors constructed have the same representation. We only tested element precision and modes to match. Vectors may be BLKmode and thus also check that the number of parts match. */ - if (maybe_ne (TYPE_VECTOR_SUBPARTS (TREE_TYPE (arg0)), - TYPE_VECTOR_SUBPARTS (TREE_TYPE (arg1)))) + if (maybe_ne (TYPE_VECTOR_SUBPARTS (type0), + TYPE_VECTOR_SUBPARTS (type1))) return false; vec *v0 = CONSTRUCTOR_ELTS (arg0);