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

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 25 00:30:41 PDT 2020


nikic requested changes to this revision.
nikic added inline comments.
This revision now requires changes to proceed.


================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:2567
+    bool AllNonZero = llvm::all_of(PN->operands(), [&](Value *V) {
+      return isKnownNonZero(V, DemandedElts, Depth, Q);
     });
----------------
It is necessary to adjust the context instruction in Q to be the terminator of the incoming edge here (see what computeKnownBits does for example).


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

https://reviews.llvm.org/D88276



More information about the llvm-commits mailing list