[InstCombine] Signed saturation patterns
[llvm-complete.git] / test / MC / AArch64 / SVE / asrd.s
blob78fbbba5b338899f8ae75d072c2120baa084ecb4
1 // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve < %s \
2 // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
3 // RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
4 // RUN: | FileCheck %s --check-prefix=CHECK-ERROR
5 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \
6 // RUN: | llvm-objdump -d -mattr=+sve - | FileCheck %s --check-prefix=CHECK-INST
7 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \
8 // RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
10 asrd z0.b, p0/m, z0.b, #1
11 // CHECK-INST: asrd z0.b, p0/m, z0.b, #1
12 // CHECK-ENCODING: [0xe0,0x81,0x04,0x04]
13 // CHECK-ERROR: instruction requires: sve
14 // CHECK-UNKNOWN: e0 81 04 04 <unknown>
16 asrd z31.b, p0/m, z31.b, #8
17 // CHECK-INST: asrd z31.b, p0/m, z31.b, #8
18 // CHECK-ENCODING: [0x1f,0x81,0x04,0x04]
19 // CHECK-ERROR: instruction requires: sve
20 // CHECK-UNKNOWN: 1f 81 04 04 <unknown>
22 asrd z0.h, p0/m, z0.h, #1
23 // CHECK-INST: asrd z0.h, p0/m, z0.h, #1
24 // CHECK-ENCODING: [0xe0,0x83,0x04,0x04]
25 // CHECK-ERROR: instruction requires: sve
26 // CHECK-UNKNOWN: e0 83 04 04 <unknown>
28 asrd z31.h, p0/m, z31.h, #16
29 // CHECK-INST: asrd z31.h, p0/m, z31.h, #16
30 // CHECK-ENCODING: [0x1f,0x82,0x04,0x04]
31 // CHECK-ERROR: instruction requires: sve
32 // CHECK-UNKNOWN: 1f 82 04 04 <unknown>
34 asrd z0.s, p0/m, z0.s, #1
35 // CHECK-INST: asrd z0.s, p0/m, z0.s, #1
36 // CHECK-ENCODING: [0xe0,0x83,0x44,0x04]
37 // CHECK-ERROR: instruction requires: sve
38 // CHECK-UNKNOWN: e0 83 44 04 <unknown>
40 asrd z31.s, p0/m, z31.s, #32
41 // CHECK-INST: asrd z31.s, p0/m, z31.s, #32
42 // CHECK-ENCODING: [0x1f,0x80,0x44,0x04]
43 // CHECK-ERROR: instruction requires: sve
44 // CHECK-UNKNOWN: 1f 80 44 04 <unknown>
46 asrd z0.d, p0/m, z0.d, #1
47 // CHECK-INST: asrd z0.d, p0/m, z0.d, #1
48 // CHECK-ENCODING: [0xe0,0x83,0xc4,0x04]
49 // CHECK-ERROR: instruction requires: sve
50 // CHECK-UNKNOWN: e0 83 c4 04 <unknown>
52 asrd z31.d, p0/m, z31.d, #64
53 // CHECK-INST: asrd z31.d, p0/m, z31.d, #64
54 // CHECK-ENCODING: [0x1f,0x80,0x84,0x04]
55 // CHECK-ERROR: instruction requires: sve
56 // CHECK-UNKNOWN: 1f 80 84 04 <unknown>
59 // --------------------------------------------------------------------------//
60 // Test compatibility with MOVPRFX instruction.
62 movprfx z31.d, p0/z, z6.d
63 // CHECK-INST: movprfx z31.d, p0/z, z6.d
64 // CHECK-ENCODING: [0xdf,0x20,0xd0,0x04]
65 // CHECK-ERROR: instruction requires: sve
66 // CHECK-UNKNOWN: df 20 d0 04 <unknown>
68 asrd z31.d, p0/m, z31.d, #64
69 // CHECK-INST: asrd z31.d, p0/m, z31.d, #64
70 // CHECK-ENCODING: [0x1f,0x80,0x84,0x04]
71 // CHECK-ERROR: instruction requires: sve
72 // CHECK-UNKNOWN: 1f 80 84 04 <unknown>
74 movprfx z31, z6
75 // CHECK-INST: movprfx z31, z6
76 // CHECK-ENCODING: [0xdf,0xbc,0x20,0x04]
77 // CHECK-ERROR: instruction requires: sve
78 // CHECK-UNKNOWN: df bc 20 04 <unknown>
80 asrd z31.d, p0/m, z31.d, #64
81 // CHECK-INST: asrd z31.d, p0/m, z31.d, #64
82 // CHECK-ENCODING: [0x1f,0x80,0x84,0x04]
83 // CHECK-ERROR: instruction requires: sve
84 // CHECK-UNKNOWN: 1f 80 84 04 <unknown>