[PATCH] D62675: [ARM] Add a batch of MVE floating-point instructions.

Simon Tatham via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 21 01:46:11 PDT 2019


simon_tatham marked 2 inline comments as done.
simon_tatham added inline comments.


================
Comment at: llvm/lib/Target/ARM/ARMInstrInfo.td:464
 
+// vcmla_rot_imm: An integer that encodes a rotate amount. Must be 0, 90, 180, 270.
+def VCMLARotImmAsmOperand : AsmOperandClass {
----------------
ostannard wrote:
> This looks very similar to ComplexRotationOperand, can we re-use that or do these differ in some way?
Apparently we can, and it improves the error messages as well ("complex rotation must be 90 or 270" in place of the all-purpose "invalid operand for instruction").

The semantic difference seems to be that with `ComplexRotationOperand`, the immediate at the `MCOperand` level is a small integer like 0,1,2,3, and the conversion between that and multiples of 90° is done at assembly↔MC conversion time, whereas `VCMLARotImm` stores the immediate in degrees even in the MC representation and translates it at encode/decode time.

Personally I slightly prefer the latter way of doing it, but obviously not enough to make the MVE and NEON implementations deliberately different from each other, now you point it out!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D62675





More information about the llvm-commits mailing list