Opcodes with 32-bit pair vs 64-bit register

Mark, did you get anywhere with this? We have a similar issue, where a family of otherwise-identical instructions operates on different register classes depending on a non-static property – functional unit selection in our case.

I started to head down the path of using multidefs but quickly abandoned that. I had envisioned a MachineOperand that would hold the functional unit assignment, and having a pass that used that to set up register constraints rather than getting them from the static tables.

For your case, can you not simply define the two 32-bit halves as subregisters of the 64-bit class?

-Alan

Have you tried working with AltOrders (see Target.td)?

It seems suitable for your needs.

Regards,

Dvir