[PATCH] D159205: [SLP]Try to vectorize scalars, being vectorized already, but do not need to be scheduled.

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 21 10:19:51 PDT 2023


ABataev added a comment.

In D159205#4649508 <https://reviews.llvm.org/D159205#4649508>, @bgraur wrote:

> We found another issue where the compiler enters an infinite loop at this revision.
> The infinite loop reproduces up until revision 7db87a66b0206af027724fc1704e5e5ce7772a45 <https://reviews.llvm.org/rG7db87a66b0206af027724fc1704e5e5ce7772a45> where the compiler exits with error:
>
>   Instruction does not dominate all uses!
>     %7 = shufflevector <2 x double> %6, <2 x double> poison, <2 x i32> zeroinitializer
>     %5 = fmul <2 x double> %7, <double 0x3FD4F2094F2094F2, double 0x3FE5555555555555>
>   in function aa
>   fatal error: error in backend: Broken function found, compilation aborted!
>
> There's no change at the revision fixing the previous report (ebed4692f8160e65c5a04c3edfb61b82ca037574 <https://reviews.llvm.org/rGebed4692f8160e65c5a04c3edfb61b82ca037574>)
>
> Reduced repro:
>
>   int a;
>   double b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y,
>       z;
>   void aa() {
>     double ab, ac, ad = ab = c ? h + d : f * g;
>     double un = 0.18e2 / 0.55e2 * ab - 0.1e2 / 0.33e2 * ab - 0.2e1 / 0.3e1 * ab;
>     if (a)
>       t = s;
>     ac = v + 0.2e1 / 0.3e1 * ab * d - w - 0.2e1 / 0.3e1 * ab * 0 + x + i - y - j +
>          e + k - e - l + e + m - e - n;
>     ad = d + 0.18e2 / 0.55e2 * ab * o - e - 0.1e2 / 0.33e2 * ab * p + f + b - d -
>          q + e + b - e - r + f + b - e - b;
>     z = c ? u + ac + ad : 0;
>   }
>
> Compile command:
>
>   $ clang -cc1 -triple x86_64-pc-linux-gnu -S \
>      -fmath-errno -target-feature +sse4.2 \
>      -O3 -vectorize-slp -x c repro.c \
>      -o /tmp/out
>
> @ABataev  can you please take a look? This second issue is much more spread and causes lots of breakages for us.

Must be fixed in 3dc28e6c6a0c203a928d64e076ed162215e6ba3f <https://reviews.llvm.org/rG3dc28e6c6a0c203a928d64e076ed162215e6ba3f>


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D159205



More information about the llvm-commits mailing list