Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / MC / Sparc / sparc-mem-instructions.s
blobb087518b458684083714c8975c18399e96d2aae2
1 ! RUN: llvm-mc %s -triple=sparc -show-encoding | FileCheck %s --check-prefix=V8
2 ! RUN: llvm-mc %s -triple=sparcv9 -show-encoding | FileCheck %s --check-prefix=V9
4 ! V8: ldsb [%i0+%l6], %o2 ! encoding: [0xd4,0x4e,0x00,0x16]
5 ! V9: ldsb [%i0+%l6], %o2 ! encoding: [0xd4,0x4e,0x00,0x16]
6 ldsb [%i0 + %l6], %o2
7 ! V8: ldsb [%i0+32], %o2 ! encoding: [0xd4,0x4e,0x20,0x20]
8 ! V9: ldsb [%i0+32], %o2 ! encoding: [0xd4,0x4e,0x20,0x20]
9 ldsb [%i0 + 32], %o2
10 ! V8: ldsb [%g1], %o4 ! encoding: [0xd8,0x48,0x40,0x00]
11 ! V9: ldsb [%g1], %o4 ! encoding: [0xd8,0x48,0x40,0x00]
12 ldsb [%g1], %o4
13 ! V8: ldsba [%i0+%l6] 131, %o2 ! encoding: [0xd4,0xce,0x10,0x76]
14 ! V9: ldsba [%i0+%l6] #ASI_SNF, %o2 ! encoding: [0xd4,0xce,0x10,0x76]
15 ldsba [%i0 + %l6] 131, %o2
16 ! V8: ldsba [%i0+%l6] 131, %o2 ! encoding: [0xd4,0xce,0x10,0x76]
17 ! V9: ldsba [%i0+%l6] #ASI_SNF, %o2 ! encoding: [0xd4,0xce,0x10,0x76]
18 ldsba [%i0 + %l6] (130+1), %o2
20 ! V8: ldsh [%i0+%l6], %o2 ! encoding: [0xd4,0x56,0x00,0x16]
21 ! V9: ldsh [%i0+%l6], %o2 ! encoding: [0xd4,0x56,0x00,0x16]
22 ldsh [%i0 + %l6], %o2
23 ! V8: ldsh [%i0+32], %o2 ! encoding: [0xd4,0x56,0x20,0x20]
24 ! V9: ldsh [%i0+32], %o2 ! encoding: [0xd4,0x56,0x20,0x20]
25 ldsh [%i0 + 32], %o2
26 ! V8: ldsh [%g1], %o4 ! encoding: [0xd8,0x50,0x40,0x00]
27 ! V9: ldsh [%g1], %o4 ! encoding: [0xd8,0x50,0x40,0x00]
28 ldsh [%g1], %o4
29 ! V8: ldsha [%i0+%l6] 131, %o2 ! encoding: [0xd4,0xd6,0x10,0x76]
30 ! V9: ldsha [%i0+%l6] #ASI_SNF, %o2 ! encoding: [0xd4,0xd6,0x10,0x76]
31 ldsha [%i0 + %l6] 131, %o2
32 ! V8: ldsha [%i0+%l6] 131, %o2 ! encoding: [0xd4,0xd6,0x10,0x76]
33 ! V9: ldsha [%i0+%l6] #ASI_SNF, %o2 ! encoding: [0xd4,0xd6,0x10,0x76]
34 ldsha [%i0 + %l6] (130+1), %o2
36 ! V8: ldub [%i0+%l6], %o2 ! encoding: [0xd4,0x0e,0x00,0x16]
37 ! V9: ldub [%i0+%l6], %o2 ! encoding: [0xd4,0x0e,0x00,0x16]
38 ldub [%i0 + %l6], %o2
39 ! V8: ldub [%i0+32], %o2 ! encoding: [0xd4,0x0e,0x20,0x20]
40 ! V9: ldub [%i0+32], %o2 ! encoding: [0xd4,0x0e,0x20,0x20]
41 ldub [%i0 + 32], %o2
42 ! V8: ldub [%g1], %o2 ! encoding: [0xd4,0x08,0x40,0x00]
43 ! V9: ldub [%g1], %o2 ! encoding: [0xd4,0x08,0x40,0x00]
44 ldub [%g1], %o2
45 ! V8: lduba [%i0+%l6] 131, %o2 ! encoding: [0xd4,0x8e,0x10,0x76]
46 ! V9: lduba [%i0+%l6] #ASI_SNF, %o2 ! encoding: [0xd4,0x8e,0x10,0x76]
47 lduba [%i0 + %l6] 131, %o2
48 ! V8: lduba [%i0+%l6] 131, %o2 ! encoding: [0xd4,0x8e,0x10,0x76]
49 ! V9: lduba [%i0+%l6] #ASI_SNF, %o2 ! encoding: [0xd4,0x8e,0x10,0x76]
50 lduba [%i0 + %l6] (130+1), %o2
52 ! V8: lduh [%i0+%l6], %o2 ! encoding: [0xd4,0x16,0x00,0x16]
53 ! V9: lduh [%i0+%l6], %o2 ! encoding: [0xd4,0x16,0x00,0x16]
54 lduh [%i0 + %l6], %o2
55 ! V8: lduh [%i0+32], %o2 ! encoding: [0xd4,0x16,0x20,0x20]
56 ! V9: lduh [%i0+32], %o2 ! encoding: [0xd4,0x16,0x20,0x20]
57 lduh [%i0 + 32], %o2
58 ! V8: lduh [%g1], %o2 ! encoding: [0xd4,0x10,0x40,0x00]
59 ! V9: lduh [%g1], %o2 ! encoding: [0xd4,0x10,0x40,0x00]
60 lduh [%g1], %o2
61 ! V8: lduha [%i0+%l6] 131, %o2 ! encoding: [0xd4,0x96,0x10,0x76]
62 ! V9: lduha [%i0+%l6] #ASI_SNF, %o2 ! encoding: [0xd4,0x96,0x10,0x76]
63 lduha [%i0 + %l6] 131, %o2
64 ! V8: lduha [%i0+%l6] 131, %o2 ! encoding: [0xd4,0x96,0x10,0x76]
65 ! V9: lduha [%i0+%l6] #ASI_SNF, %o2 ! encoding: [0xd4,0x96,0x10,0x76]
66 lduha [%i0 + %l6] (130+1), %o2
68 ! V8: ld [%i0+%l6], %o2 ! encoding: [0xd4,0x06,0x00,0x16]
69 ! V9: ld [%i0+%l6], %o2 ! encoding: [0xd4,0x06,0x00,0x16]
70 ld [%i0 + %l6], %o2
71 ! V8: ld [%i0+32], %o2 ! encoding: [0xd4,0x06,0x20,0x20]
72 ! V9: ld [%i0+32], %o2 ! encoding: [0xd4,0x06,0x20,0x20]
73 ld [%i0 + 32], %o2
74 ! V8: ld [%g1], %o2 ! encoding: [0xd4,0x00,0x40,0x00]
75 ! V9: ld [%g1], %o2 ! encoding: [0xd4,0x00,0x40,0x00]
76 ld [%g1], %o2
77 ! V8: lda [%i0+%l6] 131, %o2 ! encoding: [0xd4,0x86,0x10,0x76]
78 ! V9: lda [%i0+%l6] #ASI_SNF, %o2 ! encoding: [0xd4,0x86,0x10,0x76]
79 lda [%i0 + %l6] 131, %o2
80 ! V8: lda [%i0+%l6] 131, %o2 ! encoding: [0xd4,0x86,0x10,0x76]
81 ! V9: lda [%i0+%l6] #ASI_SNF, %o2 ! encoding: [0xd4,0x86,0x10,0x76]
82 lda [%i0 + %l6] (130+1), %o2
84 ! V8: ldd [%i0+%l6], %o2 ! encoding: [0xd4,0x1e,0x00,0x16]
85 ! V9: ldd [%i0+%l6], %o2 ! encoding: [0xd4,0x1e,0x00,0x16]
86 ldd [%i0 + %l6], %o2
87 ! V8: ldd [%i0+32], %o2 ! encoding: [0xd4,0x1e,0x20,0x20]
88 ! V9: ldd [%i0+32], %o2 ! encoding: [0xd4,0x1e,0x20,0x20]
89 ldd [%i0 + 32], %o2
90 ! V8: ldd [%g1], %o2 ! encoding: [0xd4,0x18,0x40,0x00]
91 ! V9: ldd [%g1], %o2 ! encoding: [0xd4,0x18,0x40,0x00]
92 ldd [%g1], %o2
93 ! V8: ldda [%i0+%l6] 131, %o2 ! encoding: [0xd4,0x9e,0x10,0x76]
94 ! V9: ldda [%i0+%l6] #ASI_SNF, %o2 ! encoding: [0xd4,0x9e,0x10,0x76]
95 ldda [%i0 + %l6] 131, %o2
96 ! V8: ldda [%i0+%l6] 131, %o2 ! encoding: [0xd4,0x9e,0x10,0x76]
97 ! V9: ldda [%i0+%l6] #ASI_SNF, %o2 ! encoding: [0xd4,0x9e,0x10,0x76]
98 ldda [%i0 + %l6] (130+1), %o2
100 ! V8: stb %o2, [%i0+%l6] ! encoding: [0xd4,0x2e,0x00,0x16]
101 ! V9: stb %o2, [%i0+%l6] ! encoding: [0xd4,0x2e,0x00,0x16]
102 stb %o2, [%i0 + %l6]
103 ! V8: stb %o2, [%i0+32] ! encoding: [0xd4,0x2e,0x20,0x20]
104 ! V9: stb %o2, [%i0+32] ! encoding: [0xd4,0x2e,0x20,0x20]
105 stb %o2, [%i0 + 32]
106 ! V8: stb %o2, [%g1] ! encoding: [0xd4,0x28,0x40,0x00]
107 ! V9: stb %o2, [%g1] ! encoding: [0xd4,0x28,0x40,0x00]
108 stb %o2, [%g1]
109 ! V8: stb %o2, [%g1] ! encoding: [0xd4,0x28,0x40,0x00]
110 ! V9: stb %o2, [%g1] ! encoding: [0xd4,0x28,0x40,0x00]
111 stub %o2, [%g1]
112 ! V8: stb %o2, [%g1] ! encoding: [0xd4,0x28,0x40,0x00]
113 ! V9: stb %o2, [%g1] ! encoding: [0xd4,0x28,0x40,0x00]
114 stsb %o2, [%g1]
115 ! V8: stba %o2, [%i0+%l6] 131 ! encoding: [0xd4,0xae,0x10,0x76]
116 ! V9: stba %o2, [%i0+%l6] #ASI_SNF ! encoding: [0xd4,0xae,0x10,0x76]
117 stba %o2, [%i0 + %l6] 131
118 ! V8: stba %o2, [%i0+%l6] 131 ! encoding: [0xd4,0xae,0x10,0x76]
119 ! V9: stba %o2, [%i0+%l6] #ASI_SNF ! encoding: [0xd4,0xae,0x10,0x76]
120 stba %o2, [%i0 + %l6] (130+1)
121 ! V8: stba %o2, [%i0+%l6] 131 ! encoding: [0xd4,0xae,0x10,0x76]
122 ! V9: stba %o2, [%i0+%l6] #ASI_SNF ! encoding: [0xd4,0xae,0x10,0x76]
123 stuba %o2, [%i0 + %l6] 131
124 ! V8: stba %o2, [%i0+%l6] 131 ! encoding: [0xd4,0xae,0x10,0x76]
125 ! V9: stba %o2, [%i0+%l6] #ASI_SNF ! encoding: [0xd4,0xae,0x10,0x76]
126 stuba %o2, [%i0 + %l6] (130+1)
127 ! V8: stba %o2, [%i0+%l6] 131 ! encoding: [0xd4,0xae,0x10,0x76]
128 ! V9: stba %o2, [%i0+%l6] #ASI_SNF ! encoding: [0xd4,0xae,0x10,0x76]
129 stsba %o2, [%i0 + %l6] 131
130 ! V8: stba %o2, [%i0+%l6] 131 ! encoding: [0xd4,0xae,0x10,0x76]
131 ! V9: stba %o2, [%i0+%l6] #ASI_SNF ! encoding: [0xd4,0xae,0x10,0x76]
132 stsba %o2, [%i0 + %l6] (130+1)
134 ! V8: sth %o2, [%i0+%l6] ! encoding: [0xd4,0x36,0x00,0x16]
135 ! V9: sth %o2, [%i0+%l6] ! encoding: [0xd4,0x36,0x00,0x16]
136 sth %o2, [%i0 + %l6]
137 ! V8: sth %o2, [%i0+32] ! encoding: [0xd4,0x36,0x20,0x20]
138 ! V9: sth %o2, [%i0+32] ! encoding: [0xd4,0x36,0x20,0x20]
139 sth %o2, [%i0 + 32]
140 ! V8: sth %o2, [%g1] ! encoding: [0xd4,0x30,0x40,0x00]
141 ! V9: sth %o2, [%g1] ! encoding: [0xd4,0x30,0x40,0x00]
142 sth %o2, [%g1]
143 ! V8: sth %o2, [%g1] ! encoding: [0xd4,0x30,0x40,0x00]
144 ! V9: sth %o2, [%g1] ! encoding: [0xd4,0x30,0x40,0x00]
145 stuh %o2, [%g1]
146 ! V8: sth %o2, [%g1] ! encoding: [0xd4,0x30,0x40,0x00]
147 ! V9: sth %o2, [%g1] ! encoding: [0xd4,0x30,0x40,0x00]
148 stsh %o2, [%g1]
149 ! V8: stha %o2, [%i0+%l6] 131 ! encoding: [0xd4,0xb6,0x10,0x76]
150 ! V9: stha %o2, [%i0+%l6] #ASI_SNF ! encoding: [0xd4,0xb6,0x10,0x76]
151 stha %o2, [%i0 + %l6] 131
152 ! V8: stha %o2, [%i0+%l6] 131 ! encoding: [0xd4,0xb6,0x10,0x76]
153 ! V9: stha %o2, [%i0+%l6] #ASI_SNF ! encoding: [0xd4,0xb6,0x10,0x76]
154 stha %o2, [%i0 + %l6] (130+1)
155 ! V8: stha %o2, [%i0+%l6] 131 ! encoding: [0xd4,0xb6,0x10,0x76]
156 ! V9: stha %o2, [%i0+%l6] #ASI_SNF ! encoding: [0xd4,0xb6,0x10,0x76]
157 stuha %o2, [%i0 + %l6] 131
158 ! V8: stha %o2, [%i0+%l6] 131 ! encoding: [0xd4,0xb6,0x10,0x76]
159 ! V9: stha %o2, [%i0+%l6] #ASI_SNF ! encoding: [0xd4,0xb6,0x10,0x76]
160 stuha %o2, [%i0 + %l6] (130+1)
161 ! V8: stha %o2, [%i0+%l6] 131 ! encoding: [0xd4,0xb6,0x10,0x76]
162 ! V9: stha %o2, [%i0+%l6] #ASI_SNF ! encoding: [0xd4,0xb6,0x10,0x76]
163 stsha %o2, [%i0 + %l6] 131
164 ! V8: stha %o2, [%i0+%l6] 131 ! encoding: [0xd4,0xb6,0x10,0x76]
165 ! V9: stha %o2, [%i0+%l6] #ASI_SNF ! encoding: [0xd4,0xb6,0x10,0x76]
166 stsha %o2, [%i0 + %l6] (130+1)
168 ! V8: st %o2, [%i0+%l6] ! encoding: [0xd4,0x26,0x00,0x16]
169 ! V9: st %o2, [%i0+%l6] ! encoding: [0xd4,0x26,0x00,0x16]
170 st %o2, [%i0 + %l6]
171 ! V8: st %o2, [%i0+32] ! encoding: [0xd4,0x26,0x20,0x20]
172 ! V9: st %o2, [%i0+32] ! encoding: [0xd4,0x26,0x20,0x20]
173 st %o2, [%i0 + 32]
174 ! V8: st %o2, [%g1] ! encoding: [0xd4,0x20,0x40,0x00]
175 ! V9: st %o2, [%g1] ! encoding: [0xd4,0x20,0x40,0x00]
176 st %o2, [%g1]
177 ! V8: sta %o2, [%i0+%l6] 131 ! encoding: [0xd4,0xa6,0x10,0x76]
178 ! V9: sta %o2, [%i0+%l6] #ASI_SNF ! encoding: [0xd4,0xa6,0x10,0x76]
179 sta %o2, [%i0 + %l6] 131
180 ! V8: sta %o2, [%i0+%l6] 131 ! encoding: [0xd4,0xa6,0x10,0x76]
181 ! V9: sta %o2, [%i0+%l6] #ASI_SNF ! encoding: [0xd4,0xa6,0x10,0x76]
182 sta %o2, [%i0 + %l6] (130+1)
184 ! V8: std %o2, [%i0+%l6] ! encoding: [0xd4,0x3e,0x00,0x16]
185 ! V9: std %o2, [%i0+%l6] ! encoding: [0xd4,0x3e,0x00,0x16]
186 std %o2, [%i0 + %l6]
187 ! V8: std %o2, [%i0+32] ! encoding: [0xd4,0x3e,0x20,0x20]
188 ! V9: std %o2, [%i0+32] ! encoding: [0xd4,0x3e,0x20,0x20]
189 std %o2, [%i0 + 32]
190 ! V8: std %o2, [%g1] ! encoding: [0xd4,0x38,0x40,0x00]
191 ! V9: std %o2, [%g1] ! encoding: [0xd4,0x38,0x40,0x00]
192 std %o2, [%g1]
193 ! V8: stda %o2, [%i0+%l6] 131 ! encoding: [0xd4,0xbe,0x10,0x76]
194 ! V9: stda %o2, [%i0+%l6] #ASI_SNF ! encoding: [0xd4,0xbe,0x10,0x76]
195 stda %o2, [%i0 + %l6] 131
196 ! V8: stda %o2, [%i0+%l6] 131 ! encoding: [0xd4,0xbe,0x10,0x76]
197 ! V9: stda %o2, [%i0+%l6] #ASI_SNF ! encoding: [0xd4,0xbe,0x10,0x76]
198 stda %o2, [%i0 + %l6] (130+1)
200 ! V8: flush %g1+%g2 ! encoding: [0x81,0xd8,0x40,0x02]
201 ! V9: flush %g1+%g2 ! encoding: [0x81,0xd8,0x40,0x02]
202 flush %g1 + %g2
203 ! V8: flush %g1+8 ! encoding: [0x81,0xd8,0x60,0x08]
204 ! V9: flush %g1+8 ! encoding: [0x81,0xd8,0x60,0x08]
205 flush %g1 + 8
206 ! V8: flush %g1 ! encoding: [0x81,0xd8,0x40,0x00]
207 ! V9: flush %g1 ! encoding: [0x81,0xd8,0x40,0x00]
208 flush %g1
209 ! Not specified in manual, but accepted by gas.
210 ! V8: flush %g0 ! encoding: [0x81,0xd8,0x00,0x00]
211 ! V9: flush %g0 ! encoding: [0x81,0xd8,0x00,0x00]
212 flush
213 ! V8: flush %g0 ! encoding: [0x81,0xd8,0x00,0x00]
214 ! V9: flush %g0 ! encoding: [0x81,0xd8,0x00,0x00]
215 iflush