[PATCH] D47328: [AArch64][SVE] Asm: Support for DUPM (masked immediate) instruction.
Sander de Smalen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 31 07:30:13 PDT 2018
sdesmalen added inline comments.
================
Comment at: test/MC/AArch64/SVE/mov.s:185
+mov z0.h, #32768
+// CHECK-INST: dupm z0.h, #0x8000
+// CHECK-ENCODING: [0x00,0x0c,0xc0,0x05]
----------------
sdesmalen wrote:
> SjoerdMeijer wrote:
> > just checking: do we expect dupm here?
> Yes, I think so:
> mov z0.h, #0x8000
> and
> dupm z0.h, #0x8000
> are equivalent and according to the SVE specification MOV is the preferred alias iff SVEMoveMaskPreferred evaluates to true. Since the logical immediate for dupm z0.h, #0x8000 is 0x8000800080008000, the condition as shown below from the pseudo code evaluates to true, causing SVEMoveMaskPreferred to return false:
> // Check for 'xy00xy00xy00xy00'
> if imm<63:32> == imm<31:0> && imm<31:16> == imm<15:0> then
> return FALSE;
So I double checked this and GAS assembles this to the DUP instruction, which has mov-alias (mov z0.h, #-32768). I will follow this up with a separate patch to fix it.
https://reviews.llvm.org/D47328
More information about the llvm-commits
mailing list