[PATCH] D103992: [InstCombine / BuildLibCalls] Add parameter attributes from the prototype.

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 23 21:15:47 PDT 2021


rnk added a subscriber: xbolva00.
rnk added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp:1120-1121
+  B.CreateMemCpy(Dst, Align(1), CI->getArgOperand(1), Align(1), N);
   // Propagate attributes, but memcpy has no return value, so make sure that
   // any return attributes are compliant.
   // TODO: Attach return value attributes to the 1st operand to preserve them?
----------------
This change makes this comment stale. I checked using blame, and this setAttributes call was added in rGe80fcf03407acd6429d07e4a45185ac546ffa37c by @xbolva00 to propagate the `nonnull` annotations. However, I don't see any changes to the tests that were added, so maybe we don't need this any longer. Maybe the attributes are present on the memcpy declaration already.

In conclusion, I think the change looks good, just remove this stale comment. @xbolva00 , feel free to check that logic.


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

https://reviews.llvm.org/D103992



More information about the llvm-commits mailing list