This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Change the MC names for VMAXNM/VMINNM.
ClosedPublic

Authored by simon_tatham on Apr 15 2019, 5:58 AM.

Details

Summary

Now the NEON ones have a prefix "NEON_", and the VFP ones have a
prefix "VFP_". This is so that the regex in ARMScheduleA57.td can be
made to match both of _those_ classes of VMAXNM without also matching
the MVE ones that are going to be introduced soon. NFCI.

Event Timeline

simon_tatham created this revision.Apr 15 2019, 5:58 AM

What goes wrong if we don't do this? Does TableGen complain about schedules containing unsupported instructions or something?

It's true that during internal development we implemented this rename before the later change that adds some UnsupportedFeatures to the same schedule model which should rule out the MVE VMAXNM/VMINNM instructions in any case.

But if I revert the rename, it still fails, apparently before even getting as far as checking UnsupportedFeatures. The Tablegen error is

llvm/lib/Target/ARM/ARMScheduleA57.td:755:1: error: Overlapping InstRW def VMAXNMAVf16 also matches (instregex "VMAX", "VMIN")
def : InstRW<[A57Write_5cyc_1V], (instregex "VMAX", "VMIN")>;
^
t.p.northover accepted this revision.Apr 16 2019, 2:19 AM

OK, it's a bit ugly but pretty limited in scope so I think we can live with it. LGTM.

This revision is now accepted and ready to land.Apr 16 2019, 2:19 AM
This revision was automatically updated to reflect the committed changes.