[llvm] MathExtras: avoid unnecessarily widening types (PR #95426)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 29 06:02:19 PDT 2024


nikic wrote:

> Quick question: how do we measure the impact of this patch? I tried using LLVM Compile Time Tracker, but I didn't see any changes.

It does seem to have a mild negative effect: https://llvm-compile-time-tracker.com/compare.php?from=5cc1287bdbb2de9ad91e4ba8dc9eeb9508c734a5&to=56277948d577245be845c89a7d7c3a5ccd9747ef&stat=instructions:u

It might have been better to only do this for the divisions, not alignment, where this matters little but comes with cost due to the less efficient implementation that accounts for overflow.

https://github.com/llvm/llvm-project/pull/95426


More information about the llvm-commits mailing list