This is an archive of the discontinued LLVM Phabricator instance.

[ARM][ASMParser] Refuse equal RdHi/RdLo for s/umlal, smlsl, s/umull, umaal
ClosedPublic

Authored by Pierre-vh on Feb 6 2020, 4:28 AM.

Diff Detail

Event Timeline

Pierre-vh created this revision.Feb 6 2020, 4:28 AM
DavidSpickett edited reviewers, added: dmgreen; removed: greened.Feb 6 2020, 5:01 AM
DavidSpickett added inline comments.Feb 6 2020, 5:21 AM
llvm/test/MC/ARM/equal-rdhi-rdlo-diagnostics.s
6

Label not needed.

ostannard added inline comments.Feb 6 2020, 6:24 AM
llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
7978

You should just be able to compare RdHi and RdLo directly here, none of these registers have any sub-registers. Doing it this was doesn't really make sense, because isSubRegisterEq is an asymmetric operation.

llvm/test/MC/ARM/equal-rdhi-rdlo-diagnostics.s
2

You can redirect the stderr of the llvm-mc command to stdout with 2>&1, and pipe it into FIleCheck without needing a temporary file.

8

It's better to include the line number (using @LINE) of the error message in the check line, so that if one of these fails FileCheck will point to the failing one. The other test in this patch (v8_IT_manual.s) is a good example.

Pierre-vh updated this revision to Diff 242912.Feb 6 2020, 8:11 AM

I've updated the patch in accordance with your comments

Pierre-vh marked 4 inline comments as done.Feb 6 2020, 8:19 AM
This revision is now accepted and ready to land.Feb 6 2020, 8:27 AM
This revision was automatically updated to reflect the committed changes.