[PATCH] D157009: [SLP]Fix PR63854: Add proper sorting of pointers for masked stores.

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 22 08:09:31 PDT 2023


ABataev added a comment.

In D157009#4649853 <https://reviews.llvm.org/D157009#4649853>, @akhuang wrote:

> noticed that this patch causes a crash with this example code
>
>   $ cat t.c
>   int a[][1];
>   int b, c, d;
>   int *e, *f, *g;
>   int h[4];
>   void i() {
>     int j, k, l;
>     e = a[b];
>     g = h;
>     long m = e[1] * f[63];
>     l = m >> c;
>     g[32] = l;
>     m = e[33] * f[62];
>     k = m >> c;
>     g[33] = k;
>     m = e[7] * f[61];
>     j = m >> c;
>     g[34] = j;
>     m = e[49] * f[60];
>     d = m >> c;
>     g[35] = d;
>   }
>   $ clang -cc1 -target-cpu alderlake -O3 -vectorize-slp -emit-llvm t.c

Thanks for report, will investigate it and fix ASAP

In D157009#4649853 <https://reviews.llvm.org/D157009#4649853>, @akhuang wrote:

> noticed that this patch causes a crash with this example code
>
>   $ cat t.c
>   int a[][1];
>   int b, c, d;
>   int *e, *f, *g;
>   int h[4];
>   void i() {
>     int j, k, l;
>     e = a[b];
>     g = h;
>     long m = e[1] * f[63];
>     l = m >> c;
>     g[32] = l;
>     m = e[33] * f[62];
>     k = m >> c;
>     g[33] = k;
>     m = e[7] * f[61];
>     j = m >> c;
>     g[34] = j;
>     m = e[49] * f[60];
>     d = m >> c;
>     g[35] = d;
>   }
>   $ clang -cc1 -target-cpu alderlake -O3 -vectorize-slp -emit-llvm t.c

Must be fixed in 7ff83ed6cda068d99ec2926216d9868754da6e79 <https://reviews.llvm.org/rG7ff83ed6cda068d99ec2926216d9868754da6e79>


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D157009



More information about the llvm-commits mailing list