[llvm] [Inliner] Fix bug when propagating poison generating return attributes (PR #66036)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 28 07:27:59 PDT 2023


================
@@ -1355,14 +1355,23 @@ static AttrBuilder IdentifyValidAttributes(CallBase &CB) {
     Valid.addDereferenceableOrNullAttr(DerefOrNullBytes);
   if (CB.hasRetAttr(Attribute::NoAlias))
     Valid.addAttribute(Attribute::NoAlias);
+  return Valid;
+}
+
+static AttrBuilder IdentifyValidPoisonGeneratingAttributes(CallBase &CB) {
+  AttrBuilder Valid(CB.getContext());
+  // Only allow these white listed attributes to be propagated back to the
+  // callee. This is because other attributes may only be valid on the call
+  // itself, i.e. attributes such as signext and zeroext.
----------------
nikic wrote:

Don't think we need to copy this comment.

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


More information about the llvm-commits mailing list