[PATCH] D124654: [AIX] Handling the label alignment of a global variable with its multiple aliases.

Esme Yi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 7 11:32:30 PDT 2022


Esme added a comment.

In D124654#3636463 <https://reviews.llvm.org/D124654#3636463>, @efriedma wrote:

> I don't think that addresses my concern. I'm specifically concerned about cases like the following:
>
>   @ConstVector1 = global <2 x i64> zeroinitializer
>   @var1 = alias i64, getelementptr inbounds (<2 x i64>, ptr @ConstVector1, i32 0, i32 1)
>   
>   @ConstVector2 = global <2 x i64> <i64 1, i64 2>
>   @var2 = alias i64, getelementptr inbounds (i8, ptr @ConstVector2, i32 1)
>
> Currently, we silently throw away the definitions of "var1" and "var2".

Thanks, this is a really interesting case!
Targets like ppc64le-linux express such case with an expression like `.set var2, ConstVector2+1`.
However AIX doesn't support the `.set` directive. 
I need to do some investigation into how the AIX assembly expresses the case where the alias offset doesn't refer to any sub-element.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124654



More information about the llvm-commits mailing list