[PATCH] D76673: [Attributor][FIX] Prevent alignment breakage wrt. must-tail calls

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 26 17:25:41 PDT 2020


jdoerfert added a comment.

In D76673#1945260 <https://reviews.llvm.org/D76673#1945260>, @rnk wrote:

> lgtm
>
> I think the current verifier check is overly conservative. I think the `align` argument attribute is only an ABI-relevant attribute when it is used with `byval`. In your test case, it seems to refer to the alignment of the pointee of a pointer argument, not the alignment of the argument itself. In that case, it is not ABI relevant, and we could tolerate the mismatch.
>
> However, I just don't think it's worth worrying about this detail in attributor. Mainly, it points out that `align` is overloaded. =(


I don't think in my test it is the pointee of the pointer argument. The load from %p has an alignment of 32, so %p is assumed to be align 32 at this location. Then the argument of `musttail_callee_1` is assumed to be align 32 as well but we do not manifest it.
What am I getting wrong?

Also, the verifier check lists `returned` as well. Is it correct that `returned` has ABI implications?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76673





More information about the llvm-commits mailing list