[PATCH] D106668: [DAG] Add initial SelectionDAG::isGuaranteedNotToBeUndefOrPoison framework (PR51129)

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 23 13:53:14 PDT 2021


efriedma accepted this revision.
efriedma added a comment.

LGTM



================
Comment at: llvm/include/llvm/CodeGen/SelectionDAG.h:1775
+  bool isGuaranteedNotToBeUndefOrPoison(SDValue Op, bool PoisonOnly = false,
+                                        unsigned Depth = 0) const;
+
----------------
I think I'd like to have a separate isGuaranteedNotToBePoison entry point, so code consuming this API doesn't have to explicitly pass the "PoisonOnly" flag.  (Sharing the implementation is fine.)

Doesn't have to be in this patch, though.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:4258
+  EVT VT = Op.getValueType();
+  if (VT.isScalableVector())
+    return false;
----------------
I'd like to figure out our plan for this at some point but I guess adding one more API with the same restriction isn't a big deal.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D106668



More information about the llvm-commits mailing list