[PATCH] D73435: [ValueTracking] Add DemandedElts support to computeKnownBits/ComputeNumSignBits (PR36319)

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 30 16:14:24 PST 2020


jdoerfert added inline comments.


================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:1808
 /// same width as the vector element, and the bit is set only if it is true
 /// for all of the elements in the vector.
+void computeKnownBits(const Value *V, const APInt &DemandedElts,
----------------
Do we need to update the comment here that talks about vectors given that there is another kind of "vector query" now possible.


================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:2855
           DemandedRHS.setBit(M % NumElts);
       }
       Tmp = std::numeric_limits<unsigned>::max();
----------------
The above loop is now duplicated in this file, right? If so, maybe a helper is preferable. Given the existing TODO above having 3 version of the code seems definitively too many.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D73435





More information about the llvm-commits mailing list