Add RVP vector types to GPR and explict type to existing codegen patterns which couldn't infer all types.
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Surely some of this can be inferred by TableGen? This is rather disruptive (especially with my downstream hat on...).
Tablegen was inferring all of these because GPR only contained 1 type in each HwMode. Once you add other types, it can't infer anymore. For RISCVISD nodes we can put XLenVT into the SDTypeProfiles, but for anything using target independent SDNodes, the SDTypeProfiles aren't strong enough. Most of the target independent nodes work on vectors so tablegen doesn't know if you're trying to pattern match vectors or scalars.
I asked for this change rather than adding a P specific GPR regclass because I don't think we should have 2 register classes with identical spill and size information and different legal type lists. MCRegisterInfo ends up thinking they are subclasses of each other which is kind of odd.
Thanks for interpretation.
I added explicit type one by one to make sure it's type is unable to be inferred by TableGen.
Commandeering so I can rebase this after making changes to RISCVInstrInfoB.td that reduce the size of this patch.
RISCVInstrInfoB.td makes more use of PatGpr* now so some of the changes are no longer needed.
I think it's worth having the whole stack ready before committing this in case later patches motivate changes to this one.
Can we commit the parts of this that aren't really P specific changes so they don't bit rot. Especially the changes to the V extension files.
I guess, though they don't make a huge deal of sense without P even if they're notionally not P-specific, and those could still bit-rot in the tree until P lands
I should probably just add a PatFrag to the V files and stop repeating the same copy pasted (XLenVT (VLOp (XLenVT GPR:$vl))) everywhere
This should only need XLenVT on either $rs1 or $rs2. You don't need it on both.