skc7 created this revision. Herald added a project: All. skc7 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits.
Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D124496 Files: clang/lib/CodeGen/CGCall.cpp Index: clang/lib/CodeGen/CGCall.cpp =================================================================== --- clang/lib/CodeGen/CGCall.cpp +++ clang/lib/CodeGen/CGCall.cpp @@ -2432,7 +2432,8 @@ // Decide whether the argument we're handling could be partially undef if (CodeGenOpts.EnableNoundefAttrs && DetermineNoUndef(ParamType, getTypes(), DL, AI)) { - if(!FuncAttrs.contains(llvm::Attribute::Convergent)) + // Skip adding noundef attribute to arguments when function has convergent attribute. + if (!FuncAttrs.contains(llvm::Attribute::Convergent)) Attrs.addAttribute(llvm::Attribute::NoUndef); }
Index: clang/lib/CodeGen/CGCall.cpp =================================================================== --- clang/lib/CodeGen/CGCall.cpp +++ clang/lib/CodeGen/CGCall.cpp @@ -2432,7 +2432,8 @@ // Decide whether the argument we're handling could be partially undef if (CodeGenOpts.EnableNoundefAttrs && DetermineNoUndef(ParamType, getTypes(), DL, AI)) { - if(!FuncAttrs.contains(llvm::Attribute::Convergent)) + // Skip adding noundef attribute to arguments when function has convergent attribute. + if (!FuncAttrs.contains(llvm::Attribute::Convergent)) Attrs.addAttribute(llvm::Attribute::NoUndef); }
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits