[llvm-dev] Not able to vectorize struct members
Simon Pilgrim via llvm-dev
llvm-dev at lists.llvm.org
Thu Jul 15 02:05:21 PDT 2021
I've reported this here: https://bugs.llvm.org/show_bug.cgi?id=51103
On 15/07/2021 04:04, Ryan Taylor via llvm-dev wrote:
> Given a test case:
>
> #define N 10
> struct foo {
> float a[N][N];
> float b[N];
> };
>
> void compute(struct foo *p)
> {
> for (int i = 0; i < N; i++) {
> for (int j = 0; j < N; j++) {
> p->a[i][j] += 0.1f * p->b[i];
> }
> }
> }
>
> LLVM isn't able to vectorize this code. I'm not sure what the issue is
> here as it seems to vectorize this code:
>
> #define N 10
> struct foo {
> float a[N];
> float b[N];
> };
>
> void compute(struct foo *p)
> {
> for (int i = 0; i < N; i++) {
> p->a[i] += 0.1f * p->b[i];
> }
> }
>
> Is this a known issue?
>
> -Ryan
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210715/c7a0bee4/attachment.html>
More information about the llvm-dev
mailing list