Commit c3098af
committed
[RISCV] Support llvm.masked.expandload intrinsic
We can use `viota.m` + indexed load to synthesize expanding load:
```
%res = llvm.masked.expandload(%ptr, %mask, %passthru)
->
%index = viota %mask
if elt_size > 8:
%index = vsll.vi %index, log2(elt_size), %mask
%res = vluxei<n> %passthru, %ptr, %index, %mask
```
And if `%mask` is all ones, we can lower expanding load to an normal
unmasked load.
Fixes #1019141 parent fe85566 commit c3098af
File tree
6 files changed
+1768
-1786
lines changed- llvm
- lib/Target/RISCV
- test/CodeGen/RISCV/rvv
6 files changed
+1768
-1786
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10733 | 10733 | | |
10734 | 10734 | | |
10735 | 10735 | | |
| 10736 | + | |
10736 | 10737 | | |
10737 | 10738 | | |
10738 | 10739 | | |
| |||
10741 | 10742 | | |
10742 | 10743 | | |
10743 | 10744 | | |
| 10745 | + | |
10744 | 10746 | | |
10745 | 10747 | | |
10746 | 10748 | | |
| |||
10760 | 10762 | | |
10761 | 10763 | | |
10762 | 10764 | | |
10763 | | - | |
10764 | | - | |
| 10765 | + | |
| 10766 | + | |
| 10767 | + | |
| 10768 | + | |
| 10769 | + | |
| 10770 | + | |
| 10771 | + | |
| 10772 | + | |
| 10773 | + | |
| 10774 | + | |
| 10775 | + | |
| 10776 | + | |
| 10777 | + | |
| 10778 | + | |
| 10779 | + | |
| 10780 | + | |
| 10781 | + | |
| 10782 | + | |
| 10783 | + | |
| 10784 | + | |
| 10785 | + | |
10765 | 10786 | | |
10766 | 10787 | | |
10767 | 10788 | | |
10768 | 10789 | | |
10769 | 10790 | | |
10770 | 10791 | | |
10771 | | - | |
| 10792 | + | |
| 10793 | + | |
| 10794 | + | |
10772 | 10795 | | |
| 10796 | + | |
10773 | 10797 | | |
10774 | 10798 | | |
10775 | 10799 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1966 | 1966 | | |
1967 | 1967 | | |
1968 | 1968 | | |
| 1969 | + | |
| 1970 | + | |
| 1971 | + | |
| 1972 | + | |
| 1973 | + | |
| 1974 | + | |
| 1975 | + | |
| 1976 | + | |
| 1977 | + | |
| 1978 | + | |
1969 | 1979 | | |
1970 | 1980 | | |
1971 | 1981 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
| 284 | + | |
| 285 | + | |
284 | 286 | | |
285 | 287 | | |
286 | 288 | | |
| |||
0 commit comments