[PATCH] D151816: [ValueTracking] Directly use KnownBits shift functions

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 31 11:45:51 PDT 2023


nikic added a comment.

coverage-levels.cpp failures might be legitimate.



================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:994
+      Known.isNonZero() ||
+      (Known.getMaxValue().ult(Known.getBitWidth()) &&
+       isKnownNonZero(I->getOperand(1), DemandedElts, Depth + 1, Q));
----------------
goldstein.w.n wrote:
> what is the `Known.getMaxValue().ult(Known.getBitWidth())` is doing here?
Nothing semantically meaningful. It only avoids calling isKnownNonZero() in substantially more cases than the old code.


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

https://reviews.llvm.org/D151816



More information about the llvm-commits mailing list