[PATCH] D87304: [AttributeFuncs] Consider `align` in `typeIncompatible`

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 8 07:38:28 PDT 2020


jdoerfert added a comment.

In D87304#2318780 <https://reviews.llvm.org/D87304#2318780>, @dantrushin wrote:

> I wonder if `align` attribute is legal for vectors of pointers?
> This is allowed:
>
>   define align 8 i32* @test_scalar(i32* %in) {
>     ret i32* %in
>   }
>
> but this is not:
>
>   define align 8 <4 x i32*> @test_vector(<4 x i32*> %in) {
>     ret <4 x i32*> %in
>   }
>
> Is it intentional behavior or just has been overlooked?

The way I read the lang ref this is intentional. Not to say one should not define what it means for vectors of pointers and then allow it. I feel align is not the only one missing for them though.
You want to give it a try?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D87304



More information about the llvm-commits mailing list