Commit e858b10
committed
Revert "[SLP]Reduce number of alternate instruction, where possible"
This caused failures such as:
Instruction does not dominate all uses!
%29 = insertelement <8 x i64> %28, i64 %xor6.i.5, i64 6
%17 = shufflevector <8 x i64> %29, <8 x i64> poison, <6 x i32> <i32 1, i32 2, i32 3, i32 4, i32 5, i32 6>
see comment on llvm/llvm-project#123360
> Previous version was reviewed here llvm/llvm-project#123360
> It is mostly the same, adjusted after graph-to-tree transformation
>
> Patch tries to remove wide alternate operations.
> Currently SLP vectorizer emits something like this:
> ```
> %0 = add i32
> %1 = sub i32
> %2 = add i32
> %3 = sub i32
> %4 = add i32
> %5 = sub i32
> %6 = add i32
> %7 = sub i32
>
> transformes to
>
> %v1 = add <8 x i32>
> %v2 = sub <8 x i32>
> %res = shuffle %v1, %v2, <0, 9, 2, 11, 4, 13, 6, 15>
> ```
> i.e. half of the results are just unused. This leads to increased
> register pressure and potentially doubles number of operations.
>
> Patch introduces SplitVectorize mode, where it splits the operations by
> opcodes and produces instead something like this:
> ```
> %v1 = add <4 x i32>
> %v2 = sub <4 x i32>
> %res = shuffle %v1, %v2, <0, 4, 1, 5, 2, 6, 3, 7>
> ```
> It allows to improve the performance by reducing number of ops. Also, it
> turns on some other improvements, like improved graph reordering.
>
> [...]
This reverts commit 9d37e61 as well as
the follow-up commit 72bb0a9.1 parent b9d6b62 commit e858b10
File tree
34 files changed
+781
-2731
lines changed- llvm
- include/llvm/Analysis
- lib
- Analysis
- Target
- RISCV
- X86
- Transforms/Vectorize
- test
- CodeGen/AMDGPU
- Transforms/SLPVectorizer
- AArch64
- RISCV
- X86
34 files changed
+781
-2731
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1771 | 1771 | | |
1772 | 1772 | | |
1773 | 1773 | | |
1774 | | - | |
1775 | | - | |
1776 | | - | |
1777 | | - | |
1778 | 1774 | | |
1779 | 1775 | | |
1780 | 1776 | | |
| |||
2329 | 2325 | | |
2330 | 2326 | | |
2331 | 2327 | | |
2332 | | - | |
2333 | 2328 | | |
2334 | 2329 | | |
2335 | 2330 | | |
| |||
3140 | 3135 | | |
3141 | 3136 | | |
3142 | 3137 | | |
3143 | | - | |
3144 | | - | |
3145 | | - | |
3146 | 3138 | | |
3147 | 3139 | | |
3148 | 3140 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1007 | 1007 | | |
1008 | 1008 | | |
1009 | 1009 | | |
1010 | | - | |
1011 | 1010 | | |
1012 | 1011 | | |
1013 | 1012 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1384 | 1384 | | |
1385 | 1385 | | |
1386 | 1386 | | |
1387 | | - | |
1388 | | - | |
1389 | | - | |
1390 | | - | |
1391 | 1387 | | |
1392 | 1388 | | |
1393 | 1389 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
129 | | - | |
130 | 128 | | |
131 | 129 | | |
132 | 130 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
292 | 292 | | |
293 | 293 | | |
294 | 294 | | |
295 | | - | |
296 | 295 | | |
297 | 296 | | |
298 | 297 | | |
| |||
0 commit comments