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

Jonas Paulsson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 9 14:50:34 PDT 2021


jonpa created this revision.
jonpa added reviewers: uweigand, rnk, aeubanks.
Herald added a subscriber: hiraditya.
jonpa requested review of this revision.
Herald added a project: LLVM.

Currently only the calling convention is passed on from the prototype to the built call instruction. This patch also copies the parameter attributes.

This seems to be needed after D101806 <https://reviews.llvm.org/D101806>, which changed the instruction selector to only look at the call instruction parameter attributes, whereas before it also looked at the called function.

There are probably more places that needs a similar fix, like builtins..?

This makes the "verifier extension" (D103412 <https://reviews.llvm.org/D103412>) pass on SPEC17/SystemZ. Not sure if the returned value is checked by that patch or if they need a similar handling like the parameters?


https://reviews.llvm.org/D103992

Files:
  llvm/lib/Transforms/Utils/BuildLibCalls.cpp
  llvm/test/Transforms/InstCombine/libcall-param-attrs.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D103992.350997.patch
Type: text/x-patch
Size: 6636 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210609/165d70ac/attachment.bin>


More information about the llvm-commits mailing list