llvm-project
f08b2fef - [Support][APint] Introduce and use isPowerOf2SlowCase instead countPopulationSlowCase for slow path (#189257)

Commit
26 days ago
[Support][APint] Introduce and use isPowerOf2SlowCase instead countPopulationSlowCase for slow path (#189257) In most cases `APint::isPowerOf2` returns false, but `countPopulationSlowCase` always has `O(N)` complexity specifically for the most common case, so I added `isPowerOf2SlowCase` method with an early loop exit which should help a lot for most typical scenario.
Author
Parents
Loading