[PATCH] D88276: [IsKnownNonZero] Handle the case with non-constant phi nodes

Serguei Katkov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 28 04:49:42 PDT 2020


skatkov added inline comments.


================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:2569
+      RecQ.CxtI = PN->getIncomingBlock(U)->getTerminator();
+      if (U.get() == PN && RecQ.CxtI == Q.CxtI)
+        return true;
----------------
nikic wrote:
> Why the `RecQ.CxtI == Q.CxtI` check here? Shouldn't we always be able to skip, regardless of context?
Not sure, just to be conservative. I have no some concrete example. Can remove until some example is found.


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

https://reviews.llvm.org/D88276



More information about the llvm-commits mailing list