[llvm] [X86] combineINSERT_SUBVECTOR - fold insert_subvector(base,extract_subvector(broadcast)) -> blend shuffle(base,broadcast) (PR #133083)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 31 05:46:52 PDT 2025
RKSimon wrote:
```ll
define void @widget() #0 {
%load4 = load i64, ptr poison, align 32
%add = add i64 %load4, 1
%insertelement5 = insertelement <16 x i64> zeroinitializer, i64 %add, i64 1
%shufflevector = shufflevector <16 x i64> %insertelement5, <16 x i64> poison, <16 x i32> <i32 0, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1>
%icmp6 = icmp slt <16 x i64> %shufflevector, <i64 9223372036854775806, i64 2, i64 3, i64 4, i64 5, i64 6, i64 7, i64 8, i64 9, i64 10, i64 11, i64 12, i64 13, i64 14, i64 15, i64 16>
%shufflevector7 = shufflevector <16 x i1> poison, <16 x i1> %icmp6, <16 x i32> <i32 0, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31>
%zext = zext <16 x i1> %shufflevector7 to <16 x i8>
store <16 x i8> %zext, ptr poison, align 32
ret void
}
attributes #0 = { "target-cpu"="skx" }
```
https://github.com/llvm/llvm-project/pull/133083
More information about the llvm-commits
mailing list