Commit 632cbee
authored
[RISCV] Use VM and VMNoV0 for "vr" and "vd" inline asm constraints with mask type. (#171235)
The inline assembly handling in SelectionDAG uses the first type
for the register class as the type at the input/output of the
inlineassembly. If this isn't the type for the surrounding DAG,
it needs to be converted.
nxv8i8 is the first type for the VR and VRNoV0 register classes.
So we currently generate insert/extract_subvector and bitcasts to
convert to/from nxv8i8.
I believe some of the special casing we have for this in
splitValueIntoRegisterParts and joinRegisterPartsIntoValue is causing
us to also generate incorrect code for arguments with nxv16i4 types
that should be any extended to nxv16i8. Instead we widen them to nxv32i4
and bitcast to nxv16i8.
This patch uses VM and VMNoV0 for masks which has nxv64i1 as their
first type. This means we will only emit an insert/extract_subvector
without any bitcasts. This will allow me to fix
splitValueIntoRegisterParts and joinRegisterPartsIntoValue to fix the
nxv16i4 argument issue without breaking inline assembly.
I may need to add more register classes to cover fractional LMULs,
but I'm not sure yet.1 parent 2e16f24 commit 632cbee
1 file changed
+17
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24323 | 24323 | | |
24324 | 24324 | | |
24325 | 24325 | | |
| 24326 | + | |
24326 | 24327 | | |
24327 | | - | |
24328 | | - | |
24329 | | - | |
24330 | | - | |
24331 | | - | |
24332 | | - | |
24333 | | - | |
| 24328 | + | |
| 24329 | + | |
| 24330 | + | |
| 24331 | + | |
| 24332 | + | |
| 24333 | + | |
| 24334 | + | |
24334 | 24335 | | |
24335 | 24336 | | |
24336 | 24337 | | |
| |||
24341 | 24342 | | |
24342 | 24343 | | |
24343 | 24344 | | |
| 24345 | + | |
24344 | 24346 | | |
24345 | | - | |
24346 | | - | |
24347 | | - | |
24348 | | - | |
24349 | | - | |
24350 | | - | |
24351 | | - | |
24352 | | - | |
| 24347 | + | |
| 24348 | + | |
| 24349 | + | |
| 24350 | + | |
| 24351 | + | |
| 24352 | + | |
| 24353 | + | |
| 24354 | + | |
24353 | 24355 | | |
24354 | 24356 | | |
24355 | 24357 | | |
| |||
0 commit comments