[PATCH] D94776: [AArch64][SVE] Asm: Fix supported immediates for DUP/CPY

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 15 06:42:59 PST 2021


sdesmalen created this revision.
sdesmalen added reviewers: momchil.velikov, rsandifo-arm, c-rhodes.
Herald added subscribers: NickHung, psnobl, hiraditya, kristof.beyls, tschuett.
Herald added a reviewer: efriedma.
sdesmalen requested review of this revision.
Herald added a project: LLVM.

This patch fixes an issue in the implementation of DUP/CPY where certain
immediates were not accepted. Immediates should be interpreted as a two's
complement encoding of a value that fits the number of bits of the element
type.

       mov z0.b, p0/z, #127
  <=>  mov z0.b, p0/z, #-129
  <=>  mov z0.b, p0/z, #0xffffffffffffff7f

This behaviour is in line with the GNU assembler.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D94776

Files:
  llvm/lib/Target/AArch64/MCTargetDesc/AArch64AddressingModes.h
  llvm/test/MC/AArch64/SVE/cpy-diagnostics.s
  llvm/test/MC/AArch64/SVE/cpy.s
  llvm/test/MC/AArch64/SVE/dup-diagnostics.s
  llvm/test/MC/AArch64/SVE/dup.s
  llvm/test/MC/AArch64/SVE/mov-diagnostics.s
  llvm/test/MC/AArch64/SVE/mov.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D94776.316933.patch
Type: text/x-patch
Size: 13236 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210115/adde5456/attachment.bin>


More information about the llvm-commits mailing list