Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754321AbbKBWuU (ORCPT ); Mon, 2 Nov 2015 17:50:20 -0500 Received: from relais.videotron.ca ([24.201.245.36]:30573 "EHLO relais.videotron.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752685AbbKBWsk (ORCPT ); Mon, 2 Nov 2015 17:48:40 -0500 X-Greylist: delayed 901 seconds by postgrey-1.27 at vger.kernel.org; Mon, 02 Nov 2015 17:48:38 EST Content-transfer-encoding: 7BIT From: Nicolas Pitre To: Alexey Brodkin , =?UTF-8?q?M=C3=A5ns=20Rullg=C3=A5rd?= Cc: Arnd Bergmann , rmk+kernel@arm.linux.org.uk, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/5] 64-by-32 ddivision optimization for constant divisors on 32-bit machines Date: Mon, 02 Nov 2015 17:33:25 -0500 Message-id: <1446503610-6942-1-git-send-email-nicolas.pitre@linaro.org> X-Mailer: git-send-email 2.4.3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 946 Lines: 22 This is a generalization of the optimization I produced for ARM a decade ago to turn constant divisors into a multiplication by the divisor reciprocal. Turns out that after all those years gcc is still not optimizing things on its own for that case. This has important performance benefits as discussed in this thread: https://lkml.org/lkml/2015/10/28/851 This series brings the formerly ARMonly optimization to all 32-bit architectures using C code by default. The possibility for the actual multiplication to be implemented in assembly is provided in order to get optimal code. The ARM version can be used as an example implementation for other interested architectures to implement. Nicolas -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/