[PATCH] D89976: [ValueTracking] add range limits for ctpop

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 23 05:16:24 PDT 2020


spatel marked an inline comment as done.
spatel added inline comments.


================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:6465
+    // Maximum of set bits is the bit width.
+    Upper = II.getType()->getScalarSizeInBits() + 1;
+    break;
----------------
nikic wrote:
> Use `Width` instead of `II.getType()->getScalarSizeInBits()`?
Yes, we already have the bit-width here. I'll also add an assert for 'Lower', so the zero initializer assumption doesn't break.


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

https://reviews.llvm.org/D89976



More information about the llvm-commits mailing list