[PATCH] D124158: [Clang][Attr] Skip adding noundef attribute to arguments when function has convergent attribute

krishna chaitanya sankisa via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 26 19:08:15 PDT 2022


skc7 updated this revision to Diff 425393.
skc7 added a comment.

clang-format to CGCall.cpp. Added comment for the change


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124158

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);
     }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124158.425393.patch
Type: text/x-patch
Size: 649 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220427/64309456/attachment.bin>


More information about the llvm-commits mailing list