[llvm] [SLP]Reuse the trimmed nodes in the perfectly matched gathers of the same user (PR #226582)

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 26 05:52:39 PDT 2026


alexey-bataev wrote:

> This change broke compilation of ffmpeg for multiple architectures. Reduced testcase:
> 
> ```c
> float a;
> float *b;
> int c;
> void d();
> void e() {
>   float f, g;
>   for (; c; c++) {
>     g += (a + b[c]) * (a + b[c]);
>     f += (a - b[c]) * (a - b[c]);
>   }
>   d(f);
>   d(g);
> }
> ```
> 
> ```
> $ clang -target x86_64-linux-gnu -c -O2 repro.c
> Instruction does not dominate all uses!
>   %8 = insertelement <2 x float> poison, float %sub, i64 0
>   %7 = insertelement <2 x float> %8, float %add, i64 1
> Instruction does not dominate all uses!
>   %13 = insertelement <2 x float> poison, float %sub.1, i64 0
>   %12 = insertelement <2 x float> %13, float %add.1, i64 1
> in function e
> fatal error: error in backend: Broken function found, compilation aborted!
> ```

Fixed in 8b96ddbf9cb3437ee4e47a9f60dc983a1f2be8d5

https://github.com/llvm/llvm-project/pull/226582


More information about the llvm-commits mailing list