[llvm] [AggressiveInstCombine] Recognize table based log2 and replace with ctlz+sub. (PR #185160)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 13 09:50:11 PDT 2026


topperc wrote:

> @topperc, what should i do in this PR? which usecase should I work on?

I don't think there's anything left to do until there are comments. It should handle these cases from the discussion on your patch

https://github.com/Majiir/GeodesicGrid/blob/master/IntMath.cs
https://github.com/gpakosz/PackedArray/blob/master/PackedArray.c#L590
https://github.com/facebook/zstd/blob/1168da0e567960d50cba1b58c9b0ba047ece4733/lib/common/bits.h#L52C63-L53C1

Did your patch handle the first 2? There is no subtract in those.

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


More information about the llvm-commits mailing list