1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -O0 -mtriple=mipsel-linux-gnu -run-pass=legalizer -verify-machineinstrs %s -o - | FileCheck %s -check-prefixes=MIPS32
3 # RUN: llc -O0 -mtriple=mipsel-linux-gnu -run-pass=legalizer -mcpu=mips32r6 -verify-machineinstrs %s -o - | FileCheck %s -check-prefixes=MIPS32R6
6 @float_align1 = common global float 0.000000e+00, align 1
7 @float_align2 = common global float 0.000000e+00, align 2
8 @float_align4 = common global float 0.000000e+00, align 4
9 @float_align8 = common global float 0.000000e+00, align 8
10 @i32_align1 = common global i32 0, align 1
11 @i32_align2 = common global i32 0, align 2
12 @i32_align4 = common global i32 0, align 4
13 @i32_align8 = common global i32 0, align 8
15 define void @store_float_align1(float %a) {
17 store float %a, ptr @float_align1, align 1
21 define void @store_float_align2(float %a) {
23 store float %a, ptr @float_align2, align 2
27 define void @store_float_align4(float %a) {
29 store float %a, ptr @float_align4, align 4
33 define void @store_float_align8(float %a) {
35 store float %a, ptr @float_align8, align 8
39 define void @store_i32_align1(i32 signext %a) {
41 store i32 %a, ptr @i32_align1, align 1
45 define void @store_i32_align2(i32 signext %a) {
47 store i32 %a, ptr @i32_align2, align 2
51 define void @store_i32_align4(i32 signext %a) {
53 store i32 %a, ptr @i32_align4, align 4
57 define void @store_i32_align8(i32 signext %a) {
59 store i32 %a, ptr @i32_align8, align 8
65 name: store_float_align1
67 tracksRegLiveness: true
72 ; MIPS32-LABEL: name: store_float_align1
73 ; MIPS32: liveins: $f12
74 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $f12
75 ; MIPS32: [[GV:%[0-9]+]]:_(p0) = G_GLOBAL_VALUE @float_align1
76 ; MIPS32: G_STORE [[COPY]](s32), [[GV]](p0) :: (store (s32) into @float_align1, align 1)
78 ; MIPS32R6-LABEL: name: store_float_align1
79 ; MIPS32R6: liveins: $f12
80 ; MIPS32R6: [[COPY:%[0-9]+]]:_(s32) = COPY $f12
81 ; MIPS32R6: [[GV:%[0-9]+]]:_(p0) = G_GLOBAL_VALUE @float_align1
82 ; MIPS32R6: G_STORE [[COPY]](s32), [[GV]](p0) :: (store (s32) into @float_align1, align 1)
85 %1:_(p0) = G_GLOBAL_VALUE @float_align1
86 G_STORE %0(s32), %1(p0) :: (store (s32) into @float_align1, align 1)
91 name: store_float_align2
93 tracksRegLiveness: true
98 ; MIPS32-LABEL: name: store_float_align2
99 ; MIPS32: liveins: $f12
100 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $f12
101 ; MIPS32: [[GV:%[0-9]+]]:_(p0) = G_GLOBAL_VALUE @float_align2
102 ; MIPS32: G_STORE [[COPY]](s32), [[GV]](p0) :: (store (s32) into @float_align2, align 2)
104 ; MIPS32R6-LABEL: name: store_float_align2
105 ; MIPS32R6: liveins: $f12
106 ; MIPS32R6: [[COPY:%[0-9]+]]:_(s32) = COPY $f12
107 ; MIPS32R6: [[GV:%[0-9]+]]:_(p0) = G_GLOBAL_VALUE @float_align2
108 ; MIPS32R6: G_STORE [[COPY]](s32), [[GV]](p0) :: (store (s32) into @float_align2, align 2)
110 %0:_(s32) = COPY $f12
111 %1:_(p0) = G_GLOBAL_VALUE @float_align2
112 G_STORE %0(s32), %1(p0) :: (store (s32) into @float_align2, align 2)
117 name: store_float_align4
119 tracksRegLiveness: true
124 ; MIPS32-LABEL: name: store_float_align4
125 ; MIPS32: liveins: $f12
126 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $f12
127 ; MIPS32: [[GV:%[0-9]+]]:_(p0) = G_GLOBAL_VALUE @float_align4
128 ; MIPS32: G_STORE [[COPY]](s32), [[GV]](p0) :: (store (s32) into @float_align4)
130 ; MIPS32R6-LABEL: name: store_float_align4
131 ; MIPS32R6: liveins: $f12
132 ; MIPS32R6: [[COPY:%[0-9]+]]:_(s32) = COPY $f12
133 ; MIPS32R6: [[GV:%[0-9]+]]:_(p0) = G_GLOBAL_VALUE @float_align4
134 ; MIPS32R6: G_STORE [[COPY]](s32), [[GV]](p0) :: (store (s32) into @float_align4)
136 %0:_(s32) = COPY $f12
137 %1:_(p0) = G_GLOBAL_VALUE @float_align4
138 G_STORE %0(s32), %1(p0) :: (store (s32) into @float_align4)
143 name: store_float_align8
145 tracksRegLiveness: true
150 ; MIPS32-LABEL: name: store_float_align8
151 ; MIPS32: liveins: $f12
152 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $f12
153 ; MIPS32: [[GV:%[0-9]+]]:_(p0) = G_GLOBAL_VALUE @float_align8
154 ; MIPS32: G_STORE [[COPY]](s32), [[GV]](p0) :: (store (s32) into @float_align8, align 8)
156 ; MIPS32R6-LABEL: name: store_float_align8
157 ; MIPS32R6: liveins: $f12
158 ; MIPS32R6: [[COPY:%[0-9]+]]:_(s32) = COPY $f12
159 ; MIPS32R6: [[GV:%[0-9]+]]:_(p0) = G_GLOBAL_VALUE @float_align8
160 ; MIPS32R6: G_STORE [[COPY]](s32), [[GV]](p0) :: (store (s32) into @float_align8, align 8)
162 %0:_(s32) = COPY $f12
163 %1:_(p0) = G_GLOBAL_VALUE @float_align8
164 G_STORE %0(s32), %1(p0) :: (store (s32) into @float_align8, align 8)
169 name: store_i32_align1
171 tracksRegLiveness: true
176 ; MIPS32-LABEL: name: store_i32_align1
177 ; MIPS32: liveins: $a0
178 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
179 ; MIPS32: [[GV:%[0-9]+]]:_(p0) = G_GLOBAL_VALUE @i32_align1
180 ; MIPS32: G_STORE [[COPY]](s32), [[GV]](p0) :: (store (s32) into @i32_align1, align 1)
182 ; MIPS32R6-LABEL: name: store_i32_align1
183 ; MIPS32R6: liveins: $a0
184 ; MIPS32R6: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
185 ; MIPS32R6: [[GV:%[0-9]+]]:_(p0) = G_GLOBAL_VALUE @i32_align1
186 ; MIPS32R6: G_STORE [[COPY]](s32), [[GV]](p0) :: (store (s32) into @i32_align1, align 1)
189 %1:_(p0) = G_GLOBAL_VALUE @i32_align1
190 G_STORE %0(s32), %1(p0) :: (store (s32) into @i32_align1, align 1)
195 name: store_i32_align2
197 tracksRegLiveness: true
202 ; MIPS32-LABEL: name: store_i32_align2
203 ; MIPS32: liveins: $a0
204 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
205 ; MIPS32: [[GV:%[0-9]+]]:_(p0) = G_GLOBAL_VALUE @i32_align2
206 ; MIPS32: G_STORE [[COPY]](s32), [[GV]](p0) :: (store (s32) into @i32_align2, align 2)
208 ; MIPS32R6-LABEL: name: store_i32_align2
209 ; MIPS32R6: liveins: $a0
210 ; MIPS32R6: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
211 ; MIPS32R6: [[GV:%[0-9]+]]:_(p0) = G_GLOBAL_VALUE @i32_align2
212 ; MIPS32R6: G_STORE [[COPY]](s32), [[GV]](p0) :: (store (s32) into @i32_align2, align 2)
215 %1:_(p0) = G_GLOBAL_VALUE @i32_align2
216 G_STORE %0(s32), %1(p0) :: (store (s32) into @i32_align2, align 2)
221 name: store_i32_align4
223 tracksRegLiveness: true
228 ; MIPS32-LABEL: name: store_i32_align4
229 ; MIPS32: liveins: $a0
230 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
231 ; MIPS32: [[GV:%[0-9]+]]:_(p0) = G_GLOBAL_VALUE @i32_align4
232 ; MIPS32: G_STORE [[COPY]](s32), [[GV]](p0) :: (store (s32) into @i32_align4)
234 ; MIPS32R6-LABEL: name: store_i32_align4
235 ; MIPS32R6: liveins: $a0
236 ; MIPS32R6: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
237 ; MIPS32R6: [[GV:%[0-9]+]]:_(p0) = G_GLOBAL_VALUE @i32_align4
238 ; MIPS32R6: G_STORE [[COPY]](s32), [[GV]](p0) :: (store (s32) into @i32_align4)
241 %1:_(p0) = G_GLOBAL_VALUE @i32_align4
242 G_STORE %0(s32), %1(p0) :: (store (s32) into @i32_align4)
247 name: store_i32_align8
249 tracksRegLiveness: true
254 ; MIPS32-LABEL: name: store_i32_align8
255 ; MIPS32: liveins: $a0
256 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
257 ; MIPS32: [[GV:%[0-9]+]]:_(p0) = G_GLOBAL_VALUE @i32_align8
258 ; MIPS32: G_STORE [[COPY]](s32), [[GV]](p0) :: (store (s32) into @i32_align8, align 8)
260 ; MIPS32R6-LABEL: name: store_i32_align8
261 ; MIPS32R6: liveins: $a0
262 ; MIPS32R6: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
263 ; MIPS32R6: [[GV:%[0-9]+]]:_(p0) = G_GLOBAL_VALUE @i32_align8
264 ; MIPS32R6: G_STORE [[COPY]](s32), [[GV]](p0) :: (store (s32) into @i32_align8, align 8)
267 %1:_(p0) = G_GLOBAL_VALUE @i32_align8
268 G_STORE %0(s32), %1(p0) :: (store (s32) into @i32_align8, align 8)