[llvm] [DAG] Early exit for flags in canCreateUndefOrPoison [nfc] (PR #89834)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 23 18:37:10 PDT 2024


================
@@ -452,6 +452,13 @@ struct SDNodeFlags {
   bool hasNoFPExcept() const { return NoFPExcept; }
   bool hasUnpredictable() const { return Unpredictable; }
 
+  bool hasAny() const {
+    return NoUnsignedWrap || NoSignedWrap || Exact || Disjoint || NonNeg ||
+           NoNaNs || NoInfs || NoSignedZeros || AllowReciprocal ||
+           AllowContract || ApproximateFuncs || AllowReassociation ||
----------------
nikic wrote:

Unpredictable is definitely not poison-generating.

NoFPExcept I'm not sure about, but I'd assume that one results in UB rather than poison.

https://github.com/llvm/llvm-project/pull/89834


More information about the llvm-commits mailing list