[PATCH] D122194: [SelectionDAG] Store LeadingZero count in LiveOutInfo instead of KnownBits.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 4 12:06:05 PDT 2022


craig.topper added a comment.
Herald added a subscriber: jsilvanus.

In D122194#3399999 <https://reviews.llvm.org/D122194#3399999>, @RKSimon wrote:

> In D122194#3399998 <https://reviews.llvm.org/D122194#3399998>, @craig.topper wrote:
>
>> In D122194#3399974 <https://reviews.llvm.org/D122194#3399974>, @RKSimon wrote:
>>
>>> Alignment, one bit and known negative values would all be nice to have - I'm just not sure if they'd make a huge difference.
>>
>> For "one bit" would we have to call isKnownToBeAPowerOfTwo in addition to computeKnownBits?
>
> one bit I meant KnownBits::countMaxPopulation() == 1 (i.e. all but one bit is known zero - it might be pow2 or zero)

Having both leading and trailing zeros and their sum being 1 less than the bitwidth would cover this right?

Any objection to this patch? Or do we think we need a fully general cross basic block known bits that we will hook up through something more than AssertZExt someday soon?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D122194



More information about the llvm-commits mailing list