[PATCH] D88207: [ValueTracking] Check uses of Argument if it is given to isGuaranteedNotToBeUndefOrPoison

Juneyoung Lee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 24 12:01:14 PDT 2020


aqjune added inline comments.


================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:4889
+    if (programUndefinedIfUndefOrPoison(A, PoisonOnly))
+      return true;
   }
----------------
nikic wrote:
> I would prefer to move the programUndefinedIfUndefOrPoison() call below outside the Instruction check, and  just return false from programUndefinedIfUndefOrPoison()  on non-Instruction/Argument (aka Constant).
Would it make `programUndefinedIfUndefOrPoison()` differentiate non-undef and undef constants?
We'll want to make `programUndefinedIfUndefOrPoison(undef)` return false.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D88207



More information about the llvm-commits mailing list