From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 37523 invoked by alias); 6 Sep 2019 12:13:50 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 37512 invoked by uid 89); 6 Sep 2019 12:13:50 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-7.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: EUR03-DB5-obe.outbound.protection.outlook.com Received: from mail-eopbgr40069.outbound.protection.outlook.com (HELO EUR03-DB5-obe.outbound.protection.outlook.com) (40.107.4.69) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 06 Sep 2019 12:13:48 +0000 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=z1w6ykc6CaUu0iU0ZPkxp2NOxzJqor9wHgKNBs3ip/c=; b=typw+OSFRJxNjUQg8iviKmKdFG1Ubn4KWgQpzorvkTmJ5UFXRmmw09HRpCFfiKXSiR/EtmT9pSizyv/llDqTlKMHu1vij/cZ6w0n6R/1L35L1sRstK7pkfjxS4+mJYvs0BJxPpkgKc859XfRPI7CvvLEi+aNBt8FDJJDtanfT8E= Received: from DB6PR0801CA0066.eurprd08.prod.outlook.com (2603:10a6:4:2b::34) by HE1PR0801MB1660.eurprd08.prod.outlook.com (2603:10a6:3:89::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2220.20; Fri, 6 Sep 2019 12:13:43 +0000 Received: from VE1EUR03FT033.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e09::208) by DB6PR0801CA0066.outlook.office365.com (2603:10a6:4:2b::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2241.14 via Frontend Transport; Fri, 6 Sep 2019 12:13:42 +0000 Authentication-Results: spf=temperror (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; gcc.gnu.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;gcc.gnu.org; dmarc=temperror action=none header.from=arm.com; Received-SPF: TempError (protection.outlook.com: error in processing during lookup of arm.com: DNS Timeout) Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT033.mail.protection.outlook.com (10.152.18.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2241.14 via Frontend Transport; Fri, 6 Sep 2019 12:13:41 +0000 Received: ("Tessian outbound 108f768cde3d:v27"); Fri, 06 Sep 2019 12:13:41 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 5057403535bc6d1f X-CR-MTA-TID: 64aa7808 Received: from a3dc9e3a8823.1 (cr-mta-lb-1.cr-mta-net [104.47.4.56]) by 64aa7808-outbound-1.mta.getcheckrecipient.com id B93DA1F4-03EA-454C-A22B-BD7C5BBD745D.1; Fri, 06 Sep 2019 12:13:36 +0000 Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-am5eur02lp2056.outbound.protection.outlook.com [104.47.4.56]) by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id a3dc9e3a8823.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 06 Sep 2019 12:13:36 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VhkOoWtadAuGQr+suUDGIsXiD97ii5JS9kKm8i5gluBMyVjSOy4royd9zZWp8zufMmOS13i4e6ffgaxcZx6aaO5If09ExMObKhPCxoUdr47vTx5Kos+PnqY5dsy3HXhH46ACYnHSqFtlguTjR3y9Q8PguGS5E2e16N24uBgKUcKH1a0LowwEk+bKRjX1mP0ByPIxcvZjCDcB3dBaX9SzgyfJe9Ls4m5K9+RB33UFgQoiVHsXECpDE0lKi7tPPuRryWsPAMy7HsvM6wLP6r9V0GnG/Uaa3jnXk9R5jdpEgKXOLD3bB7K9AEaLE3gZJgoSsFgm1OeXljVuMjRCSc4Ynw== 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-SenderADCheck; bh=z1w6ykc6CaUu0iU0ZPkxp2NOxzJqor9wHgKNBs3ip/c=; b=XZgnivNkYUkYMX/9/AsZSFGW+nMYedbF0QSMv+yGpoNlpW+Id+rELpGN2U7RxYbjA6L/0s9N/MFVS6Qm8IREIVkjGk1wI1a8jOXw+zg9/6EW6CVnMaLJlc0ongUba8eeNtqkuMPQD8Gcifk+UP7Kr3E8Kzpu0mJrznn1TF0MMmpcl5QOWtnOYPcGZ0rlzfXRslWQlI+O3F9hbSh9B8vY41zAOyhqtPyhsrOdl5jXa6J+Y8bQHBC2WurJXr6euFvTMaYeS1GSMSDYNj6zNJn9PxoLEj6o4eHawWJjLJ6Yxyn6wBmYMgugnGv7EOsBcJ8D0yM9vJoOzMb6+RJv3zXQEg== 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=z1w6ykc6CaUu0iU0ZPkxp2NOxzJqor9wHgKNBs3ip/c=; b=typw+OSFRJxNjUQg8iviKmKdFG1Ubn4KWgQpzorvkTmJ5UFXRmmw09HRpCFfiKXSiR/EtmT9pSizyv/llDqTlKMHu1vij/cZ6w0n6R/1L35L1sRstK7pkfjxS4+mJYvs0BJxPpkgKc859XfRPI7CvvLEi+aNBt8FDJJDtanfT8E= Received: from VI1PR0801MB2127.eurprd08.prod.outlook.com (10.168.62.22) by VI1PR0801MB1998.eurprd08.prod.outlook.com (10.173.73.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2241.14; Fri, 6 Sep 2019 12:13:34 +0000 Received: from VI1PR0801MB2127.eurprd08.prod.outlook.com ([fe80::7c75:98da:fbc1:da02]) by VI1PR0801MB2127.eurprd08.prod.outlook.com ([fe80::7c75:98da:fbc1:da02%11]) with mapi id 15.20.2241.018; Fri, 6 Sep 2019 12:13:34 +0000 From: Wilco Dijkstra To: Richard Biener , "dmitrij.pochepko@bell-sw.com" , GCC Patches CC: nd Subject: Re: [PATCH] PR tree-optimization/90836 Missing popcount pattern matching Date: Fri, 06 Sep 2019 12:13:00 -0000 Message-ID: Authentication-Results-Original: spf=none (sender IP is ) smtp.mailfrom=Wilco.Dijkstra@arm.com; X-Microsoft-Antispam-Untrusted: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600166)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020);SRVR:VI1PR0801MB1998; x-checkrecipientrouted: true x-ms-oob-tlc-oobclassifiers: OLM:8273;OLM:8273; X-Forefront-Antispam-Report-Untrusted: SFV:NSPM;SFS:(10009020)(4636009)(136003)(39860400002)(366004)(376002)(396003)(346002)(199004)(189003)(54094003)(55016002)(6436002)(110136005)(52536014)(66066001)(256004)(478600001)(5660300002)(7696005)(9686003)(316002)(99286004)(86362001)(2501003)(53936002)(14454004)(33656002)(186003)(66946007)(76116006)(64756008)(66476007)(74316002)(8676002)(66446008)(66556008)(8936002)(6246003)(486006)(2906002)(26005)(476003)(305945005)(3846002)(6116002)(71200400001)(71190400001)(25786009)(229853002)(81166006)(102836004)(6506007)(81156014)(7736002)(4326008);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR0801MB1998;H:VI1PR0801MB2127.eurprd08.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info-Original: 3mQ69P1rf4lqOn4IO/U4Px8XTY16ycCeRrDlxjr7pJcH9w0TYxHhhB7dK1FQrd7//c5liO7sEJMlo7XOsW5TZrERzIgwrLQCwVGAWn5pH13TVwP9jdvfyWK7Ww4MCcg9oy7HG2ZSjRBrMzQhdFkaRZSPMr3utK2S1lSwrcMkD9CS0ZhJywrZQEBfRN3bHjaQIFzs7gzD9ZB8LMUdXP8c55UP839QJhFR/KMIh7sD7iAjNfgShwTEXCjzZcWVR8x1XR/lAxybtWJ8fOrYYIHNGrkjw9BJeBWxOtuLx3zfWxQxJh41h+vJ6Wxcv0bs0MRSskdtzbg89lYQZwUKqhrKCI//pJQTUlk/hpbS1IGYnonQqfvtVKnHTV9vdYAD8ZfJA97w33zzkqC01+0JorWoCX/dRyqlOYwcwu59FS5Z/AA= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Wilco.Dijkstra@arm.com; Return-Path: Wilco.Dijkstra@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT033.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 43dd0d76-2466-48c0-5007-08d732c3a3e3 X-SW-Source: 2019-09/txt/msg00371.txt.bz2 Hi, +(simplify + (convert + (rshift + (mult > is the outer convert really necessary? That is, if we change > the simplification result to Indeed that should be "convert?" to make it optional. > Is the Hamming weight popcount > faster than the libgcc table-based approach? I wonder if we really > need to restrict this conversion to the case where the target > has an expander. Well libgcc uses the exact same sequence (not a table): objdump -d ./aarch64-unknown-linux-gnu/libgcc/_popcountsi2.o 0000000000000000 <__popcountdi2>: 0: d341fc01 lsr x1, x0, #1 4: b200c3e3 mov x3, #0x101010101010101 // #72340172838076673 8: 9200f021 and x1, x1, #0x5555555555555555 c: cb010001 sub x1, x0, x1 10: 9200e422 and x2, x1, #0x3333333333333333 14: d342fc21 lsr x1, x1, #2 18: 9200e421 and x1, x1, #0x3333333333333333 1c: 8b010041 add x1, x2, x1 20: 8b411021 add x1, x1, x1, lsr #4 24: 9200cc20 and x0, x1, #0xf0f0f0f0f0f0f0f 28: 9b037c00 mul x0, x0, x3 2c: d378fc00 lsr x0, x0, #56 30: d65f03c0 ret So if you don't check for an expander you get an endless loop in libgcc sin= ce the makefile doesn't appear to use -fno-builtin anywhere... Wilco