[PATCH] D142828: [ValueTracking] Add cases for additional ops in `isKnownNonZero`

Noah Goldstein via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 29 13:20:16 PST 2023


goldstein.w.n marked 2 inline comments as done.
goldstein.w.n added inline comments.


================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:2734
   case Instruction::Call:
-    if (cast<CallInst>(I)->getIntrinsicID() == Intrinsic::vscale)
-      return true;
+  case Instruction::Invoke:
+    if (auto *II = dyn_cast<IntrinsicInst>(I)) {
----------------
nikic wrote:
> Invoke handling unnecessary
> Invoke handling unnecessary

Dropped, sorry was just copying from `computeKnowBits`.


================
Comment at: llvm/test/Analysis/ValueTracking/known-non-zero.ll:56
 false:
   ;; So that branch doesn't fold to select.
   call void @use1(i1 %ne)
----------------
nikic wrote:
> Not really relevant in InstSimplify?
> Not really relevant in InstSimplify?

Good point. Dropped from D142827 (and likewise this).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142828



More information about the llvm-commits mailing list