This is an archive of the discontinued LLVM Phabricator instance.

[TableGen][RISCV] Add InstAliases with zero_reg to cover unmasked vnot.v, vncvt.x.x.w, vneg.v, etc.
ClosedPublic

Authored by craig.topper on Mar 11 2022, 2:43 PM.

Details

Summary

The mask being NoRegister prevented the existing aliases from matching
since NoRegister isn't in the VMV0 register class.

To workaround this I've added new aliases that look for zero_reg.
I had to motify tablegen to generate matching code for zero_reg.
And as a consequence, I had to change the EmitPriority for an ARM
alias that used zero_reg that started printing.

Diff Detail

Event Timeline

craig.topper created this revision.Mar 11 2022, 2:43 PM
craig.topper requested review of this revision.Mar 11 2022, 2:43 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 11 2022, 2:43 PM

Neat. I didn't think the fix was that simple when I looked way back when. I don't know if you fancy us resurrecting D92228 to have an additional test case?

frasercrmck accepted this revision.Mar 22 2022, 12:56 AM

LGTM, thanks!

This revision is now accepted and ready to land.Mar 22 2022, 12:56 AM
This revision was landed with ongoing or failed builds.Mar 22 2022, 10:15 AM
This revision was automatically updated to reflect the committed changes.