This is an archive of the discontinued LLVM Phabricator instance.

[TableGen] Treat reg as isolated in reg$foo (but not in ${foo}reg)
ClosedPublic

Authored by foad on Oct 28 2020, 9:31 AM.

Details

Summary

D9844 fixed a problem where the ss suffix in the AsmString "cmp${cc}ss"
was recognised as the X86 SS register, by only recognising a token as a
register name if it is "isolated", i.e. surrounded by separator
characters.

In the AMDGPU backend there are many operands like $clamp which expand
to an optional string " clamp" including the preceding space, so we want
to have AsmStrings including sequences like "vcc$clamp" where vcc is a
register name.

This patch relaxes the rules for an isolated token, to say that it's OK
if the token is immediately followed by a '$'.

Diff Detail

Event Timeline

foad created this revision.Oct 28 2020, 9:31 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 28 2020, 9:31 AM
foad requested review of this revision.Oct 28 2020, 9:31 AM
arsenm accepted this revision.Oct 28 2020, 10:15 AM
This revision is now accepted and ready to land.Oct 28 2020, 10:15 AM
This revision was landed with ongoing or failed builds.Oct 28 2020, 2:49 PM
This revision was automatically updated to reflect the committed changes.