[PATCH] D95088: [InstCombine] avoid crashing on attribute propagation

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 21 04:54:09 PST 2021


spatel marked an inline comment as done.
spatel added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp:1157
+  NewCI->removeAttributes(AttributeList::ReturnIndex,
+                          AttributeFuncs::typeIncompatible(NewCI->getType()));
   return B.CreateInBoundsGEP(B.getInt8Ty(), Dst, N);
----------------
jdoerfert wrote:
> We could attach (some, if not all) return value attributes to the first operand in order to preserve them. I guess a FIXME would do for now if you don't feel like including this.
I haven't looked at what is currently possible with attribute transforms other than this, so I'll add a comment. Not sure if/when I can extend the patch.


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

https://reviews.llvm.org/D95088



More information about the llvm-commits mailing list