Commit f70f122
committed
[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#1012131 parent 8364a6e commit f70f122
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 | |
|---|---|---|---|
| |||
13909 | 13909 | | |
13910 | 13910 | | |
13911 | 13911 | | |
13912 | | - | |
| 13912 | + | |
| 13913 | + | |
13913 | 13914 | | |
13914 | 13915 | | |
13915 | 13916 | | |
13916 | | - | |
| 13917 | + | |
| 13918 | + | |
| 13919 | + | |
| 13920 | + | |
| 13921 | + | |
13917 | 13922 | | |
13918 | 13923 | | |
13919 | 13924 | | |
| |||
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