[PATCH] D151421: [KnownBits] Simplify shl. NFCI.

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 25 06:40:59 PDT 2023


nikic added a comment.

In D151421#4371774 <https://reviews.llvm.org/D151421#4371774>, @nikic wrote:

> In D151421#4371619 <https://reviews.llvm.org/D151421#4371619>, @foad wrote:
>
>> @nikic this was a result of me trying to understand your implementation. I tried to:
>>
>> - remove special cases (but perhaps some of these were deliberate early-outs to speed up to the common cases?)
>
> Yes, these are intentional fast paths. In fact, the ones we currently have are insufficient, and we'll need another one for the case where the shift amount is unknown, because the current implementation is too slow. (This path is mostly not exposed right now due to special code in ValueTracking, but it if does get exposed it causes substantial compile-time regressions.)

For reference, that extra fast path is going to look something like this: https://github.com/llvm/llvm-project/commit/6c242bc3d81f87b819e6d705d73a43fb4bf1c5d0 (Which does fix the compile-time regressions.) But I'll return to this once you're done with your changes.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D151421/new/

https://reviews.llvm.org/D151421



More information about the llvm-commits mailing list