Commit 7f17639
[SLP]Fix PR101213: Reuse extractelement, only if its vector operand comes before new vector value.
When trying to reuse extractelement instruction, need to check that it
is inserted into proper position. Its original vector operand should
come before new vector value, otherwise new extractelement instruction
must be generated.
Fixes llvm#101213
(cherry picked from commit f70f122)1 parent dae0320 commit 7f17639
File tree
2 files changed
+56
-2
lines changed- llvm
- lib/Transforms/Vectorize
- test/Transforms/SLPVectorizer/X86
2 files changed
+56
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13889 | 13889 | | |
13890 | 13890 | | |
13891 | 13891 | | |
13892 | | - | |
| 13892 | + | |
| 13893 | + | |
13893 | 13894 | | |
13894 | 13895 | | |
13895 | 13896 | | |
13896 | | - | |
| 13897 | + | |
| 13898 | + | |
| 13899 | + | |
| 13900 | + | |
| 13901 | + | |
13897 | 13902 | | |
13898 | 13903 | | |
13899 | 13904 | | |
| |||
Lines changed: 49 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
0 commit comments