Commit 03ceb26
authored
[RISCV] Fix incorrect slide offset when using vnsrl to de-interleave (#132123)
Given this shuffle:
```
shufflevector <8 x i8> %0, <8 x i8> %1, <8 x i32> <i32 0, i32 4, i32 8, i32 12, i32 undef, i32 undef, i32 undef, i32 undef>
```
#127272 lowers it with a bunch of vnsrl. If we describe the result in
terms of the shuffle mask, we expect:
```
<0, 4, 8, 12, u, u, u, u>
```
but we actually got:
```
<0, 4, u, u, 8, 12, u, u>
```
for factor larger than 2. This is caused by `CONCAT_VECTORS` on
incorrect (sub) vector types. This patch fixes the said issue by
building an aggregate vector with the correct sub vector types.
Fix #1320711 parent b231f6f commit 03ceb26
File tree
2 files changed
+21
-6
lines changed- llvm
- lib/Target/RISCV
- test/CodeGen/RISCV/rvv
2 files changed
+21
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5545 | 5545 | | |
5546 | 5546 | | |
5547 | 5547 | | |
5548 | | - | |
| 5548 | + | |
| 5549 | + | |
| 5550 | + | |
| 5551 | + | |
| 5552 | + | |
5549 | 5553 | | |
5550 | | - | |
| 5554 | + | |
5551 | 5555 | | |
5552 | | - | |
5553 | | - | |
| 5556 | + | |
| 5557 | + | |
| 5558 | + | |
| 5559 | + | |
| 5560 | + | |
| 5561 | + | |
| 5562 | + | |
| 5563 | + | |
| 5564 | + | |
| 5565 | + | |
| 5566 | + | |
5554 | 5567 | | |
5555 | 5568 | | |
5556 | 5569 | | |
| |||
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
378 | 378 | | |
379 | 379 | | |
380 | 380 | | |
| 381 | + | |
| 382 | + | |
381 | 383 | | |
382 | | - | |
383 | 384 | | |
384 | 385 | | |
385 | 386 | | |
| |||
402 | 403 | | |
403 | 404 | | |
404 | 405 | | |
| 406 | + | |
| 407 | + | |
405 | 408 | | |
406 | | - | |
407 | 409 | | |
408 | 410 | | |
409 | 411 | | |
| |||
0 commit comments