Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / MC / RISCV / rv64xtheadmemidx-valid.s
blob24782d1be0da5bd3c8669d77ee3149b942fcf11c
1 # RUN: llvm-mc %s -triple=riscv64 -mattr=+xtheadmemidx -show-encoding \
2 # RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
3 # RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+xtheadmemidx < %s \
4 # RUN: | llvm-objdump --mattr=+xtheadmemidx -d -r - \
5 # RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
7 # CHECK-ASM-AND-OBJ: th.ldia
8 # CHECK-ASM: encoding: [0x0b,0xc5,0x05,0x78]
9 th.ldia a0, (a1), 0, 0
11 # CHECK-ASM-AND-OBJ: th.ldib
12 # CHECK-ASM: encoding: [0x0b,0xc5,0xf5,0x6a]
13 th.ldib a0, (a1), 15, 1
15 # CHECK-ASM-AND-OBJ: th.lwia
16 # CHECK-ASM: encoding: [0x0b,0xc5,0x05,0x5c]
17 th.lwia a0, (a1), 0, 2
19 # CHECK-ASM-AND-OBJ: th.lwib
20 # CHECK-ASM: encoding: [0x0b,0xc5,0x05,0x4f]
21 th.lwib a0, (a1), -16, 3
23 # CHECK-ASM-AND-OBJ: th.lwuia
24 # CHECK-ASM: encoding: [0x0b,0xc5,0x05,0xd8]
25 th.lwuia a0, (a1), 0, 0
27 # CHECK-ASM-AND-OBJ: th.lwuib
28 # CHECK-ASM: encoding: [0x0b,0xc5,0xf5,0xca]
29 th.lwuib a0, (a1), 15, 1
31 # CHECK-ASM-AND-OBJ: th.lhia
32 # CHECK-ASM: encoding: [0x0b,0xc5,0x05,0x3c]
33 th.lhia a0, (a1), 0, 2
35 # CHECK-ASM-AND-OBJ: th.lhib
36 # CHECK-ASM: encoding: [0x0b,0xc5,0x05,0x2f]
37 th.lhib a0, (a1), -16, 3
39 # CHECK-ASM-AND-OBJ: th.lhuia
40 # CHECK-ASM: encoding: [0x0b,0xc5,0x05,0xb8]
41 th.lhuia a0, (a1), 0, 0
43 # CHECK-ASM-AND-OBJ: th.lhuib
44 # CHECK-ASM: encoding: [0x0b,0xc5,0xf5,0xaa]
45 th.lhuib a0, (a1), 15, 1
47 # CHECK-ASM-AND-OBJ: th.lbia
48 # CHECK-ASM: encoding: [0x0b,0xc5,0x05,0x1c]
49 th.lbia a0, (a1), 0, 2
51 # CHECK-ASM-AND-OBJ: th.lbib
52 # CHECK-ASM: encoding: [0x0b,0xc5,0x05,0x0f]
53 th.lbib a0, (a1), -16, 3
55 # CHECK-ASM-AND-OBJ: th.lbuia
56 # CHECK-ASM: encoding: [0x0b,0xc5,0x05,0x98]
57 th.lbuia a0, (a1), 0, 0
59 # CHECK-ASM-AND-OBJ: th.lbuib
60 # CHECK-ASM: encoding: [0x0b,0xc5,0xf5,0x8a]
61 th.lbuib a0, (a1), 15, 1
63 # CHECK-ASM-AND-OBJ: th.sdia
64 # CHECK-ASM: encoding: [0x0b,0xd5,0x05,0x79]
65 th.sdia a0, (a1), -16, 0
67 # CHECK-ASM-AND-OBJ: th.sdib
68 # CHECK-ASM: encoding: [0x0b,0xd5,0xf5,0x6b]
69 th.sdib a0, (a1), -1, 1
71 # CHECK-ASM-AND-OBJ: th.swia
72 # CHECK-ASM: encoding: [0x0b,0xd5,0x05,0x5c]
73 th.swia a0, (a1), 0, 2
75 # CHECK-ASM-AND-OBJ: th.swib
76 # CHECK-ASM: encoding: [0x0b,0xd5,0x15,0x4e]
77 th.swib a0, (a1), 1, 3
79 # CHECK-ASM-AND-OBJ: th.shia
80 # CHECK-ASM: encoding: [0x0b,0xd5,0x45,0x38]
81 th.shia a0, (a1), 4, 0
83 # CHECK-ASM-AND-OBJ: th.shib
84 # CHECK-ASM: encoding: [0x0b,0xd5,0xd5,0x2a]
85 th.shib a0, (a1), 13, 1
87 # CHECK-ASM-AND-OBJ: th.sbia
88 # CHECK-ASM: encoding: [0x0b,0xd5,0xe5,0x1c]
89 th.sbia a0, (a1), 14, 2
91 # CHECK-ASM-AND-OBJ: th.sbib
92 # CHECK-ASM: encoding: [0x0b,0xd5,0xf5,0x0e]
93 th.sbib a0, (a1), 15, 3
95 # CHECK-ASM-AND-OBJ: th.lrd
96 # CHECK-ASM: encoding: [0x0b,0xc5,0xc5,0x60]
97 th.lrd a0, a1, a2, 0
99 # CHECK-ASM-AND-OBJ: th.lrw
100 # CHECK-ASM: encoding: [0x0b,0xc5,0xc5,0x42]
101 th.lrw a0, a1, a2, 1
103 # CHECK-ASM-AND-OBJ: th.lrwu
104 # CHECK-ASM: encoding: [0x0b,0xc5,0xc5,0xc4]
105 th.lrwu a0, a1, a2, 2
107 # CHECK-ASM-AND-OBJ: th.lrh
108 # CHECK-ASM: encoding: [0x0b,0xc5,0xc5,0x26]
109 th.lrh a0, a1, a2, 3
111 # CHECK-ASM-AND-OBJ: th.lrhu
112 # CHECK-ASM: encoding: [0x0b,0xc5,0xc5,0xa0]
113 th.lrhu a0, a1, a2, 0
115 # CHECK-ASM-AND-OBJ: th.lrb
116 # CHECK-ASM: encoding: [0x0b,0xc5,0xc5,0x02]
117 th.lrb a0, a1, a2, 1
119 # CHECK-ASM-AND-OBJ: th.lrbu
120 # CHECK-ASM: encoding: [0x0b,0xc5,0xc5,0x84]
121 th.lrbu a0, a1, a2, 2
123 # CHECK-ASM-AND-OBJ: th.srd
124 # CHECK-ASM: encoding: [0x0b,0xd5,0xc5,0x66]
125 th.srd a0, a1, a2, 3
127 # CHECK-ASM-AND-OBJ: th.srw
128 # CHECK-ASM: encoding: [0x0b,0xd5,0xc5,0x40]
129 th.srw a0, a1, a2, 0
131 # CHECK-ASM-AND-OBJ: th.srh
132 # CHECK-ASM: encoding: [0x0b,0xd5,0xc5,0x22]
133 th.srh a0, a1, a2, 1
135 # CHECK-ASM-AND-OBJ: th.srb
136 # CHECK-ASM: encoding: [0x0b,0xd5,0xc5,0x04]
137 th.srb a0, a1, a2, 2
139 # CHECK-ASM-AND-OBJ: th.lurd
140 # CHECK-ASM: encoding: [0x0b,0xc5,0xc5,0x70]
141 th.lurd a0, a1, a2, 0
143 # CHECK-ASM-AND-OBJ: th.lurw
144 # CHECK-ASM: encoding: [0x0b,0xc5,0xc5,0x52]
145 th.lurw a0, a1, a2, 1
147 # CHECK-ASM-AND-OBJ: th.lurwu
148 # CHECK-ASM: encoding: [0x0b,0xc5,0xc5,0xd4]
149 th.lurwu a0, a1, a2, 2
151 # CHECK-ASM-AND-OBJ: th.lurh
152 # CHECK-ASM: encoding: [0x0b,0xc5,0xc5,0x36]
153 th.lurh a0, a1, a2, 3
155 # CHECK-ASM-AND-OBJ: th.lurhu
156 # CHECK-ASM: encoding: [0x0b,0xc5,0xc5,0xb0]
157 th.lurhu a0, a1, a2, 0
159 # CHECK-ASM-AND-OBJ: th.lurb
160 # CHECK-ASM: encoding: [0x0b,0xc5,0xc5,0x12]
161 th.lurb a0, a1, a2, 1
163 # CHECK-ASM-AND-OBJ: th.lurbu
164 # CHECK-ASM: encoding: [0x0b,0xc5,0xc5,0x94]
165 th.lurbu a0, a1, a2, 2
167 # CHECK-ASM-AND-OBJ: th.surd
168 # CHECK-ASM: encoding: [0x0b,0xd5,0xc5,0x76]
169 th.surd a0, a1, a2, 3
171 # CHECK-ASM-AND-OBJ: th.surw
172 # CHECK-ASM: encoding: [0x0b,0xd5,0xc5,0x50]
173 th.surw a0, a1, a2, 0
175 # CHECK-ASM-AND-OBJ: th.surh
176 # CHECK-ASM: encoding: [0x0b,0xd5,0xc5,0x32]
177 th.surh a0, a1, a2, 1
179 # CHECK-ASM-AND-OBJ: th.surb
180 # CHECK-ASM: encoding: [0x0b,0xd5,0xc5,0x14]
181 th.surb a0, a1, a2, 2