[llvm] r361795 - [AArch64][SVE2] Asm: support SVE2 Misc Group
Cullen Rhodes via llvm-commits
llvm-commits at lists.llvm.org
Tue May 28 01:42:23 PDT 2019
Author: c-rhodes
Date: Tue May 28 01:42:22 2019
New Revision: 361795
URL: http://llvm.org/viewvc/llvm-project?rev=361795&view=rev
Log:
[AArch64][SVE2] Asm: support SVE2 Misc Group
Summary:
Patch adds support for the following instructions:
SVE2 bitwise exclusive-or interleaved:
* EORBT, EORTB
SVE2 bitwise permute:
* BEXT, BDEP, BGRP
SVE2 bitwise shift left long:
* SSHLLB, SSHLLT, USHLLB, USHLLT
SVE2 integer add/subtract interleaved long:
* SADDLBT, SSUBLBT, SSUBLTB
BDEP, BEXT and BGRP are enabled with SVE2 feature +bitperm, all other
instructions in this group are enabled with +sve2.
Reviewed By: chill
Differential Revision: https://reviews.llvm.org/D62304
Added:
llvm/trunk/test/MC/AArch64/SVE2/bdep-diagnostics.s
llvm/trunk/test/MC/AArch64/SVE2/bdep.s
llvm/trunk/test/MC/AArch64/SVE2/bext-diagnostics.s
llvm/trunk/test/MC/AArch64/SVE2/bext.s
llvm/trunk/test/MC/AArch64/SVE2/bgrp-diagnostics.s
llvm/trunk/test/MC/AArch64/SVE2/bgrp.s
llvm/trunk/test/MC/AArch64/SVE2/eorbt-diagnostics.s
llvm/trunk/test/MC/AArch64/SVE2/eorbt.s
llvm/trunk/test/MC/AArch64/SVE2/eortb-diagnostics.s
llvm/trunk/test/MC/AArch64/SVE2/eortb.s
llvm/trunk/test/MC/AArch64/SVE2/saddlbt-diagnostics.s
llvm/trunk/test/MC/AArch64/SVE2/saddlbt.s
llvm/trunk/test/MC/AArch64/SVE2/sshllb-diagnostics.s
llvm/trunk/test/MC/AArch64/SVE2/sshllb.s
llvm/trunk/test/MC/AArch64/SVE2/sshllt-diagnostics.s
llvm/trunk/test/MC/AArch64/SVE2/sshllt.s
llvm/trunk/test/MC/AArch64/SVE2/ssublbt-diagnostics.s
llvm/trunk/test/MC/AArch64/SVE2/ssublbt.s
llvm/trunk/test/MC/AArch64/SVE2/ssubltb-diagnostics.s
llvm/trunk/test/MC/AArch64/SVE2/ssubltb.s
llvm/trunk/test/MC/AArch64/SVE2/ushllb-diagnostics.s
llvm/trunk/test/MC/AArch64/SVE2/ushllb.s
llvm/trunk/test/MC/AArch64/SVE2/ushllt-diagnostics.s
llvm/trunk/test/MC/AArch64/SVE2/ushllt.s
Modified:
llvm/trunk/lib/Target/AArch64/AArch64SVEInstrInfo.td
llvm/trunk/lib/Target/AArch64/SVEInstrFormats.td
Modified: llvm/trunk/lib/Target/AArch64/AArch64SVEInstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64SVEInstrInfo.td?rev=361795&r1=361794&r2=361795&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AArch64/AArch64SVEInstrInfo.td (original)
+++ llvm/trunk/lib/Target/AArch64/AArch64SVEInstrInfo.td Tue May 28 01:42:22 2019
@@ -1268,6 +1268,21 @@ let Predicates = [HasSVE2] in {
defm MATCH_PPzZZ : sve2_char_match<0b0, "match">;
defm NMATCH_PPzZZ : sve2_char_match<0b1, "nmatch">;
+ // SVE2 bitwise exclusive-or interleaved
+ defm EORBT_ZZZ : sve2_bitwise_xor_interleaved<0b0, "eorbt">;
+ defm EORTB_ZZZ : sve2_bitwise_xor_interleaved<0b1, "eortb">;
+
+ // SVE2 bitwise shift left long
+ defm SSHLLB_ZZI : sve2_bitwise_shift_left_long<0b00, "sshllb">;
+ defm SSHLLT_ZZI : sve2_bitwise_shift_left_long<0b01, "sshllt">;
+ defm USHLLB_ZZI : sve2_bitwise_shift_left_long<0b10, "ushllb">;
+ defm USHLLT_ZZI : sve2_bitwise_shift_left_long<0b11, "ushllt">;
+
+ // SVE2 integer add/subtract interleaved long
+ defm SADDLBT_ZZZ : sve2_misc_int_addsub_long_interleaved<0b00, "saddlbt">;
+ defm SSUBLBT_ZZZ : sve2_misc_int_addsub_long_interleaved<0b10, "ssublbt">;
+ defm SSUBLTB_ZZZ : sve2_misc_int_addsub_long_interleaved<0b11, "ssubltb">;
+
// Predicated shifts
defm SQSHL_ZPmI : sve_int_bin_pred_shift_imm_left< 0b0110, "sqshl">;
defm UQSHL_ZPmI : sve_int_bin_pred_shift_imm_left< 0b0111, "uqshl">;
@@ -1285,3 +1300,10 @@ let Predicates = [HasSVE2AES] in {
def PMULLT_ZZZ_Q : sve2_wide_int_arith<0b00, 0b11011, "pmullt",
ZPR128, ZPR64, ZPR64>;
}
+
+let Predicates = [HasSVE2BitPerm] in {
+ // SVE2 bitwise permute
+ defm BEXT_ZZZ : sve2_misc_bitwise<0b1100, "bext">;
+ defm BDEP_ZZZ : sve2_misc_bitwise<0b1101, "bdep">;
+ defm BGRP_ZZZ : sve2_misc_bitwise<0b1110, "bgrp">;
+}
Modified: llvm/trunk/lib/Target/AArch64/SVEInstrFormats.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/SVEInstrFormats.td?rev=361795&r1=361794&r2=361795&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AArch64/SVEInstrFormats.td (original)
+++ llvm/trunk/lib/Target/AArch64/SVEInstrFormats.td Tue May 28 01:42:22 2019
@@ -2192,6 +2192,82 @@ multiclass sve2_pmul_long<bits<1> opc, s
}
//===----------------------------------------------------------------------===//
+// SVE2 Misc Group
+//===----------------------------------------------------------------------===//
+
+class sve2_misc<bits<2> sz, bits<4> opc, string asm,
+ ZPRRegOp zprty1, ZPRRegOp zprty2>
+: I<(outs zprty1:$Zd), (ins zprty2:$Zn, zprty2:$Zm),
+ asm, "\t$Zd, $Zn, $Zm", "", []>, Sched<[]> {
+ bits<5> Zd;
+ bits<5> Zn;
+ bits<5> Zm;
+ let Inst{31-24} = 0b01000101;
+ let Inst{23-22} = sz;
+ let Inst{21} = 0b0;
+ let Inst{20-16} = Zm;
+ let Inst{15-14} = 0b10;
+ let Inst{13-10} = opc;
+ let Inst{9-5} = Zn;
+ let Inst{4-0} = Zd;
+}
+
+multiclass sve2_misc_bitwise<bits<4> opc, string asm> {
+ def _B : sve2_misc<0b00, opc, asm, ZPR8, ZPR8>;
+ def _H : sve2_misc<0b01, opc, asm, ZPR16, ZPR16>;
+ def _S : sve2_misc<0b10, opc, asm, ZPR32, ZPR32>;
+ def _D : sve2_misc<0b11, opc, asm, ZPR64, ZPR64>;
+}
+
+multiclass sve2_bitwise_xor_interleaved<bit opc, string asm> {
+ let DestructiveInstType = Destructive, ElementSize = ElementSizeNone in {
+ def _B : sve2_misc<0b00, { 0b010, opc }, asm, ZPR8, ZPR8>;
+ def _H : sve2_misc<0b01, { 0b010, opc }, asm, ZPR16, ZPR16>;
+ def _S : sve2_misc<0b10, { 0b010, opc }, asm, ZPR32, ZPR32>;
+ def _D : sve2_misc<0b11, { 0b010, opc }, asm, ZPR64, ZPR64>;
+ }
+}
+
+multiclass sve2_misc_int_addsub_long_interleaved<bits<2> opc, string asm> {
+ def _H : sve2_misc<0b01, { 0b00, opc }, asm, ZPR16, ZPR8>;
+ def _S : sve2_misc<0b10, { 0b00, opc }, asm, ZPR32, ZPR16>;
+ def _D : sve2_misc<0b11, { 0b00, opc }, asm, ZPR64, ZPR32>;
+}
+
+class sve2_bitwise_shift_left_long<bits<3> tsz8_64, bits<2> opc, string asm,
+ ZPRRegOp zprty1, ZPRRegOp zprty2,
+ Operand immtype>
+: I<(outs zprty1:$Zd), (ins zprty2:$Zn, immtype:$imm),
+ asm, "\t$Zd, $Zn, $imm",
+ "", []>, Sched<[]> {
+ bits<5> Zd;
+ bits<5> Zn;
+ bits<5> imm;
+ let Inst{31-23} = 0b010001010;
+ let Inst{22} = tsz8_64{2};
+ let Inst{21} = 0b0;
+ let Inst{20-19} = tsz8_64{1-0};
+ let Inst{18-16} = imm{2-0}; // imm3
+ let Inst{15-12} = 0b1010;
+ let Inst{11-10} = opc;
+ let Inst{9-5} = Zn;
+ let Inst{4-0} = Zd;
+}
+
+multiclass sve2_bitwise_shift_left_long<bits<2> opc, string asm> {
+ def _H : sve2_bitwise_shift_left_long<{0,0,1}, opc, asm,
+ ZPR16, ZPR8, vecshiftL8>;
+ def _S : sve2_bitwise_shift_left_long<{0,1,?}, opc, asm,
+ ZPR32, ZPR16, vecshiftL16> {
+ let Inst{19} = imm{3};
+ }
+ def _D : sve2_bitwise_shift_left_long<{1,?,?}, opc, asm,
+ ZPR64, ZPR32, vecshiftL32> {
+ let Inst{20-19} = imm{4-3};
+ }
+}
+
+//===----------------------------------------------------------------------===//
// SVE2 Accumulate Group
//===----------------------------------------------------------------------===//
Added: llvm/trunk/test/MC/AArch64/SVE2/bdep-diagnostics.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE2/bdep-diagnostics.s?rev=361795&view=auto
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE2/bdep-diagnostics.s (added)
+++ llvm/trunk/test/MC/AArch64/SVE2/bdep-diagnostics.s Tue May 28 01:42:22 2019
@@ -0,0 +1,26 @@
+// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+bitperm 2>&1 < %s| FileCheck %s
+
+
+// ------------------------------------------------------------------------- //
+// Invalid element width
+
+bdep z0.b, z1.h, z2.s
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
+// CHECK-NEXT: bdep z0.b, z1.h, z2.s
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+
+// --------------------------------------------------------------------------//
+// Negative tests for instructions that are incompatible with movprfx
+
+movprfx z0, z7
+bdep z0.d, z1.d, z7.d
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
+// CHECK-NEXT: bdep z0.d, z1.d, z7.d
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+movprfx z0.d, p0/z, z7.d
+bdep z0.d, z1.d, z7.d
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
+// CHECK-NEXT: bdep z0.d, z1.d, z7.d
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
Added: llvm/trunk/test/MC/AArch64/SVE2/bdep.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE2/bdep.s?rev=361795&view=auto
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE2/bdep.s (added)
+++ llvm/trunk/test/MC/AArch64/SVE2/bdep.s Tue May 28 01:42:22 2019
@@ -0,0 +1,32 @@
+// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+bitperm < %s \
+// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
+// RUN: | FileCheck %s --check-prefix=CHECK-ERROR
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+bitperm < %s \
+// RUN: | llvm-objdump -d -mattr=+bitperm - | FileCheck %s --check-prefix=CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+bitperm < %s \
+// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
+
+bdep z0.b, z1.b, z31.b
+// CHECK-INST: bdep z0.b, z1.b, z31.b
+// CHECK-ENCODING: [0x20,0xb4,0x1f,0x45]
+// CHECK-ERROR: instruction requires: bitperm
+// CHECK-UNKNOWN: 20 b4 1f 45 <unknown>
+
+bdep z0.h, z1.h, z31.h
+// CHECK-INST: bdep z0.h, z1.h, z31.h
+// CHECK-ENCODING: [0x20,0xb4,0x5f,0x45]
+// CHECK-ERROR: instruction requires: bitperm
+// CHECK-UNKNOWN: 20 b4 5f 45 <unknown>
+
+bdep z0.s, z1.s, z31.s
+// CHECK-INST: bdep z0.s, z1.s, z31.s
+// CHECK-ENCODING: [0x20,0xb4,0x9f,0x45]
+// CHECK-ERROR: instruction requires: bitperm
+// CHECK-UNKNOWN: 20 b4 9f 45 <unknown>
+
+bdep z0.d, z1.d, z31.d
+// CHECK-INST: bdep z0.d, z1.d, z31.d
+// CHECK-ENCODING: [0x20,0xb4,0xdf,0x45]
+// CHECK-ERROR: instruction requires: bitperm
+// CHECK-UNKNOWN: 20 b4 df 45 <unknown>
Added: llvm/trunk/test/MC/AArch64/SVE2/bext-diagnostics.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE2/bext-diagnostics.s?rev=361795&view=auto
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE2/bext-diagnostics.s (added)
+++ llvm/trunk/test/MC/AArch64/SVE2/bext-diagnostics.s Tue May 28 01:42:22 2019
@@ -0,0 +1,26 @@
+// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+bitperm 2>&1 < %s| FileCheck %s
+
+
+// ------------------------------------------------------------------------- //
+// Invalid element width
+
+bext z0.b, z1.h, z2.s
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
+// CHECK-NEXT: bext z0.b, z1.h, z2.s
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+
+// --------------------------------------------------------------------------//
+// Negative tests for instructions that are incompatible with movprfx
+
+movprfx z0, z7
+bext z0.d, z1.d, z7.d
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
+// CHECK-NEXT: bext z0.d, z1.d, z7.d
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+movprfx z0.d, p0/z, z7.d
+bext z0.d, z1.d, z7.d
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
+// CHECK-NEXT: bext z0.d, z1.d, z7.d
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
Added: llvm/trunk/test/MC/AArch64/SVE2/bext.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE2/bext.s?rev=361795&view=auto
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE2/bext.s (added)
+++ llvm/trunk/test/MC/AArch64/SVE2/bext.s Tue May 28 01:42:22 2019
@@ -0,0 +1,32 @@
+// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+bitperm < %s \
+// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
+// RUN: | FileCheck %s --check-prefix=CHECK-ERROR
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+bitperm < %s \
+// RUN: | llvm-objdump -d -mattr=+bitperm - | FileCheck %s --check-prefix=CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+bitperm < %s \
+// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
+
+bext z0.b, z1.b, z31.b
+// CHECK-INST: bext z0.b, z1.b, z31.b
+// CHECK-ENCODING: [0x20,0xb0,0x1f,0x45]
+// CHECK-ERROR: instruction requires: bitperm
+// CHECK-UNKNOWN: 20 b0 1f 45 <unknown>
+
+bext z0.h, z1.h, z31.h
+// CHECK-INST: bext z0.h, z1.h, z31.h
+// CHECK-ENCODING: [0x20,0xb0,0x5f,0x45]
+// CHECK-ERROR: instruction requires: bitperm
+// CHECK-UNKNOWN: 20 b0 5f 45 <unknown>
+
+bext z0.s, z1.s, z31.s
+// CHECK-INST: bext z0.s, z1.s, z31.s
+// CHECK-ENCODING: [0x20,0xb0,0x9f,0x45]
+// CHECK-ERROR: instruction requires: bitperm
+// CHECK-UNKNOWN: 20 b0 9f 45 <unknown>
+
+bext z0.d, z1.d, z31.d
+// CHECK-INST: bext z0.d, z1.d, z31.d
+// CHECK-ENCODING: [0x20,0xb0,0xdf,0x45]
+// CHECK-ERROR: instruction requires: bitperm
+// CHECK-UNKNOWN: 20 b0 df 45 <unknown>
Added: llvm/trunk/test/MC/AArch64/SVE2/bgrp-diagnostics.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE2/bgrp-diagnostics.s?rev=361795&view=auto
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE2/bgrp-diagnostics.s (added)
+++ llvm/trunk/test/MC/AArch64/SVE2/bgrp-diagnostics.s Tue May 28 01:42:22 2019
@@ -0,0 +1,26 @@
+// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+bitperm 2>&1 < %s| FileCheck %s
+
+
+// ------------------------------------------------------------------------- //
+// Invalid element width
+
+bgrp z0.b, z1.h, z2.s
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
+// CHECK-NEXT: bgrp z0.b, z1.h, z2.s
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+
+// --------------------------------------------------------------------------//
+// Negative tests for instructions that are incompatible with movprfx
+
+movprfx z0, z7
+bgrp z0.d, z1.d, z7.d
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
+// CHECK-NEXT: bgrp z0.d, z1.d, z7.d
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+movprfx z0.d, p0/z, z7.d
+bgrp z0.d, z1.d, z7.d
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
+// CHECK-NEXT: bgrp z0.d, z1.d, z7.d
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
Added: llvm/trunk/test/MC/AArch64/SVE2/bgrp.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE2/bgrp.s?rev=361795&view=auto
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE2/bgrp.s (added)
+++ llvm/trunk/test/MC/AArch64/SVE2/bgrp.s Tue May 28 01:42:22 2019
@@ -0,0 +1,32 @@
+// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+bitperm < %s \
+// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
+// RUN: | FileCheck %s --check-prefix=CHECK-ERROR
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+bitperm < %s \
+// RUN: | llvm-objdump -d -mattr=+bitperm - | FileCheck %s --check-prefix=CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+bitperm < %s \
+// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
+
+bgrp z0.b, z1.b, z31.b
+// CHECK-INST: bgrp z0.b, z1.b, z31.b
+// CHECK-ENCODING: [0x20,0xb8,0x1f,0x45]
+// CHECK-ERROR: instruction requires: bitperm
+// CHECK-UNKNOWN: 20 b8 1f 45 <unknown>
+
+bgrp z0.h, z1.h, z31.h
+// CHECK-INST: bgrp z0.h, z1.h, z31.h
+// CHECK-ENCODING: [0x20,0xb8,0x5f,0x45]
+// CHECK-ERROR: instruction requires: bitperm
+// CHECK-UNKNOWN: 20 b8 5f 45 <unknown>
+
+bgrp z0.s, z1.s, z31.s
+// CHECK-INST: bgrp z0.s, z1.s, z31.s
+// CHECK-ENCODING: [0x20,0xb8,0x9f,0x45]
+// CHECK-ERROR: instruction requires: bitperm
+// CHECK-UNKNOWN: 20 b8 9f 45 <unknown>
+
+bgrp z0.d, z1.d, z31.d
+// CHECK-INST: bgrp z0.d, z1.d, z31.d
+// CHECK-ENCODING: [0x20,0xb8,0xdf,0x45]
+// CHECK-ERROR: instruction requires: bitperm
+// CHECK-UNKNOWN: 20 b8 df 45 <unknown>
Added: llvm/trunk/test/MC/AArch64/SVE2/eorbt-diagnostics.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE2/eorbt-diagnostics.s?rev=361795&view=auto
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE2/eorbt-diagnostics.s (added)
+++ llvm/trunk/test/MC/AArch64/SVE2/eorbt-diagnostics.s Tue May 28 01:42:22 2019
@@ -0,0 +1,20 @@
+// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 2>&1 < %s| FileCheck %s
+
+
+// ------------------------------------------------------------------------- //
+// Invalid element width
+
+eorbt z0.b, z1.h, z2.s
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
+// CHECK-NEXT: eorbt z0.b, z1.h, z2.s
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+
+// --------------------------------------------------------------------------//
+// Negative tests for instructions that are incompatible with movprfx
+
+movprfx z0.d, p0/z, z7.d
+eorbt z0.d, z1.d, z7.d
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a predicated movprfx, suggest using unpredicated movprfx
+// CHECK-NEXT: eorbt z0.d, z1.d, z7.d
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
Added: llvm/trunk/test/MC/AArch64/SVE2/eorbt.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE2/eorbt.s?rev=361795&view=auto
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE2/eorbt.s (added)
+++ llvm/trunk/test/MC/AArch64/SVE2/eorbt.s Tue May 28 01:42:22 2019
@@ -0,0 +1,48 @@
+// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 < %s \
+// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
+// RUN: | FileCheck %s --check-prefix=CHECK-ERROR
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
+// RUN: | llvm-objdump -d -mattr=+sve2 - | FileCheck %s --check-prefix=CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
+// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
+
+eorbt z0.b, z1.b, z31.b
+// CHECK-INST: eorbt z0.b, z1.b, z31.b
+// CHECK-ENCODING: [0x20,0x90,0x1f,0x45]
+// CHECK-ERROR: instruction requires: sve2
+// CHECK-UNKNOWN: 20 90 1f 45 <unknown>
+
+eorbt z0.h, z1.h, z31.h
+// CHECK-INST: eorbt z0.h, z1.h, z31.h
+// CHECK-ENCODING: [0x20,0x90,0x5f,0x45]
+// CHECK-ERROR: instruction requires: sve2
+// CHECK-UNKNOWN: 20 90 5f 45 <unknown>
+
+eorbt z0.s, z1.s, z31.s
+// CHECK-INST: eorbt z0.s, z1.s, z31.s
+// CHECK-ENCODING: [0x20,0x90,0x9f,0x45]
+// CHECK-ERROR: instruction requires: sve2
+// CHECK-UNKNOWN: 20 90 9f 45 <unknown>
+
+eorbt z0.d, z1.d, z31.d
+// CHECK-INST: eorbt z0.d, z1.d, z31.d
+// CHECK-ENCODING: [0x20,0x90,0xdf,0x45]
+// CHECK-ERROR: instruction requires: sve2
+// CHECK-UNKNOWN: 20 90 df 45 <unknown>
+
+
+// --------------------------------------------------------------------------//
+// Test compatibility with MOVPRFX instruction.
+
+movprfx z0, z7
+// CHECK-INST: movprfx z0, z7
+// CHECK-ENCODING: [0xe0,0xbc,0x20,0x04]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: e0 bc 20 04 <unknown>
+
+eorbt z0.d, z1.d, z31.d
+// CHECK-INST: eorbt z0.d, z1.d, z31.d
+// CHECK-ENCODING: [0x20,0x90,0xdf,0x45]
+// CHECK-ERROR: instruction requires: sve2
+// CHECK-UNKNOWN: 20 90 df 45 <unknown>
Added: llvm/trunk/test/MC/AArch64/SVE2/eortb-diagnostics.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE2/eortb-diagnostics.s?rev=361795&view=auto
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE2/eortb-diagnostics.s (added)
+++ llvm/trunk/test/MC/AArch64/SVE2/eortb-diagnostics.s Tue May 28 01:42:22 2019
@@ -0,0 +1,20 @@
+// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 2>&1 < %s| FileCheck %s
+
+
+// ------------------------------------------------------------------------- //
+// Invalid element width
+
+eortb z0.b, z1.h, z2.s
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
+// CHECK-NEXT: eortb z0.b, z1.h, z2.s
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+
+// --------------------------------------------------------------------------//
+// Negative tests for instructions that are incompatible with movprfx
+
+movprfx z0.d, p0/z, z7.d
+eortb z0.d, z1.d, z7.d
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a predicated movprfx, suggest using unpredicated movprfx
+// CHECK-NEXT: eortb z0.d, z1.d, z7.d
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
Added: llvm/trunk/test/MC/AArch64/SVE2/eortb.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE2/eortb.s?rev=361795&view=auto
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE2/eortb.s (added)
+++ llvm/trunk/test/MC/AArch64/SVE2/eortb.s Tue May 28 01:42:22 2019
@@ -0,0 +1,48 @@
+// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 < %s \
+// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
+// RUN: | FileCheck %s --check-prefix=CHECK-ERROR
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
+// RUN: | llvm-objdump -d -mattr=+sve2 - | FileCheck %s --check-prefix=CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
+// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
+
+eortb z0.b, z1.b, z31.b
+// CHECK-INST: eortb z0.b, z1.b, z31.b
+// CHECK-ENCODING: [0x20,0x94,0x1f,0x45]
+// CHECK-ERROR: instruction requires: sve2
+// CHECK-UNKNOWN: 20 94 1f 45 <unknown>
+
+eortb z0.h, z1.h, z31.h
+// CHECK-INST: eortb z0.h, z1.h, z31.h
+// CHECK-ENCODING: [0x20,0x94,0x5f,0x45]
+// CHECK-ERROR: instruction requires: sve2
+// CHECK-UNKNOWN: 20 94 5f 45 <unknown>
+
+eortb z0.s, z1.s, z31.s
+// CHECK-INST: eortb z0.s, z1.s, z31.s
+// CHECK-ENCODING: [0x20,0x94,0x9f,0x45]
+// CHECK-ERROR: instruction requires: sve2
+// CHECK-UNKNOWN: 20 94 9f 45 <unknown>
+
+eortb z0.d, z1.d, z31.d
+// CHECK-INST: eortb z0.d, z1.d, z31.d
+// CHECK-ENCODING: [0x20,0x94,0xdf,0x45]
+// CHECK-ERROR: instruction requires: sve2
+// CHECK-UNKNOWN: 20 94 df 45 <unknown>
+
+
+// --------------------------------------------------------------------------//
+// Test compatibility with MOVPRFX instruction.
+
+movprfx z0, z7
+// CHECK-INST: movprfx z0, z7
+// CHECK-ENCODING: [0xe0,0xbc,0x20,0x04]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: e0 bc 20 04 <unknown>
+
+eortb z0.d, z1.d, z31.d
+// CHECK-INST: eortb z0.d, z1.d, z31.d
+// CHECK-ENCODING: [0x20,0x94,0xdf,0x45]
+// CHECK-ERROR: instruction requires: sve2
+// CHECK-UNKNOWN: 20 94 df 45 <unknown>
Added: llvm/trunk/test/MC/AArch64/SVE2/saddlbt-diagnostics.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE2/saddlbt-diagnostics.s?rev=361795&view=auto
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE2/saddlbt-diagnostics.s (added)
+++ llvm/trunk/test/MC/AArch64/SVE2/saddlbt-diagnostics.s Tue May 28 01:42:22 2019
@@ -0,0 +1,40 @@
+// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 2>&1 < %s| FileCheck %s
+
+
+// ------------------------------------------------------------------------- //
+// Invalid element width
+
+saddlbt z0.b, z1.b, z2.b
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
+// CHECK-NEXT: saddlbt z0.b, z1.b, z2.b
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+saddlbt z0.h, z1.h, z2.h
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
+// CHECK-NEXT: saddlbt z0.h, z1.h, z2.h
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+saddlbt z0.s, z1.s, z2.s
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
+// CHECK-NEXT: saddlbt z0.s, z1.s, z2.s
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+saddlbt z0.d, z1.d, z2.d
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
+// CHECK-NEXT: saddlbt z0.d, z1.d, z2.d
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+// --------------------------------------------------------------------------//
+// Negative tests for instructions that are incompatible with movprfx
+
+movprfx z0, z7
+saddlbt z0.h, z1.b, z7.b
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
+// CHECK-NEXT: saddlbt z0.h, z1.b, z7.b
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+movprfx z0.h, p0/z, z7.h
+saddlbt z0.h, z1.b, z7.b
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
+// CHECK-NEXT: saddlbt z0.h, z1.b, z7.b
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
Added: llvm/trunk/test/MC/AArch64/SVE2/saddlbt.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE2/saddlbt.s?rev=361795&view=auto
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE2/saddlbt.s (added)
+++ llvm/trunk/test/MC/AArch64/SVE2/saddlbt.s Tue May 28 01:42:22 2019
@@ -0,0 +1,27 @@
+// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 < %s \
+// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
+// RUN: | FileCheck %s --check-prefix=CHECK-ERROR
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
+// RUN: | llvm-objdump -d -mattr=+sve2 - | FileCheck %s --check-prefix=CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
+// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
+
+
+saddlbt z0.h, z1.b, z31.b
+// CHECK-INST: saddlbt z0.h, z1.b, z31.b
+// CHECK-ENCODING: [0x20,0x80,0x5f,0x45]
+// CHECK-ERROR: instruction requires: sve2
+// CHECK-UNKNOWN: 20 80 5f 45 <unknown>
+
+saddlbt z0.s, z1.h, z31.h
+// CHECK-INST: saddlbt z0.s, z1.h, z31.h
+// CHECK-ENCODING: [0x20,0x80,0x9f,0x45]
+// CHECK-ERROR: instruction requires: sve2
+// CHECK-UNKNOWN: 20 80 9f 45 <unknown>
+
+saddlbt z0.d, z1.s, z31.s
+// CHECK-INST: saddlbt z0.d, z1.s, z31.s
+// CHECK-ENCODING: [0x20,0x80,0xdf,0x45]
+// CHECK-ERROR: instruction requires: sve2
+// CHECK-UNKNOWN: 20 80 df 45 <unknown>
Added: llvm/trunk/test/MC/AArch64/SVE2/sshllb-diagnostics.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE2/sshllb-diagnostics.s?rev=361795&view=auto
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE2/sshllb-diagnostics.s (added)
+++ llvm/trunk/test/MC/AArch64/SVE2/sshllb-diagnostics.s Tue May 28 01:42:22 2019
@@ -0,0 +1,71 @@
+// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 2>&1 < %s| FileCheck %s
+
+sshllb z18.h, z28.b, #-1
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 7]
+// CHECK-NEXT: sshllb z18.h, z28.b, #-1
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+sshllb z1.h, z9.b, #8
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 7]
+// CHECK-NEXT: sshllb z1.h, z9.b, #8
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+sshllb z21.s, z2.h, #-1
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 15]
+// CHECK-NEXT: sshllb z21.s, z2.h, #-1
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+sshllb z14.s, z30.h, #16
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 15]
+// CHECK-NEXT: sshllb z14.s, z30.h, #16
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+sshllb z6.d, z12.s, #-1
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 31]
+// CHECK-NEXT: sshllb z6.d, z12.s, #-1
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+sshllb z23.d, z19.s, #32
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 31]
+// CHECK-NEXT: sshllb z23.d, z19.s, #32
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+
+// --------------------------------------------------------------------------//
+// Invalid element width
+
+sshllb z0.b, z0.b, #0
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
+// CHECK-NEXT: sshllb z0.b, z0.b, #0
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+sshllb z0.h, z0.h, #0
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
+// CHECK-NEXT: sshllb z0.h, z0.h, #0
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+sshllb z0.s, z0.s, #0
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
+// CHECK-NEXT: sshllb z0.s, z0.s, #0
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+sshllb z0.d, z0.d, #0
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
+// CHECK-NEXT: sshllb z0.d, z0.d, #0
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+
+// --------------------------------------------------------------------------//
+// Negative tests for instructions that are incompatible with movprfx
+
+movprfx z31, z6
+sshllb z31.d, z31.s, #31
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
+// CHECK-NEXT: sshllb z31.d, z31.s, #31
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+movprfx z31.d, p0/m, z6.d
+sshllb z31.d, z31.s, #31
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
+// CHECK-NEXT: sshllb z31.d, z31.s, #31
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
Added: llvm/trunk/test/MC/AArch64/SVE2/sshllb.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE2/sshllb.s?rev=361795&view=auto
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE2/sshllb.s (added)
+++ llvm/trunk/test/MC/AArch64/SVE2/sshllb.s Tue May 28 01:42:22 2019
@@ -0,0 +1,44 @@
+// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 < %s \
+// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
+// RUN: | FileCheck %s --check-prefix=CHECK-ERROR
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
+// RUN: | llvm-objdump -d -mattr=+sve2 - | FileCheck %s --check-prefix=CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
+// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
+
+sshllb z0.h, z0.b, #0
+// CHECK-INST: sshllb z0.h, z0.b, #0
+// CHECK-ENCODING: [0x00,0xa0,0x08,0x45]
+// CHECK-ERROR: instruction requires: sve2
+// CHECK-UNKNOWN: 00 a0 08 45 <unknown>
+
+sshllb z31.h, z31.b, #7
+// CHECK-INST: sshllb z31.h, z31.b, #7
+// CHECK-ENCODING: [0xff,0xa3,0x0f,0x45]
+// CHECK-ERROR: instruction requires: sve2
+// CHECK-UNKNOWN: ff a3 0f 45 <unknown>
+
+sshllb z0.s, z0.h, #0
+// CHECK-INST: sshllb z0.s, z0.h, #0
+// CHECK-ENCODING: [0x00,0xa0,0x10,0x45]
+// CHECK-ERROR: instruction requires: sve2
+// CHECK-UNKNOWN: 00 a0 10 45 <unknown>
+
+sshllb z31.s, z31.h, #15
+// CHECK-INST: sshllb z31.s, z31.h, #15
+// CHECK-ENCODING: [0xff,0xa3,0x1f,0x45]
+// CHECK-ERROR: instruction requires: sve2
+// CHECK-UNKNOWN: ff a3 1f 45 <unknown>
+
+sshllb z0.d, z0.s, #0
+// CHECK-INST: sshllb z0.d, z0.s, #0
+// CHECK-ENCODING: [0x00,0xa0,0x40,0x45]
+// CHECK-ERROR: instruction requires: sve2
+// CHECK-UNKNOWN: 00 a0 40 45 <unknown>
+
+sshllb z31.d, z31.s, #31
+// CHECK-INST: sshllb z31.d, z31.s, #31
+// CHECK-ENCODING: [0xff,0xa3,0x5f,0x45]
+// CHECK-ERROR: instruction requires: sve2
+// CHECK-UNKNOWN: ff a3 5f 45 <unknown>
Added: llvm/trunk/test/MC/AArch64/SVE2/sshllt-diagnostics.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE2/sshllt-diagnostics.s?rev=361795&view=auto
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE2/sshllt-diagnostics.s (added)
+++ llvm/trunk/test/MC/AArch64/SVE2/sshllt-diagnostics.s Tue May 28 01:42:22 2019
@@ -0,0 +1,71 @@
+// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 2>&1 < %s| FileCheck %s
+
+sshllt z18.h, z28.b, #-1
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 7]
+// CHECK-NEXT: sshllt z18.h, z28.b, #-1
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+sshllt z1.h, z9.b, #8
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 7]
+// CHECK-NEXT: sshllt z1.h, z9.b, #8
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+sshllt z21.s, z2.h, #-1
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 15]
+// CHECK-NEXT: sshllt z21.s, z2.h, #-1
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+sshllt z14.s, z30.h, #16
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 15]
+// CHECK-NEXT: sshllt z14.s, z30.h, #16
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+sshllt z6.d, z12.s, #-1
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 31]
+// CHECK-NEXT: sshllt z6.d, z12.s, #-1
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+sshllt z23.d, z19.s, #32
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 31]
+// CHECK-NEXT: sshllt z23.d, z19.s, #32
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+
+// --------------------------------------------------------------------------//
+// Invalid element width
+
+sshllt z0.b, z0.b, #0
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
+// CHECK-NEXT: sshllt z0.b, z0.b, #0
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+sshllt z0.h, z0.h, #0
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
+// CHECK-NEXT: sshllt z0.h, z0.h, #0
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+sshllt z0.s, z0.s, #0
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
+// CHECK-NEXT: sshllt z0.s, z0.s, #0
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+sshllt z0.d, z0.d, #0
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
+// CHECK-NEXT: sshllt z0.d, z0.d, #0
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+
+// --------------------------------------------------------------------------//
+// Negative tests for instructions that are incompatible with movprfx
+
+movprfx z31, z6
+sshllt z31.d, z31.s, #31
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
+// CHECK-NEXT: sshllt z31.d, z31.s, #31
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+movprfx z31.d, p0/m, z6.d
+sshllt z31.d, z31.s, #31
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
+// CHECK-NEXT: sshllt z31.d, z31.s, #31
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
Added: llvm/trunk/test/MC/AArch64/SVE2/sshllt.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE2/sshllt.s?rev=361795&view=auto
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE2/sshllt.s (added)
+++ llvm/trunk/test/MC/AArch64/SVE2/sshllt.s Tue May 28 01:42:22 2019
@@ -0,0 +1,44 @@
+// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 < %s \
+// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
+// RUN: | FileCheck %s --check-prefix=CHECK-ERROR
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
+// RUN: | llvm-objdump -d -mattr=+sve2 - | FileCheck %s --check-prefix=CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
+// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
+
+sshllt z0.h, z0.b, #0
+// CHECK-INST: sshllt z0.h, z0.b, #0
+// CHECK-ENCODING: [0x00,0xa4,0x08,0x45]
+// CHECK-ERROR: instruction requires: sve2
+// CHECK-UNKNOWN: 00 a4 08 45 <unknown>
+
+sshllt z31.h, z31.b, #7
+// CHECK-INST: sshllt z31.h, z31.b, #7
+// CHECK-ENCODING: [0xff,0xa7,0x0f,0x45]
+// CHECK-ERROR: instruction requires: sve2
+// CHECK-UNKNOWN: ff a7 0f 45 <unknown>
+
+sshllt z0.s, z0.h, #0
+// CHECK-INST: sshllt z0.s, z0.h, #0
+// CHECK-ENCODING: [0x00,0xa4,0x10,0x45]
+// CHECK-ERROR: instruction requires: sve2
+// CHECK-UNKNOWN: 00 a4 10 45 <unknown>
+
+sshllt z31.s, z31.h, #15
+// CHECK-INST: sshllt z31.s, z31.h, #15
+// CHECK-ENCODING: [0xff,0xa7,0x1f,0x45]
+// CHECK-ERROR: instruction requires: sve2
+// CHECK-UNKNOWN: ff a7 1f 45 <unknown>
+
+sshllt z0.d, z0.s, #0
+// CHECK-INST: sshllt z0.d, z0.s, #0
+// CHECK-ENCODING: [0x00,0xa4,0x40,0x45]
+// CHECK-ERROR: instruction requires: sve2
+// CHECK-UNKNOWN: 00 a4 40 45 <unknown>
+
+sshllt z31.d, z31.s, #31
+// CHECK-INST: sshllt z31.d, z31.s, #31
+// CHECK-ENCODING: [0xff,0xa7,0x5f,0x45]
+// CHECK-ERROR: instruction requires: sve2
+// CHECK-UNKNOWN: ff a7 5f 45 <unknown>
Added: llvm/trunk/test/MC/AArch64/SVE2/ssublbt-diagnostics.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE2/ssublbt-diagnostics.s?rev=361795&view=auto
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE2/ssublbt-diagnostics.s (added)
+++ llvm/trunk/test/MC/AArch64/SVE2/ssublbt-diagnostics.s Tue May 28 01:42:22 2019
@@ -0,0 +1,40 @@
+// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 2>&1 < %s| FileCheck %s
+
+
+// ------------------------------------------------------------------------- //
+// Invalid element width
+
+ssublbt z0.b, z1.b, z2.b
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
+// CHECK-NEXT: ssublbt z0.b, z1.b, z2.b
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ssublbt z0.h, z1.h, z2.h
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
+// CHECK-NEXT: ssublbt z0.h, z1.h, z2.h
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ssublbt z0.s, z1.s, z2.s
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
+// CHECK-NEXT: ssublbt z0.s, z1.s, z2.s
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ssublbt z0.d, z1.d, z2.d
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
+// CHECK-NEXT: ssublbt z0.d, z1.d, z2.d
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+// --------------------------------------------------------------------------//
+// Negative tests for instructions that are incompatible with movprfx
+
+movprfx z0, z7
+ssublbt z0.h, z1.b, z7.b
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
+// CHECK-NEXT: ssublbt z0.h, z1.b, z7.b
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+movprfx z0.h, p0/z, z7.h
+ssublbt z0.h, z1.b, z7.b
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
+// CHECK-NEXT: ssublbt z0.h, z1.b, z7.b
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
Added: llvm/trunk/test/MC/AArch64/SVE2/ssublbt.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE2/ssublbt.s?rev=361795&view=auto
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE2/ssublbt.s (added)
+++ llvm/trunk/test/MC/AArch64/SVE2/ssublbt.s Tue May 28 01:42:22 2019
@@ -0,0 +1,27 @@
+// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 < %s \
+// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
+// RUN: | FileCheck %s --check-prefix=CHECK-ERROR
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
+// RUN: | llvm-objdump -d -mattr=+sve2 - | FileCheck %s --check-prefix=CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
+// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
+
+
+ssublbt z0.h, z1.b, z31.b
+// CHECK-INST: ssublbt z0.h, z1.b, z31.b
+// CHECK-ENCODING: [0x20,0x88,0x5f,0x45]
+// CHECK-ERROR: instruction requires: sve2
+// CHECK-UNKNOWN: 20 88 5f 45 <unknown>
+
+ssublbt z0.s, z1.h, z31.h
+// CHECK-INST: ssublbt z0.s, z1.h, z31.h
+// CHECK-ENCODING: [0x20,0x88,0x9f,0x45]
+// CHECK-ERROR: instruction requires: sve2
+// CHECK-UNKNOWN: 20 88 9f 45 <unknown>
+
+ssublbt z0.d, z1.s, z31.s
+// CHECK-INST: ssublbt z0.d, z1.s, z31.s
+// CHECK-ENCODING: [0x20,0x88,0xdf,0x45]
+// CHECK-ERROR: instruction requires: sve2
+// CHECK-UNKNOWN: 20 88 df 45 <unknown>
Added: llvm/trunk/test/MC/AArch64/SVE2/ssubltb-diagnostics.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE2/ssubltb-diagnostics.s?rev=361795&view=auto
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE2/ssubltb-diagnostics.s (added)
+++ llvm/trunk/test/MC/AArch64/SVE2/ssubltb-diagnostics.s Tue May 28 01:42:22 2019
@@ -0,0 +1,40 @@
+// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 2>&1 < %s| FileCheck %s
+
+
+// ------------------------------------------------------------------------- //
+// Invalid element width
+
+ssubltb z0.b, z1.b, z2.b
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
+// CHECK-NEXT: ssubltb z0.b, z1.b, z2.b
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ssubltb z0.h, z1.h, z2.h
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
+// CHECK-NEXT: ssubltb z0.h, z1.h, z2.h
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ssubltb z0.s, z1.s, z2.s
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
+// CHECK-NEXT: ssubltb z0.s, z1.s, z2.s
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ssubltb z0.d, z1.d, z2.d
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
+// CHECK-NEXT: ssubltb z0.d, z1.d, z2.d
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+// --------------------------------------------------------------------------//
+// Negative tests for instructions that are incompatible with movprfx
+
+movprfx z0, z7
+ssubltb z0.h, z1.b, z7.b
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
+// CHECK-NEXT: ssubltb z0.h, z1.b, z7.b
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+movprfx z0.h, p0/z, z7.h
+ssubltb z0.h, z1.b, z7.b
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
+// CHECK-NEXT: ssubltb z0.h, z1.b, z7.b
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
Added: llvm/trunk/test/MC/AArch64/SVE2/ssubltb.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE2/ssubltb.s?rev=361795&view=auto
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE2/ssubltb.s (added)
+++ llvm/trunk/test/MC/AArch64/SVE2/ssubltb.s Tue May 28 01:42:22 2019
@@ -0,0 +1,27 @@
+// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 < %s \
+// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
+// RUN: | FileCheck %s --check-prefix=CHECK-ERROR
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
+// RUN: | llvm-objdump -d -mattr=+sve2 - | FileCheck %s --check-prefix=CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
+// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
+
+
+ssubltb z0.h, z1.b, z31.b
+// CHECK-INST: ssubltb z0.h, z1.b, z31.b
+// CHECK-ENCODING: [0x20,0x8c,0x5f,0x45]
+// CHECK-ERROR: instruction requires: sve2
+// CHECK-UNKNOWN: 20 8c 5f 45 <unknown>
+
+ssubltb z0.s, z1.h, z31.h
+// CHECK-INST: ssubltb z0.s, z1.h, z31.h
+// CHECK-ENCODING: [0x20,0x8c,0x9f,0x45]
+// CHECK-ERROR: instruction requires: sve2
+// CHECK-UNKNOWN: 20 8c 9f 45 <unknown>
+
+ssubltb z0.d, z1.s, z31.s
+// CHECK-INST: ssubltb z0.d, z1.s, z31.s
+// CHECK-ENCODING: [0x20,0x8c,0xdf,0x45]
+// CHECK-ERROR: instruction requires: sve2
+// CHECK-UNKNOWN: 20 8c df 45 <unknown>
Added: llvm/trunk/test/MC/AArch64/SVE2/ushllb-diagnostics.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE2/ushllb-diagnostics.s?rev=361795&view=auto
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE2/ushllb-diagnostics.s (added)
+++ llvm/trunk/test/MC/AArch64/SVE2/ushllb-diagnostics.s Tue May 28 01:42:22 2019
@@ -0,0 +1,71 @@
+// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 2>&1 < %s| FileCheck %s
+
+ushllb z18.h, z28.b, #-1
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 7]
+// CHECK-NEXT: ushllb z18.h, z28.b, #-1
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ushllb z1.h, z9.b, #8
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 7]
+// CHECK-NEXT: ushllb z1.h, z9.b, #8
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ushllb z21.s, z2.h, #-1
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 15]
+// CHECK-NEXT: ushllb z21.s, z2.h, #-1
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ushllb z14.s, z30.h, #16
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 15]
+// CHECK-NEXT: ushllb z14.s, z30.h, #16
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ushllb z6.d, z12.s, #-1
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 31]
+// CHECK-NEXT: ushllb z6.d, z12.s, #-1
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ushllb z23.d, z19.s, #32
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 31]
+// CHECK-NEXT: ushllb z23.d, z19.s, #32
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+
+// --------------------------------------------------------------------------//
+// Invalid element width
+
+ushllb z0.b, z0.b, #0
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
+// CHECK-NEXT: ushllb z0.b, z0.b, #0
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ushllb z0.h, z0.h, #0
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
+// CHECK-NEXT: ushllb z0.h, z0.h, #0
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ushllb z0.s, z0.s, #0
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
+// CHECK-NEXT: ushllb z0.s, z0.s, #0
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ushllb z0.d, z0.d, #0
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
+// CHECK-NEXT: ushllb z0.d, z0.d, #0
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+
+// --------------------------------------------------------------------------//
+// Negative tests for instructions that are incompatible with movprfx
+
+movprfx z31, z6
+ushllb z31.d, z31.s, #31
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
+// CHECK-NEXT: ushllb z31.d, z31.s, #31
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+movprfx z31.d, p0/m, z6.d
+ushllb z31.d, z31.s, #31
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
+// CHECK-NEXT: ushllb z31.d, z31.s, #31
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
Added: llvm/trunk/test/MC/AArch64/SVE2/ushllb.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE2/ushllb.s?rev=361795&view=auto
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE2/ushllb.s (added)
+++ llvm/trunk/test/MC/AArch64/SVE2/ushllb.s Tue May 28 01:42:22 2019
@@ -0,0 +1,44 @@
+// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 < %s \
+// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
+// RUN: | FileCheck %s --check-prefix=CHECK-ERROR
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
+// RUN: | llvm-objdump -d -mattr=+sve2 - | FileCheck %s --check-prefix=CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
+// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
+
+ushllb z0.h, z0.b, #0
+// CHECK-INST: ushllb z0.h, z0.b, #0
+// CHECK-ENCODING: [0x00,0xa8,0x08,0x45]
+// CHECK-ERROR: instruction requires: sve2
+// CHECK-UNKNOWN: 00 a8 08 45 <unknown>
+
+ushllb z31.h, z31.b, #7
+// CHECK-INST: ushllb z31.h, z31.b, #7
+// CHECK-ENCODING: [0xff,0xab,0x0f,0x45]
+// CHECK-ERROR: instruction requires: sve2
+// CHECK-UNKNOWN: ff ab 0f 45 <unknown>
+
+ushllb z0.s, z0.h, #0
+// CHECK-INST: ushllb z0.s, z0.h, #0
+// CHECK-ENCODING: [0x00,0xa8,0x10,0x45]
+// CHECK-ERROR: instruction requires: sve2
+// CHECK-UNKNOWN: 00 a8 10 45 <unknown>
+
+ushllb z31.s, z31.h, #15
+// CHECK-INST: ushllb z31.s, z31.h, #15
+// CHECK-ENCODING: [0xff,0xab,0x1f,0x45]
+// CHECK-ERROR: instruction requires: sve2
+// CHECK-UNKNOWN: ff ab 1f 45 <unknown>
+
+ushllb z0.d, z0.s, #0
+// CHECK-INST: ushllb z0.d, z0.s, #0
+// CHECK-ENCODING: [0x00,0xa8,0x40,0x45]
+// CHECK-ERROR: instruction requires: sve2
+// CHECK-UNKNOWN: 00 a8 40 45 <unknown>
+
+ushllb z31.d, z31.s, #31
+// CHECK-INST: ushllb z31.d, z31.s, #31
+// CHECK-ENCODING: [0xff,0xab,0x5f,0x45]
+// CHECK-ERROR: instruction requires: sve2
+// CHECK-UNKNOWN: ff ab 5f 45 <unknown>
Added: llvm/trunk/test/MC/AArch64/SVE2/ushllt-diagnostics.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE2/ushllt-diagnostics.s?rev=361795&view=auto
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE2/ushllt-diagnostics.s (added)
+++ llvm/trunk/test/MC/AArch64/SVE2/ushllt-diagnostics.s Tue May 28 01:42:22 2019
@@ -0,0 +1,71 @@
+// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 2>&1 < %s| FileCheck %s
+
+ushllt z18.h, z28.b, #-1
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 7]
+// CHECK-NEXT: ushllt z18.h, z28.b, #-1
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ushllt z1.h, z9.b, #8
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 7]
+// CHECK-NEXT: ushllt z1.h, z9.b, #8
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ushllt z21.s, z2.h, #-1
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 15]
+// CHECK-NEXT: ushllt z21.s, z2.h, #-1
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ushllt z14.s, z30.h, #16
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 15]
+// CHECK-NEXT: ushllt z14.s, z30.h, #16
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ushllt z6.d, z12.s, #-1
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 31]
+// CHECK-NEXT: ushllt z6.d, z12.s, #-1
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ushllt z23.d, z19.s, #32
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 31]
+// CHECK-NEXT: ushllt z23.d, z19.s, #32
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+
+// --------------------------------------------------------------------------//
+// Invalid element width
+
+ushllt z0.b, z0.b, #0
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
+// CHECK-NEXT: ushllt z0.b, z0.b, #0
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ushllt z0.h, z0.h, #0
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
+// CHECK-NEXT: ushllt z0.h, z0.h, #0
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ushllt z0.s, z0.s, #0
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
+// CHECK-NEXT: ushllt z0.s, z0.s, #0
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+ushllt z0.d, z0.d, #0
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
+// CHECK-NEXT: ushllt z0.d, z0.d, #0
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+
+// --------------------------------------------------------------------------//
+// Negative tests for instructions that are incompatible with movprfx
+
+movprfx z31, z6
+ushllt z31.d, z31.s, #31
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
+// CHECK-NEXT: ushllt z31.d, z31.s, #31
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+movprfx z31.d, p0/m, z6.d
+ushllt z31.d, z31.s, #31
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
+// CHECK-NEXT: ushllt z31.d, z31.s, #31
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
Added: llvm/trunk/test/MC/AArch64/SVE2/ushllt.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE2/ushllt.s?rev=361795&view=auto
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE2/ushllt.s (added)
+++ llvm/trunk/test/MC/AArch64/SVE2/ushllt.s Tue May 28 01:42:22 2019
@@ -0,0 +1,44 @@
+// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 < %s \
+// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
+// RUN: | FileCheck %s --check-prefix=CHECK-ERROR
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
+// RUN: | llvm-objdump -d -mattr=+sve2 - | FileCheck %s --check-prefix=CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
+// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
+
+ushllt z0.h, z0.b, #0
+// CHECK-INST: ushllt z0.h, z0.b, #0
+// CHECK-ENCODING: [0x00,0xac,0x08,0x45]
+// CHECK-ERROR: instruction requires: sve2
+// CHECK-UNKNOWN: 00 ac 08 45 <unknown>
+
+ushllt z31.h, z31.b, #7
+// CHECK-INST: ushllt z31.h, z31.b, #7
+// CHECK-ENCODING: [0xff,0xaf,0x0f,0x45]
+// CHECK-ERROR: instruction requires: sve2
+// CHECK-UNKNOWN: ff af 0f 45 <unknown>
+
+ushllt z0.s, z0.h, #0
+// CHECK-INST: ushllt z0.s, z0.h, #0
+// CHECK-ENCODING: [0x00,0xac,0x10,0x45]
+// CHECK-ERROR: instruction requires: sve2
+// CHECK-UNKNOWN: 00 ac 10 45 <unknown>
+
+ushllt z31.s, z31.h, #15
+// CHECK-INST: ushllt z31.s, z31.h, #15
+// CHECK-ENCODING: [0xff,0xaf,0x1f,0x45]
+// CHECK-ERROR: instruction requires: sve2
+// CHECK-UNKNOWN: ff af 1f 45 <unknown>
+
+ushllt z0.d, z0.s, #0
+// CHECK-INST: ushllt z0.d, z0.s, #0
+// CHECK-ENCODING: [0x00,0xac,0x40,0x45]
+// CHECK-ERROR: instruction requires: sve2
+// CHECK-UNKNOWN: 00 ac 40 45 <unknown>
+
+ushllt z31.d, z31.s, #31
+// CHECK-INST: ushllt z31.d, z31.s, #31
+// CHECK-ENCODING: [0xff,0xaf,0x5f,0x45]
+// CHECK-ERROR: instruction requires: sve2
+// CHECK-UNKNOWN: ff af 5f 45 <unknown>
More information about the llvm-commits
mailing list