[all-commits] [llvm/llvm-project] b0473c: [InstCombine] Pull extract through broadcast (#143...
agorenstein-nvidia via All-commits
all-commits at lists.llvm.org
Fri Jul 4 09:20:12 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b0473c599b0418c71d15150e0ea19d57df3b98e5
https://github.com/llvm/llvm-project/commit/b0473c599b0418c71d15150e0ea19d57df3b98e5
Author: agorenstein-nvidia <agorenstein at nvidia.com>
Date: 2025-07-04 (Fri, 04 Jul 2025)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
A llvm/test/Transforms/InstCombine/vec_extract_through_broadcast.ll
M llvm/test/Transforms/InstCombine/vec_shuffle-inseltpoison.ll
M llvm/test/Transforms/InstCombine/vec_shuffle.ll
M llvm/test/Transforms/InstCombine/vscale_extractelement-inseltpoison.ll
M llvm/test/Transforms/InstCombine/vscale_extractelement.ll
Log Message:
-----------
[InstCombine] Pull extract through broadcast (#143380)
The change adds a new instcombine pattern, and associated test, for
patterns like this:
```
%3 = shufflevector <2 x float> %1, <2 x float> poison, <4 x i32> zeroinitializer
%4 = extractelement <4 x float> %3, i64 %idx
```
The shufflevector has a splat, or broadcast, mask, so the extractelement
simply must be the first element of %1, so we transform this to
```
%2 = extractelement <2 x float> %1, i64 0
```
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