[PATCH] D47309: [AArch64][SVE] Asm: Support for DUP (immediate) instructions.

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 24 00:14:08 PDT 2018


sdesmalen created this revision.
sdesmalen added reviewers: rengolin, fhahn, samparker, SjoerdMeijer.
Herald added a reviewer: javed.absar.
Herald added subscribers: rkruppe, kristof.beyls, tschuett.

Unpredicated copy of optionally-shifted immediate to SVE vector,
along with MOV-aliases.

This patch contains parsing and printing support for
cpy_imm8_opt_lsl_(i8|i16|i32|i64). This operand allows a signed value in
the range -128 to +127. For element widths of 16 bits or higher it may
also be a signed multiple of 256 in the range -32768 to +32512.
For element-width of 8 bits a range of -128 to 255 is accepted, since a copy
of a byte can be considered either signed/unsigned.

Note: This patch renames tryParseAddSubImm() -> tryParseImmWithOptionalShift()
and moves the behaviour of trying to shift a plain immediate by an allowed
shift-value to its addImmWithOptionalShiftOperands() method, so that the
parsing itself is generic and allows immediates from multiple shifted operands.
This is done because an immediate can be divisible by both shifted operands.


https://reviews.llvm.org/D47309

Files:
  lib/Target/AArch64/AArch64InstrFormats.td
  lib/Target/AArch64/AArch64SVEInstrInfo.td
  lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
  lib/Target/AArch64/Disassembler/AArch64Disassembler.cpp
  lib/Target/AArch64/InstPrinter/AArch64InstPrinter.cpp
  lib/Target/AArch64/InstPrinter/AArch64InstPrinter.h
  lib/Target/AArch64/MCTargetDesc/AArch64AddressingModes.h
  lib/Target/AArch64/MCTargetDesc/AArch64MCCodeEmitter.cpp
  lib/Target/AArch64/SVEInstrFormats.td
  test/MC/AArch64/SVE/dup-diagnostics.s
  test/MC/AArch64/SVE/dup.s
  test/MC/AArch64/SVE/mov-diagnostics.s
  test/MC/AArch64/SVE/mov.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47309.148343.patch
Type: text/x-patch
Size: 39586 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180524/64eae898/attachment-0001.bin>


More information about the llvm-commits mailing list