[PATCH] D75428: [MC][ARM] add implicit immediate form for ldrsbt/ldrht/ldrsht

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 2 15:53:50 PST 2020


efriedma added a comment.

I spent a couple minutes experimenting; the following "works":

  def : InstAlias<"ldrsbt${q} $Rt, $Rn2, $Rn", (LDRSBTi GPR:$Rt, GPR:$Rn2, addr_offset_none:$Rn, 256, pred:$q)>, Requires<[IsARM]>;

The immediate doesn't pose a problem, as far as I can tell.

The problem, of course, is that this syntax isn't right.  And there isn't any way to make it right.  For instructions, we do some magic with "Constraints" to infer the second output register, but that currently doesn't work for aliases.

So I guess this approach is fine.  (Of course, there's still the `#0` vs `#-0` issue.)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75428/new/

https://reviews.llvm.org/D75428





More information about the llvm-commits mailing list