[PATCH] D111643: [ValueTracking] Let propgatesPoison consider single poison operand.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 18 12:34:15 PST 2022


fhahn marked 3 inline comments as done.
fhahn added inline comments.


================
Comment at: llvm/include/llvm/Analysis/ValueTracking.h:630
+/// getGuaranteedNonPoisonOp.
+bool propagatesPoison(const Use &PoisonOp);
+
----------------
nikic wrote:
> Shouldn't this be modifying the declaration above?
Yeah looks like the rebase went wrong. Should be fixed now, thanks!


================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:5811
+      if (any_of(I.operands(),
+                 [=](const Use &Op) { return propagatesPoison(Op); })) {
         for (const Value *Op : I.operands()) {
----------------
nikic wrote:
> This is incorrect, needs to be synchronized with the YieldsPoison check below.
Yeah looks like the rebase went wrong here. Should be fixed now, thanks!


================
Comment at: llvm/lib/Transforms/Instrumentation/PoisonChecking.cpp:293
+        for (const Use &U : I.operands()) {
+          if (ValToPoison.find(U) != ValToPoison.end() &&
+                 propagatesPoison(U) )
----------------
nikic wrote:
> count/contains. Also the indentation looks broken here.
updated to use count and fixed indent, thanks!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D111643



More information about the llvm-commits mailing list