[PATCH] D64111: Add getMostFrequentByte and use for isBytewiseValue implementation

Bjorn Pettersson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 3 10:04:49 PDT 2019


bjope added inline comments.


================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:3206
+  if (C->isNullValue()) {
+    H.Values[0] += Size;
+    return;
----------------
Not sure that we are guaranteed to get Size number of zeroes here. Not unless we also add a check for `DL.typeSizeEqualsStoreSize(V->getType)`. Consider if we for example have an i12, then only 12 bits out of 16 is known to be zero.

(this might be a bug on trunk as well, or maybe I've missed some condition somewhere regarding how this is used)





Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D64111





More information about the llvm-commits mailing list