Unverified Commit 9b3cd5c7 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Mark Brown
Browse files

regmap: place foo / 8 and foo % 8 closer to each other



On x86 the compiler (gcc (Debian 14.2.0-8) 14.2.0) may generate
a better code if it sees division and modulo goes together.

  Function                          old     new   delta
  __regmap_init                    3740    3732      -8
  Total: Before=31159, After=31151, chg -0.03%

clang (Debian clang version 18.1.8) on x86_64 still shows better code

  Function                          old     new   delta
  __regmap_init                    3582    3579      -3
  Total: Before=39854, After=39851, chg -0.01%

Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20241121105838.4073659-4-andriy.shevchenko@linux.intel.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent a4a7d86b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment