[llvm] [FunctionAttrs] Don't infer noundef when return has nofpclass (PR #191822)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 13 08:39:26 PDT 2026


================
@@ -1742,6 +1742,10 @@ static void addNoUndefAttrs(const SCCNodeSet &SCCNodes,
                 !Attr.getRange().contains(
                     computeConstantRange(RetVal, /*ForSigned=*/false)))
               return false;
+
+            Attribute NoFP = Attrs.getRetAttr(Attribute::NoFPClass);
+            if (NoFP.hasAttribute(Attribute::NoFPClass))
----------------
dtcxzyw wrote:

I'd suggest following the checks above: we keep nofpclass iff it can be derived from `computeKnownFPClass`.


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


More information about the llvm-commits mailing list