[PATCH] D86228: [GlobalISel][CallLowering] Use hasRetAttr for return flags on CallBases

Jessica Paquette via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 19 09:52:09 PDT 2020


paquette created this revision.
paquette added reviewers: aemerson, arsenm.
Herald added subscribers: hiraditya, rovka.
Herald added a project: LLVM.
paquette requested review of this revision.
Herald added a subscriber: wdng.

Given something like this:

  declare signext i16 @signext_callee()
  define i32 @caller() {
  %res = call i16 @signext_callee()
  }

CallLowering would miss that signext_callee's return value is sign extended, because it isn't on the call.

Use hasRetAttr on the CallBase to allow us to catch this.


https://reviews.llvm.org/D86228

Files:
  llvm/include/llvm/CodeGen/GlobalISel/CallLowering.h
  llvm/lib/CodeGen/GlobalISel/CallLowering.cpp
  llvm/test/CodeGen/AArch64/GlobalISel/call-translator.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86228.286590.patch
Type: text/x-patch
Size: 5499 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200819/a710c9eb/attachment.bin>


More information about the llvm-commits mailing list