[all-commits] [llvm/llvm-project] 874eb8: VectorCombine: Improve the insert/extract fold in ...
Nicolai Hähnle via All-commits
all-commits at lists.llvm.org
Mon Nov 24 12:07:04 PST 2025
Branch: refs/heads/users/nhaehnle/spr/main/c151bb04
Home: https://github.com/llvm/llvm-project
Commit: 874eb8ab94d2fdcde7297d888a7a9c0e73af1ece
https://github.com/llvm/llvm-project/commit/874eb8ab94d2fdcde7297d888a7a9c0e73af1ece
Author: Nicolai Hähnle <nicolai.haehnle at amd.com>
Date: 2025-11-24 (Mon, 24 Nov 2025)
Changed paths:
M llvm/lib/Transforms/Vectorize/VectorCombine.cpp
M llvm/test/Transforms/VectorCombine/AMDGPU/extract-insert-i8.ll
M llvm/test/Transforms/VectorCombine/X86/extract-insert-poison.ll
M llvm/test/Transforms/VectorCombine/X86/extract-insert.ll
M llvm/test/Transforms/VectorCombine/X86/pr126085.ll
Log Message:
-----------
VectorCombine: Improve the insert/extract fold in the narrowing case
Keeping the extracted element in a natural position in the narrowed
vector has two beneficial effects:
1. It makes the narrowing shuffles cheaper (at least on AMDGPU), which
allows the insert/extract fold to trigger.
2. It makes the narrowing shuffles in a chain of extract/insert
compatible, which allows foldLengthChangingShuffles to successfully
recognize a chain that can be folded.
There are minor X86 test changes that look reasonable to me. The IR
change for AVX2 in llvm/test/Transforms/VectorCombine/X86/extract-insert-poison.ll
doesn't change the assembly generated by `llc -mtriple=x86_64-- -mattr=AVX2`
at all.
commit-id:c151bb04
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list