[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 10:19:13 PDT 2020


paquette added a comment.

In D86228#2226562 <https://reviews.llvm.org/D86228#2226562>, @arsenm wrote:

> The change itself is fine and more consistent, but this is just making an existing problem worse. Instead of treating signext/zeroext as optimization hints on arguments and call results, we're actually introducing code to do the extension which we were promised was already done. We really should be emitting the equivalent of ISD::AssertZext/AssertSext

Yeah, I'm actually working on that right now. The problem is that right now, in, say, this case:

  declare signext i16 @signext_callee()
  define i32 @foo() {
    %res = call i16 @signext_callee()
    %ext = sext i16 %res to i32
    ret i32 %ext
  }

We wouldn't even know that we could emit a G_ASSERT_SEXT. All this patch is supposed to do is make sure that we get the attribute plumbing correct.


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

https://reviews.llvm.org/D86228



More information about the llvm-commits mailing list