[PATCH] D40030: [AArch64][TableGen] Skip tied result operands for InstAlias

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 14 08:26:37 PST 2017


sdesmalen created this revision.
Herald added subscribers: kristof.beyls, javed.absar, aemerson.

This patch fixes an issue so that the right alias is printed when the instruction has tied operands. It checks the number of operands in the resulting instruction as opposed to the alias, and then skips over tied operands that should not be printed in the alias.

This allows to generate the preferred assembly syntax for the AArch64 'ins' instruction, which should always be displayed as 'mov' according to the ARM Architecture Reference Manual. Several unit tests have changed as a result, but only to reflect the preferred disassembly. Some other InstAlias patterns (movk/bic/orr) needed a slight adjustment to stop them becoming the default and breaking other unit tests.

Please note that the patch is mostly the same as https://reviews.llvm.org/D29219 which was reverted because of an issue found when running TableGen with the Address Sanitizer. That issue has been addressed in this iteration of the patch.


https://reviews.llvm.org/D40030

Files:
  lib/Target/AArch64/AArch64InstrInfo.td
  test/CodeGen/AArch64/arm64-AdvSIMD-Scalar.ll
  test/CodeGen/AArch64/arm64-build-vector.ll
  test/CodeGen/AArch64/arm64-dup.ll
  test/CodeGen/AArch64/arm64-indexed-vector-ldst.ll
  test/CodeGen/AArch64/arm64-neon-copy.ll
  test/CodeGen/AArch64/arm64-smaxv.ll
  test/CodeGen/AArch64/arm64-sminv.ll
  test/CodeGen/AArch64/arm64-stp.ll
  test/CodeGen/AArch64/arm64-umaxv.ll
  test/CodeGen/AArch64/arm64-uminv.ll
  test/CodeGen/AArch64/arm64-vaddv.ll
  test/CodeGen/AArch64/arm64-vcombine.ll
  test/CodeGen/AArch64/arm64-vector-insertion.ll
  test/CodeGen/AArch64/bitreverse.ll
  test/CodeGen/AArch64/concat_vector-scalar-combine.ll
  test/CodeGen/AArch64/fp16-v16-instructions.ll
  test/CodeGen/AArch64/fp16-v4-instructions.ll
  test/CodeGen/AArch64/fp16-v8-instructions.ll
  test/CodeGen/AArch64/fp16-vector-shuffle.ll
  test/CodeGen/AArch64/vector-fcopysign.ll
  test/MC/AArch64/arm64-advsimd.s
  test/MC/Disassembler/AArch64/arm64-advsimd.txt
  utils/TableGen/AsmWriterEmitter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40030.122848.patch
Type: text/x-patch
Size: 63792 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171114/0008620d/attachment-0001.bin>


More information about the llvm-commits mailing list