Copy the legalization rules from SelectionDAG:
-widenScalar using anyext
-narrowScalar using intermediate merges
-scalarize/fewerElements using unmerge
-moreElements using G_IMPLICIT_DEF and insert
Add G_FREEZE legalization actions to AMDGPULegalizerInfo.
Use the same legalization actions as G_IMPLICIT_DEF.
Depends on D77795.
I've been working on eliminating these somewhat awkward functions that end up producing G_INSERT/G_EXTRACT in odd breakdowns instead of creating intermediate merges to the requested type. fewerElementsVectorBasic should be pretty close to what this should do? (Although maybe pad with undef is the wrong choice here)