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

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 24 07:26:38 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 ||
----------------
preames wrote:

Closest I could find to a definition on NoFPExcept is from the constrained intrinsics (https://llvm.org/docs/LangRef.html#id2340), and I agree that appears non-poison generating.  (Except maybe on FP flags?  But I don't think we model it that way.)  At the very least, the ValueTracking code doesn't seem to check for this property on constrained intrinsics.  

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


More information about the llvm-commits mailing list