From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 36870 invoked by alias); 2 Feb 2017 11:56:27 -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 36853 invoked by uid 89); 2 Feb 2017 11:56:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=Stage, Hx-spam-relays-external:15.1.888.16, H*RU:15.1.888.16, commenting X-HELO: EUR01-HE1-obe.outbound.protection.outlook.com Received: from mail-he1eur01on0051.outbound.protection.outlook.com (HELO EUR01-HE1-obe.outbound.protection.outlook.com) (104.47.0.51) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 02 Feb 2017 11:56:16 +0000 Received: from DB3PR08CA0023.eurprd08.prod.outlook.com (10.161.51.161) by AM4PR08MB1012.eurprd08.prod.outlook.com (10.166.134.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.874.12; Thu, 2 Feb 2017 11:56:12 +0000 Received: from DB3FFO11FD043.protection.gbl (2a01:111:f400:7e04::178) by DB3PR08CA0023.outlook.office365.com (2a01:111:e400:503c::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.16 via Frontend Transport; Thu, 2 Feb 2017 11:56:12 +0000 Authentication-Results: spf=pass (sender IP is 217.140.96.140) smtp.mailfrom=arm.com; cavium.com; dkim=none (message not signed) header.d=none;cavium.com; dmarc=bestguesspass action=none header.from=arm.com;cavium.com; dkim=none (message not signed) header.d=none; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 217.140.96.140 as permitted sender) receiver=protection.outlook.com; client-ip=217.140.96.140; helo=nebula.arm.com; Received: from nebula.arm.com (217.140.96.140) by DB3FFO11FD043.mail.protection.outlook.com (10.47.217.74) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.874.2 via Frontend Transport; Thu, 2 Feb 2017 11:56:10 +0000 Received: from arm.com (10.1.2.79) by mail.arm.com (10.1.106.66) with Microsoft SMTP Server id 14.3.294.0; Thu, 2 Feb 2017 11:55:41 +0000 Date: Thu, 02 Feb 2017 11:56:00 -0000 From: James Greenhalgh To: "Hurugalawadi, Naveen" CC: Kyrill Tkachov , "gcc-patches@gcc.gnu.org" , "Pinski, Andrew" , Marcus Shawcroft , Richard Earnshaw , "nd@arm.com" Subject: Re: [PATCH] [AArch64] Implement popcount pattern Message-ID: <20170202115540.GB37031@arm.com> References: <584E81A9.8000402@foss.arm.com> <584FE2A8.2080908@foss.arm.com> <20170201135635.GA1848@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:217.140.96.140;IPV:CAL;SCL:-1;CTRY:GB;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(7916002)(39850400002)(39450400003)(39860400002)(39840400002)(39410400002)(2980300002)(438002)(24454002)(51914003)(199003)(189002)(2950100002)(6916009)(106466001)(5660300001)(26826002)(110136003)(626004)(33656002)(50466002)(46406003)(93886004)(47776003)(6286002)(7696004)(1076002)(4001350100001)(2906002)(23726003)(4326007)(50986999)(229853002)(77096006)(38730400001)(54906002)(189998001)(55016002)(8936002)(36756003)(356003)(104016004)(92566002)(76176999)(8676002)(97756001)(305945005)(246002)(5890100001)(83506001)(86362001)(54356999)(18370500001)(19627235001);DIR:OUT;SFP:1101;SCL:1;SRVR:AM4PR08MB1012;H:nebula.arm.com;FPR:;SPF:Pass;PTR:fw-tnat.cambridge.arm.com;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;DB3FFO11FD043;1:RYQvTLMWljP41hLuwj5ImZimqe5B6pvHBACDdWROYJBM+kYs8vsxQuhHafkS3nPAqzHpIBbs4ybv23YhnorphotO0pq2zUgsK9XvSHeaYLpNvZwctVS8VnxqrbuKbTah5cuuK9Hu6BwU76Uk+2CvK99jnmivwoT3tuzK3NWd21hbqhQob5p/sLHTdr2NyDozsiD8ohCZZPmHT5DOlUA4QetITfy6bQNpAYHjCnj2O0Tz+Igf8ig0W1O/lRJFfIcRdkarxatSprnFFHsaBBlGoUS0C0TUmo2ZBwAvwRszkrv6Ge+XnRhAuXB6inZPkjeczVFlMBYTe483+rzIX4KoGW6XlpIT6w+z09L5l0nxNkHiXehUc3Two7AyFQI0jVs/1B2NZaHWK+pced5pkohrhe0HZPANv69UdtMF8gwQkwtMIaqcqlpVo2su4gY6IJm/Hb9l4nl39qGBhgrZz99C1KFH1v6eDcUKuYvHyDOoKAViDPKciY5gdpJuS3uMLZ+kFip1ch1PGwbmlOi3WIJTLDyqsZBtdFYgmr4NhXZLxj0= X-MS-Office365-Filtering-Correlation-Id: c5757afb-a96e-48e4-9e96-08d44b627bb8 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(8251501002);SRVR:AM4PR08MB1012; X-Microsoft-Exchange-Diagnostics: 1;AM4PR08MB1012;3:5jjh3OgSTcEkWa5Zr35GF1nRXnJIz5azgZKvTsaYEn6YnNXF+skgA1bP8dBWQLfMDVRf2P3XxSjqtYCO6N8A1u50tlKoTpwpsEskwFlDQYBPe+fGu5aZVhZFHR1++WibHmoJWnsJkeoRYWDPnocH7DR1NU42Pe8E1qbuIU0BMttvj9zi/ZNaK7ZvoDQtHp8Upe5yhAANwnuqjDdmuwfmAFSQvvHJ5PZ5menYHYB18d/z34fkAQpo3BMXR0PeIPVhrOjJKzA8B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SWEbxlrGGExwnZM3jmFrIN4nm8yhovLzTlyeOqKtbSARdJxIWatVdNoq8SSowUfNQhF7JqVx+lnxud5cF1yY4fYka8MYdG6VxXgB0LKoP6+qwNxTtIe39/uZGFmw NoDisclaimer: True X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040375)(601004)(2401047)(13013025)(13020025)(13023025)(13024025)(5005006)(8121501046)(3002001)(10201501046)(6055026)(6041248)(20161123564025)(20161123560025)(20161123562025)(20161123555025)(20161123558025)(6072148);SRVR:AM4PR08MB1012;BCL:0;PCL:0;RULEID:;SRVR:AM4PR08MB1012; X-Microsoft-Exchange-Diagnostics: 1;AM4PR08MB1012;4:4S4c6URoxMtqmhgxADQ89wAnJmApMdEC+3VcfwsNkOaEAZrNCL3y8KHS6cqUii1SiIEyYQopcQiqCM6rm/x2TLTduKv6XOV0O4e0MPnqCKU7tkc6z0gGrXO4aY5WmAmbaZ9VlLl2ZImRtW1jAa66lw+NqyBZCoa411uCussHKSNeau5EmM2zwE8SSVXZ5tH7BnG7/GQmHmm7IB7iajzJRdKn/Vx7fc6MF/ZVggWL01Vsvsb36+GluiRG0ABB3mgRQDfDZm6xmqHBX6U5Rrjuh7jdFlGJU5w+y94jzrZy8fG4ZN/kaKrEfXcPHp0yM8tFWj1U4Q8nzaUS/MHH0hZNkGeMYPNhD2KYJ9Rh4nFWMKllbrOh9PAqaaDZ9+nPvwD0BEgkMstk1qC8fD9xDldf+V3boeglob+5V9aJ2HMsX5qXmKR6FWKLAFHVpN0Epv2Lur4b9K+EX587vjG7hSX1/rXVWO1JuiFYUu2watKy5W02/II6O/2wgHEYuB+OI7Zcw/UhKW2joQl2v5BH5kShk2bWM27he21/n5LLMLrFz4ynlUNwa7WBNwGnIiCa40E8/SCwtgTba+x1rp5dU1a++8gjDouXAL+hBrn6unoS7vdL8RXmRWOB6jDgGhLIrylVeaiMKIVQTHbYw/ueKSS/3xv7sL8jg1naKYI4xy90OdRrADQLG18T+BvpbsDXN+ULz0PXKKB0BOur4Qwr6efp3Q== X-Forefront-PRVS: 02065A9E77 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;AM4PR08MB1012;23:5avUnCBHTuM1H5kUYZhrR3T9EJH0hPGGKxySbu/r8?= =?us-ascii?Q?dY8TjmjUij0z4gQP/kU0FbOuvkp2aYe13vjBdA/NJ/sVaj7fgB/X7pFTuiGW?= =?us-ascii?Q?loYAGXSyzu+03prU3F3Y7RY9qMKwFq8ClMByioTZJ1Zq1R2p/qxAKm5iWMu3?= =?us-ascii?Q?T0xHOlByH6JpfLI4Ut3KO21LjaYd7DK4lUkKuvEa85x6WPg/PnqSU6leWUSD?= =?us-ascii?Q?xOUfssXLSsqx5fvm04HVixjcOU8Vq/6OHy5Q9i7UCwLGLnbb8dVvEwRT7drT?= =?us-ascii?Q?7Fzvikp6mgXB33oWnfvN9trKV7zUq9/7exKBoIlgUhZJOyAcXLMprMAALLJy?= =?us-ascii?Q?QDiH2TVxQWXsccCA671rfYd7UHGqUt1RYcGzGOqaEMI3JioQ/uRr6QJ+GjPG?= =?us-ascii?Q?qsKg0mzECKJeuN55DowOLUq/hcyf0PS0QTO8cmRMggan2O0Cnj48HYEePDlI?= =?us-ascii?Q?AJH1GvGSm41S7xSLs/QuwdujobvaamHOZLSedHsBp1+YkifY67coKQjUV9rw?= =?us-ascii?Q?0XCxAfT9LQOY4EkWLElA2ixJx9GMHyAcK4o3SMsLWlaUO+pUL9jsi8OifSqt?= =?us-ascii?Q?lpCOKECpPvH3JzF91TluiTrLrmA/WpjE4nYI5so03t5sXQYkvF6JUAJ1THAk?= =?us-ascii?Q?5snfzfw3FUc07IrBpi8+hHPSdDHlEguLWDgyy2JrZYYpYdbkVp/eOpXaQqXY?= =?us-ascii?Q?C/Dq7WKx1IFxTDJXmpsDR2godWqcgin94eH9Binxt73o84eLe1Tk8S3C09AQ?= =?us-ascii?Q?CCoPlmUIvC0I65y/0syDjUJRVmrHIBN6fJskCJzcFdlQ3iglPJ05PdBT500U?= =?us-ascii?Q?E6SYq8gp4MA8N5X0LUqvKeDakTMQIiRwM2G6EtYd7lZ7JtzdyhoKSYqFSKKe?= =?us-ascii?Q?MKHSU8JgbFuOkzZtkoWOTmAg0Te/7101u4W+aBuTxD5xQ9g50lgim3W6JsAk?= =?us-ascii?Q?M6sJRUg5bsYx6EWZH7M46b5XDQ81lcSFw7cXLFkD58U3EYyKcqjlLb8oglld?= =?us-ascii?Q?+08ToHyrDtbw9Ys49sOm0fpTIAmySyr9LjjmGTCPobwFnIVR9Nh8TnyotgAU?= =?us-ascii?Q?5y0mqSIwuD0u281lHTbws4wveYCk1sA7JVEKb/S62sxp2uFw+qEipRmJ9LVy?= =?us-ascii?Q?PVcpOtE3L0aStMiticvCJ1YnulA9A4vd2I7tMalDzXHRnbBewT6S1uecpwnf?= =?us-ascii?Q?tBUIEruXC8dN3khUBYfUyqat2a5U0UVrbNsvRYQIA227jQpG3kdhGWdLIs5A?= =?us-ascii?Q?J/K3dNLLYSvruVyBEbUWnsCHa1bpW2PC0uBt2ihOWsIGY7B4elYh4lk2GEwA?= =?us-ascii?Q?fLzeCOTVYoTNZoMNrTtT4MnzZb77wzGY0FasMy7pSVI?= X-Microsoft-Exchange-Diagnostics: 1;AM4PR08MB1012;6:xxNkhwYF+5erXGLWqN3TFFwXTcAAImZUcjHO6JQMKvLVuxmqo3vjWRon3RfBQx6joe9T7ZPeczpeES+nKpaqyBruNs9zUERab5uV2liSNl4G6XquwAPfL/0RNeB6nDhGU6YB/R743htIEQUzlOfv6QrmTPiLWJ6KzV8CL1sAzf043d2LPXO53ABddEwI2g59F+SjpytHXS2Ko+YZCTb5jChIhFc83orst1iNqjmjYLKybqOXfqNvc34XajxZMcZAAx6clZvDL0bNEovb8oPuZH67XU34j5VbuLf3TYIlRjIkgwNn6hz3jxrXHo5El6xFW77n2GthviKzk35+07Mttl4+LAVfz0uJtDSeU5SoaE/gcXacNZlN7cydBCLT5tSesNFvxBuINLwdtq3V0PQ9ssVNqztchB4NRxZ4nObWDyE3de1D/3MuDGOWhvGxTdVD;5:jA7fWbVLj27odBrV84WWekAQu4HSgAKvSABJPQkhIN91T5+p5Z6ZOZhiaEHigrDMvHqxLo5njOIwLyW2p6gBfLkZFSJ8dsWsRscbGI3eTcfVSOF2cM2hHS6HTgt4FgechFlXV/OCsNVBRtKteuAbpw==;24:SuoaNrikZbMbjcbGrSToufRuTRH+rETSsAbIXZo1giMqMjANAzt3/7VMnOxHGRTI12zqgx1UjfrN7TJ28u2s3ZvNuf67y+jBykrbE+qgj/k= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;AM4PR08MB1012;7:s4a/I0SKzKhQh6m94o2IdfWUP3LSPWtW8Vwm5x1pBF0/sx0+SXdAmMyBSYUNE6qQaMMfXbOGoQKQLfaEcgN24bkGKTg/AwRhua6iuwCuKqUN9jrIFTJRlk9VFqyoaZcoZ63coRZUjrE7O1NsyquelfS3WppX+gcwZ7vySbViBm7x5gdR91NouyLWv5SEmyLVNxAdtgYgakx8XWzfw3mmL0JEdOW/QgMZ6LPCvxv2FbWTNl4TELCoaSo8mcAyy+EV1DAEAV43b4WB9yT0/KHkjyJKMGrY/1Db+JpyIpIy7MPRzzRb980MOqRba3WNgGxZVkq+b57dqsmvEBa6H+oQvOino0/fG7xEI95qvLrJ++HFz0wCeR7bjiW8hPJA7o+6oKY3Icw9jvekMXkOC/ikzqNnpeI8jwk+6aqIOaGnNA8AyOpPsIv19/8Lw8WKq2xdLiSh8O74K3C+RUbMpAmc4SaKSvrbiEZtMlXjogdXOByTMoVEtMmTVx1uwkBdY9to3Ce6pmUN0n0AtouflwcR4TW6USPzqQ978Pb/vfshk7FQTuetk2su8zVLxpuY+iEV X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Feb 2017 11:56:10.9737 (UTC) X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[217.140.96.140];Helo=[nebula.arm.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR08MB1012 X-IsSubscribed: yes X-SW-Source: 2017-02/txt/msg00139.txt.bz2 On Thu, Feb 02, 2017 at 04:03:42AM +0000, Hurugalawadi, Naveen wrote: > Hi James and Kyrill, > > Thanks for the review and comments on the patch. > > >> On ILP32 systems this would still use the SImode patterns, > >> so I suggest you use __builtin_popcountll and > >> an unsigned long long return type to ensure you always exercise the 64-bit code. > > Sorry for not commenting on this part. > The issue is that code generates "__popcountdi2" for all the codes in testcase > for LP64 and ILP32 variants. > __builtin_popcount, __builtin_popcountl and __builtin_popcount. > > Hence, modified the patch to check for "popcount". I don't understand this comment and how it relates to your updated patch (which still checks for CNT). > Bootstrapped and regression tested on AArch64-Thunderx-Linux machine. > > Please find attached the modified patch and let us know if its okay? Could you please clarify what you meant above? The patch looks fine (though possibly not for Stage 4), but I'm not sure of your intent. Thanks, James