[llvm] [SLP]Initial support for copyable elements (PR #147366)

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 4 06:04:48 PDT 2025


alexey-bataev wrote:

> Here's an llvm-reduced version of the reproducer above:
> 
> ```
> $ cat reduced.ll
> target datalayout = "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i128:128-f64:32:64-f80:32-n8:16:32-S128"
> target triple = "i686-unknown-linux-android29"
> 
> define i64 @vpx_fdct32(ptr %a) #0 {
>   %1 = add i64 0, 0
>   %2 = load i64, ptr %a, align 4
>   %3 = add i64 0, 0
>   %4 = add i64 %2, 0
>   %5 = add i64 0, 0
>   %6 = add i64 1, %1
>   %7 = ashr i64 0, 1
>   %8 = add i64 0, 0
>   %9 = ashr i64 %8, 0
>   br label %10
> 
> 10:                                               ; preds = %0
>   %11 = phi i64 [ %4, %0 ]
>   %12 = phi i64 [ %3, %0 ]
>   %13 = phi i64 [ %9, %0 ]
>   %14 = phi i64 [ %7, %0 ]
>   %15 = phi i64 [ %5, %0 ]
>   %16 = phi i64 [ %6, %0 ]
>   ret i64 0
> }
> 
> attributes #0 = { "target-features"="+sse2" }
> 
> $ build/bin/opt -passes=slp-vectorizer reduced.ll -o /dev/null
> Instruction does not dominate all uses!
>   %3 = load i64, ptr %a, align 4
>   %1 = insertelement <4 x i64> <i64 poison, i64 0, i64 0, i64 0>, i64 %3, i32 0
> LLVM ERROR: Broken module found, compilation aborted!
> ```

Will check, thanks

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


More information about the llvm-commits mailing list