HomePhabricator

[SystemZ] Allow %r0 in address context for AsmParser

Authored by uweigand on Mar 31 2020, 10:41 AM.

Description

[SystemZ] Allow %r0 in address context for AsmParser

Registers used in any address (as well as in a few other contexts)
have special semantics when a "zero" register is used, which is
why the back-end defines extra register classes ADDR32, ADDR64 etc
to be used to prevent the register allocator from using %r0 there.

However, when writing assembler code "by hand", you sometimes need
to trigger that special semantics. However, currently the AsmParser
will reject %r0 in those places. In some cases it may be possible
to write that instruction differently - but in others it is currently
not possible at all.

This check in AsmParser simply seems overly strict, so this patch
just removes the check completely. This brings the behaviour of
AsmParser in line with the GNU assembler as well.

Bugzilla: https://bugs.llvm.org/show_bug.cgi?id=45092

Details

Committed
uweigandMar 31 2020, 10:48 AM
Parents
rGdc817b2dea9f: [InstCombine] Deduce attributes for aligned_alloc in InstCombine
Branches
Unknown
Tags
Unknown