[PATCH] D92698: Add recursive decomposition reasoning to isKnownNonEqual

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 5 14:53:50 PST 2020


nikic accepted this revision.
nikic added a comment.
This revision is now accepted and ready to land.

In D92698#2435769 <https://reviews.llvm.org/D92698#2435769>, @reames wrote:

> Tests for the basic aa extension will be in the patch for basicaa.    I could probably contrive a test case through the existing basic aa use of isKnownNonEqual, but it would take some thought.  Are you okay with me landing this as is, and then including supplemental tests in the next patch?

Sure, that's fine. I thought this patch is all there is to it, wasn't aware it requires further changes in BasicAA.

The logic here is pretty straightforward and I don't expect it to be expensive, so LGTM.



================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:2502
     return false;
-  return isKnownNonZero(Op, 0, Q);
+  return isKnownNonZero(Op, Depth + 1, Q);
 }
----------------
Should be just `Depth` here to stay consistent with the computeKnownBits case, and the previous behavior?


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

https://reviews.llvm.org/D92698



More information about the llvm-commits mailing list