[PATCH] D59386: [ValueTracking] ConstantRange based overflow detection for unsigned add/sub

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 18 11:05:31 PDT 2019


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


================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:5717
+  unsigned BitWidth = Ty->getScalarSizeInBits();
+  if (const ConstantDataVector *CDV = dyn_cast<ConstantDataVector>(V)) {
+    // For constant vectors we compute the range between the minimal and
----------------
spatel wrote:
> By limiting to ConstantDataVector, are we excluding weird (non-power-of-2 bitwidths or number of elements) types? Is that intentional?
Nope, that's not intentional. This is just me being fuzzy on the Constant hierarchy...

I've dropped the non-splat vector handling code from this revision and will handle this properly in a followup.


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

https://reviews.llvm.org/D59386





More information about the llvm-commits mailing list