[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:28:00 PDT 2023


================
@@ -1407,6 +1416,58 @@ static void AddReturnAttributes(CallBase &CB, ValueToValueMapTy &VMap) {
     // dereferenceable_or_null etc). See AttrBuilder::merge for more details.
     AttributeList AL = NewRetVal->getAttributes();
     AttributeList NewAL = AL.addRetAttributes(Context, Valid);
+    // Attributes that may generate poison returns are a bit tricky. If we
+    // propagate them, other uses of the callsite might have there behavior
+    // change/or cause UB (if they have noundef) b.c of the new potential
----------------
nikic wrote:

Drop `/`?

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


More information about the llvm-commits mailing list