[AArch64][SVE2] Use destination register as source register
authorCullen Rhodes <cullen.rhodes@arm.com>
Wed, 31 Jul 2019 08:45:57 +0000 (08:45 +0000)
committerCullen Rhodes <cullen.rhodes@arm.com>
Wed, 31 Jul 2019 08:45:57 +0000 (08:45 +0000)
commite8eb8b9c3adbbe9e8bafcf3f71218ec4a2b9e6eb
tree875bb864113f9bd93aa108f2228761e4f7ea7f22
parentac4869197f89af3b2ae635fb33f1a3059516007d
[AArch64][SVE2] Use destination register as source register

Summary:
This patch fixes a bug in the following instructions that should have been
implemented as destructive. A destructive instruction is an instruction where
one of the source registers also acts as the destination register. Therefore,
the contents of the source register, when the instruction begins execution, are
replaced by the result of the instruction when the instruction completes
execution [1]:

  * SRI/SLI
  * EORBT/EORTB
  * TBX
  * Narrowing top instructions
  * FP convert precision instructions

These changes are non-functional from the assembler/diassembler point-of-view
but are necessary for correct codegen.

[1] https://static.docs.arm.com/ddi0584/ae/DDI0584A_e_SVE_supp_armv8A.pdf

Reviewed By: sdesmalen

Differential Revision: https://reviews.llvm.org/D65389

llvm-svn: 367394
llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
llvm/lib/Target/AArch64/SVEInstrFormats.td