This is an archive of the discontinued LLVM Phabricator instance.

AArch64AsmParser: don't try to parse “[1]” for non-vector register operands
ClosedPublic

Authored by SjoerdMeijer on Feb 20 2017, 7:05 AM.

Details

Summary

Hi Tim,
Do you think we can remove this code? It is not covered by tests, i.e. it never gets executed. But more importantly, it tries to parse “[1]” for non-vector register operands but I don't think that there are any instructions allowing this. The comments are suggesting FMOV, but this accepts [1] only for vector operands.
Cheers,
Sjoerd.

Diff Detail

Repository
rL LLVM

Event Timeline

SjoerdMeijer created this revision.Feb 20 2017, 7:05 AM
olista01 edited edge metadata.Feb 20 2017, 7:19 AM

It looks like the comment about FMOVXDhighr is out of date, as that instruction now takes a VectorIndex1 operand, rather than having the "[1]" as part of the assembly string. I think you should still do a full MC Hammer run on AArch64 to check there are no other instructions we've missed.

t.p.northover accepted this revision.Feb 20 2017, 3:28 PM

Oh, nice! If you've got MC Hammer handy go for it, but I agree this looks pretty safe to me. I can't find any assembly that really has "[1]" in the .td files.

This revision is now accepted and ready to land.Feb 20 2017, 3:28 PM

I've ran MC Hammer and he was happy with it. Will commit.

This revision was automatically updated to reflect the committed changes.