• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve  2>&1 < %s| FileCheck %s
2
3
4// ------------------------------------------------------------------------- //
5// Tied operands must match
6
7ext z0.b, z1.b, z2.b, #0
8// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: operand must match destination register
9// CHECK-NEXT: ext z0.b, z1.b, z2.b, #0
10// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
11
12
13// ------------------------------------------------------------------------- //
14// Invalid element widths.
15
16ext z0.h, z0.h, z1.h, #0
17// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
18// CHECK-NEXT: ext z0.h, z0.h, z1.h, #0
19// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
20
21
22// ------------------------------------------------------------------------- //
23// Invalid immediate range.
24
25ext z0.b, z0.b, z1.b, #-1
26// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 255].
27// CHECK-NEXT: ext z0.b, z0.b, z1.b, #-1
28// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
29
30ext z0.b, z0.b, z1.b, #256
31// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 255].
32// CHECK-NEXT: ext z0.b, z0.b, z1.b, #256
33// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
34
35
36// --------------------------------------------------------------------------//
37// Negative tests for instructions that are incompatible with movprfx
38
39movprfx z31.b, p0/z, z6.b
40ext z31.b, z31.b, z0.b, #255
41// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a predicated movprfx, suggest using unpredicated movprfx
42// CHECK-NEXT: ext z31.b, z31.b, z0.b, #255
43// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
44