From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761786AbcLWUnu (ORCPT ); Fri, 23 Dec 2016 15:43:50 -0500 Received: from mail-wm0-f49.google.com ([74.125.82.49]:37189 "EHLO mail-wm0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753150AbcLWUnt (ORCPT ); Fri, 23 Dec 2016 15:43:49 -0500 From: Rasmus Villemoes To: Matthew Wilcox Cc: Yury Norov , George Spelvin , Akinobu Mita , Thomas Gleixner , Andrew Morton , linux-kernel@vger.kernel.org, Matthew Wilcox Subject: Re: [PATCH] find_bit: Micro-optimise find_next_*_bit Organization: D03 References: <1482513603-9630-1-git-send-email-mawilcox@linuxonhyperv.com> X-Hashcash: 1:20:161223:linux@horizon.com::T8VemQaPVusKzvD/:000000000000000000000000000000000000000000001M/g X-Hashcash: 1:20:161223:linux-kernel@vger.kernel.org::7Xy9KthVv/s56Sos:0000000000000000000000000000000002ktY X-Hashcash: 1:20:161223:akpm@linux-foundation.org::8OTbSxBHXXROkej2:0000000000000000000000000000000000002zyb X-Hashcash: 1:20:161223:mawilcox@linuxonhyperv.com::8ovTsnGlcmolMa6B:000000000000000000000000000000000003ONT X-Hashcash: 1:20:161223:tglx@linutronix.de::uwKxVj1Udj3EszyO:00000000000000000000000000000000000000000003kzD X-Hashcash: 1:20:161223:mawilcox@microsoft.com::W5sHyDXzUcgwMwXp:0000000000000000000000000000000000000004Y8i X-Hashcash: 1:20:161223:yury.norov@gmail.com::Sxl/x3N3R3e8q4Id:000000000000000000000000000000000000000005CeM X-Hashcash: 1:20:161223:akinobu.mita@gmail.com::40GMbubKAvtFv9/U:0000000000000000000000000000000000000005zSV Date: Fri, 23 Dec 2016 21:43:46 +0100 In-Reply-To: <1482513603-9630-1-git-send-email-mawilcox@linuxonhyperv.com> (Matthew Wilcox's message of "Fri, 23 Dec 2016 09:20:03 -0800") Message-ID: <878tr65qbh.fsf@rasmusvillemoes.dk> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 23 2016, Matthew Wilcox wrote: > From: Matthew Wilcox > > First, the first half of the test: (!nbits || start >= nbits) is > trivially a subset of the second half, since nbits and start are both unsigned. Yeah, I filed that as a missed optimization bug with gcc a year ago, but it seems that even 6.3 still does two tests - clang 3.6 is a bit smarter. Anyway, Acked-by: Rasmus Villemoes