vmr v1,v2 is an alias to vor v1,v2,v2
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Target/PowerPC/PPCInstrVSX.td | ||
---|---|---|
1450 ↗ | (On Diff #85783) | @hfinkel Do you think this is an acceptable way to get this support implemented? Or do you have a preferred suggestion? Maybe some custom handling of the register operand (or even the mnemonic itself) in the Asm parser/printer or something along those lines... Once we decide how we want to approach this, we can add a test case. |
Why did you fold these together? Can we just do the vor -> vmr alias, and then worry about the mfvrd change separately? The vor -> vmr LGTM, so if you can pull these apart, please commit that part.
lib/Target/PowerPC/PPCInstrVSX.td | ||
---|---|---|
1450 ↗ | (On Diff #85783) | One of these should be mfvsrd? |
Yes, we can do them separately. I'll make the necessary changes to this diff. I don't have commit permissions yet, but I'll prepare the vor -> vmr diff.
Why did you fold these together? Can we just do the vor -> vmr alias, and then worry about the mfvrd change separately? The vor -> vmr LGTM, so if you can pull these apart, please commit that part.
Sorry, this is probably my fault. They needed these two extended mnemonics and I recommended they publish just one patch for them.
I'll commit the vor -> vmr patch. @brunoalr please post the mfvrd one separately.
lib/Target/PowerPC/PPCInstrVSX.td | ||
---|---|---|
1450 ↗ | (On Diff #85783) | The asm string that we want to match when parsing asm is mfvrd. However, doing so will produce an instruction with a VR input. So if we also use this alias for printing, we'll print $XT + 32. That's why the zero for the Emit flag. In a way, this is a hack for the InstAlias class. We need to read the input and treat it as a different register class (with different numbering). |
Will commit this as we're all in agreement on the part that remains in this patch now.