[llvm] [SLP]Exclude non-profitable subtrees. (PR #162018)

Mikael Holmen via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 31 02:27:35 PST 2025


mikaelholmen wrote:

> I see failures like
> 
> ```
> Instruction does not dominate all uses!
>   %21 = insertelement <12 x i32> %20, i32 %call312, i64 7, !dbg !32
>   %12 = shufflevector <12 x i32> %21, <12 x i32> poison, <8 x i32> <i32 4, i32 1, i32 2, i32 7, i32 poison, i32 poison, i32 poison, i32 poison>, !dbg !32
> in function test_diff_18
> fatal error: error in backend: Broken function found, compilation aborted!
> ```
> 
> with this patch, also with the recommit in [1a8f5fa](https://github.com/llvm/llvm-project/commit/1a8f5fa823a55bce9be368097d2ac7e137fe5d17).
> 
> I don't have a reproducer I can share yet but I'll try to extract something.

@alexey-bataev 
```opt -passes="slp-vectorizer,verify" bbi-113847.ll -S -o -```
[bbi-113847.ll.gz](https://github.com/user-attachments/files/24393293/bbi-113847.ll.gz)


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


More information about the llvm-commits mailing list