Commit 21871bb
authored
[RISCV] Add fractional LMUL register classes for inline assembly. (#171278)
Inline assembly uses the first type from the register class to
connect to the rest of SelectionDAG. By adding fractional LMUL
register classes, we can ensure that this type is the size of the
types we use for fractional LMUL in the rest of SelectionDAG.
This allows us to remove some of the handling we had in
splitValueIntoRegisterParts/joinRegisterPartsIntoValue. This code
was incorrectly handling v16i4 arguments/returns which should be
any_extend to v16i8 to match type legalization. Instead we widened
v16i4 -> v32i4 then bitcasted to v16i8. This merged pairs of i4
elements into an i8 element instead of keeping them as separate
elements that have been extended to i8.
This is an alternative to #171243.
Fixes #171141.1 parent 0bac8f1 commit 21871bb
File tree
4 files changed
+59
-27
lines changed- llvm
- lib/Target/RISCV
- test/CodeGen/RISCV/rvv
4 files changed
+59
-27
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24323 | 24323 | | |
24324 | 24324 | | |
24325 | 24325 | | |
24326 | | - | |
| 24326 | + | |
| 24327 | + | |
24327 | 24328 | | |
24328 | | - | |
| 24329 | + | |
| 24330 | + | |
24329 | 24331 | | |
24330 | 24332 | | |
24331 | 24333 | | |
| |||
24342 | 24344 | | |
24343 | 24345 | | |
24344 | 24346 | | |
24345 | | - | |
| 24347 | + | |
| 24348 | + | |
24346 | 24349 | | |
24347 | | - | |
24348 | | - | |
24349 | | - | |
24350 | | - | |
24351 | | - | |
24352 | | - | |
24353 | | - | |
24354 | | - | |
| 24350 | + | |
| 24351 | + | |
| 24352 | + | |
| 24353 | + | |
| 24354 | + | |
| 24355 | + | |
| 24356 | + | |
| 24357 | + | |
| 24358 | + | |
| 24359 | + | |
24355 | 24360 | | |
24356 | 24361 | | |
24357 | 24362 | | |
| |||
25229 | 25234 | | |
25230 | 25235 | | |
25231 | 25236 | | |
25232 | | - | |
25233 | | - | |
25234 | | - | |
25235 | | - | |
25236 | | - | |
25237 | | - | |
| 25237 | + | |
| 25238 | + | |
| 25239 | + | |
| 25240 | + | |
25238 | 25241 | | |
25239 | 25242 | | |
25240 | 25243 | | |
| |||
25304 | 25307 | | |
25305 | 25308 | | |
25306 | 25309 | | |
25307 | | - | |
25308 | | - | |
| 25310 | + | |
25309 | 25311 | | |
25310 | 25312 | | |
25311 | 25313 | | |
25312 | 25314 | | |
25313 | | - | |
25314 | | - | |
25315 | | - | |
25316 | | - | |
25317 | | - | |
| 25315 | + | |
| 25316 | + | |
| 25317 | + | |
| 25318 | + | |
| 25319 | + | |
| 25320 | + | |
25318 | 25321 | | |
25319 | 25322 | | |
25320 | 25323 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
766 | 766 | | |
767 | 767 | | |
768 | 768 | | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
769 | 776 | | |
770 | 777 | | |
771 | 778 | | |
| |||
809 | 816 | | |
810 | 817 | | |
811 | 818 | | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
812 | 829 | | |
813 | 830 | | |
814 | 831 | | |
815 | 832 | | |
816 | | - | |
| 833 | + | |
817 | 834 | | |
818 | 835 | | |
819 | 836 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| |||
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
287 | | - | |
| 287 | + | |
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
| |||
0 commit comments