[PATCH] D105485: [IR] Use a proper type for AttributeList indexing

Guillaume Chatelet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 8 08:07:46 PDT 2021


gchatelet added a subscriber: thanm.
gchatelet added a comment.

In D105485#2864433 <https://reviews.llvm.org/D105485#2864433>, @thanm wrote:

>> I may have linked to the wrong line in Verifier.cpp. There are two asserts with the same message.
>
> Ah, ok, that makes a bit more sense.  https://reviews.llvm.org/D53602 really only deals with the statepoint case, so I am not sure if I have any insights as to what might be doing wrong with this test.

@thanm upon closer look the second error message also comes from D53602 <https://reviews.llvm.org/D53602>.
See https://reviews.llvm.org/D53602#change-oHfYVs0pQmdt

https://github.com/llvm/llvm-project/blob/ba913b8da57dcdcda0572ec3a6b8d4e367f22803/llvm/lib/IR/Verifier.cpp#L3267-L3272

  // Statepoint intrinsic is vararg but the wrapped function may be not.
  // Allow sret here and check the wrapped function in verifyStatepoint.
  if (!Call.getCalledFunction() ||
      Call.getCalledFunction()->getIntrinsicID() !=
          Intrinsic::experimental_gc_statepoint)
    Assert(!ArgAttrs.hasAttribute(Attribute::StructRet),
           "Attribute 'sret' cannot be used for vararg call arguments!",
           Call);

So it's definitely one of these two (there are no other such error messages in the codebase)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D105485



More information about the llvm-commits mailing list