1 ; RUN: llc -march=mipsel --disable-machine-licm -mcpu=mips32 < %s | FileCheck %s -check-prefix=ALL -check-prefix=MIPS32-ANY -check-prefix=NO-SEB-SEH -check-prefix=CHECK-EL
2 ; RUN: llc -march=mipsel --disable-machine-licm -mcpu=mips32r2 < %s | FileCheck %s -check-prefix=ALL -check-prefix=MIPS32-ANY -check-prefix=HAS-SEB-SEH -check-prefix=CHECK-EL
3 ; RUN: llc -march=mipsel --disable-machine-licm -mcpu=mips32r6 < %s | FileCheck %s -check-prefix=ALL -check-prefix=MIPS32-ANY -check-prefix=HAS-SEB-SEH -check-prefix=CHECK-EL
4 ; RUN: llc -march=mips64el --disable-machine-licm -mcpu=mips4 < %s | FileCheck %s -check-prefix=ALL -check-prefix=MIPS64-ANY -check-prefix=NO-SEB-SEH -check-prefix=CHECK-EL
5 ; RUN: llc -march=mips64el --disable-machine-licm -mcpu=mips64 < %s | FileCheck %s -check-prefix=ALL -check-prefix=MIPS64-ANY -check-prefix=NO-SEB-SEH -check-prefix=CHECK-EL
6 ; RUN: llc -march=mips64el --disable-machine-licm -mcpu=mips64r2 < %s | FileCheck %s -check-prefix=ALL -check-prefix=MIPS64-ANY -check-prefix=HAS-SEB-SEH -check-prefix=CHECK-EL
7 ; RUN: llc -march=mips64el --disable-machine-licm -mcpu=mips64r6 < %s | FileCheck %s -check-prefix=ALL -check-prefix=MIPS64-ANY -check-prefix=HAS-SEB-SEH -check-prefix=CHECK-EL
9 ; Keep one big-endian check so that we don't reduce testing, but don't add more
10 ; since endianness doesn't affect the body of the atomic operations.
11 ; RUN: llc -march=mips --disable-machine-licm -mcpu=mips32 < %s | FileCheck %s -check-prefix=ALL -check-prefix=MIPS32-ANY -check-prefix=NO-SEB-SEH -check-prefix=CHECK-EB
13 @x = common global i32 0, align 4
15 define i32 @AtomicLoadAdd32(i32 signext %incr) nounwind {
17 %0 = atomicrmw add i32* @x, i32 %incr monotonic
20 ; ALL-LABEL: AtomicLoadAdd32:
22 ; MIPS32-ANY: lw $[[R0:[0-9]+]], %got(x)
23 ; MIPS64-ANY: ld $[[R0:[0-9]+]], %got_disp(x)(
25 ; ALL: $[[BB0:[A-Z_0-9]+]]:
26 ; ALL: ll $[[R1:[0-9]+]], 0($[[R0]])
27 ; ALL: addu $[[R2:[0-9]+]], $[[R1]], $4
28 ; ALL: sc $[[R2]], 0($[[R0]])
29 ; ALL: beqz $[[R2]], $[[BB0]]
32 define i32 @AtomicLoadNand32(i32 signext %incr) nounwind {
34 %0 = atomicrmw nand i32* @x, i32 %incr monotonic
37 ; ALL-LABEL: AtomicLoadNand32:
39 ; MIPS32-ANY: lw $[[R0:[0-9]+]], %got(x)
40 ; MIPS64-ANY: ld $[[R0:[0-9]+]], %got_disp(x)(
42 ; ALL: $[[BB0:[A-Z_0-9]+]]:
43 ; ALL: ll $[[R1:[0-9]+]], 0($[[R0]])
44 ; ALL: and $[[R3:[0-9]+]], $[[R1]], $4
45 ; ALL: nor $[[R2:[0-9]+]], $zero, $[[R3]]
46 ; ALL: sc $[[R2]], 0($[[R0]])
47 ; ALL: beqz $[[R2]], $[[BB0]]
50 define i32 @AtomicSwap32(i32 signext %newval) nounwind {
52 %newval.addr = alloca i32, align 4
53 store i32 %newval, i32* %newval.addr, align 4
54 %tmp = load i32* %newval.addr, align 4
55 %0 = atomicrmw xchg i32* @x, i32 %tmp monotonic
58 ; ALL-LABEL: AtomicSwap32:
60 ; MIPS32-ANY: lw $[[R0:[0-9]+]], %got(x)
61 ; MIPS64-ANY: ld $[[R0:[0-9]+]], %got_disp(x)
63 ; ALL: $[[BB0:[A-Z_0-9]+]]:
64 ; ALL: ll ${{[0-9]+}}, 0($[[R0]])
65 ; ALL: sc $[[R2:[0-9]+]], 0($[[R0]])
66 ; ALL: beqz $[[R2]], $[[BB0]]
69 define i32 @AtomicCmpSwap32(i32 signext %oldval, i32 signext %newval) nounwind {
71 %newval.addr = alloca i32, align 4
72 store i32 %newval, i32* %newval.addr, align 4
73 %tmp = load i32* %newval.addr, align 4
74 %0 = cmpxchg i32* @x, i32 %oldval, i32 %tmp monotonic monotonic
75 %1 = extractvalue { i32, i1 } %0, 0
78 ; ALL-LABEL: AtomicCmpSwap32:
80 ; MIPS32-ANY: lw $[[R0:[0-9]+]], %got(x)
81 ; MIPS64-ANY: ld $[[R0:[0-9]+]], %got_disp(x)(
83 ; ALL: $[[BB0:[A-Z_0-9]+]]:
84 ; ALL: ll $2, 0($[[R0]])
85 ; ALL: bne $2, $4, $[[BB1:[A-Z_0-9]+]]
86 ; ALL: sc $[[R2:[0-9]+]], 0($[[R0]])
87 ; ALL: beqz $[[R2]], $[[BB0]]
93 @y = common global i8 0, align 1
95 define signext i8 @AtomicLoadAdd8(i8 signext %incr) nounwind {
97 %0 = atomicrmw add i8* @y, i8 %incr monotonic
100 ; ALL-LABEL: AtomicLoadAdd8:
102 ; MIPS32-ANY: lw $[[R0:[0-9]+]], %got(y)
103 ; MIPS64-ANY: ld $[[R0:[0-9]+]], %got_disp(y)(
105 ; ALL: addiu $[[R1:[0-9]+]], $zero, -4
106 ; ALL: and $[[R2:[0-9]+]], $[[R0]], $[[R1]]
107 ; ALL: andi $[[R3:[0-9]+]], $[[R0]], 3
108 ; CHECK-EB: xori $[[R4:[0-9]+]], $[[R3]], 3
109 ; CHECK-EB: sll $[[R5:[0-9]+]], $[[R4]], 3
110 ; CHECK-EL: sll $[[R5:[0-9]+]], $[[R3]], 3
111 ; ALL: ori $[[R6:[0-9]+]], $zero, 255
112 ; ALL: sllv $[[R7:[0-9]+]], $[[R6]], $[[R5]]
113 ; ALL: nor $[[R8:[0-9]+]], $zero, $[[R7]]
114 ; ALL: sllv $[[R9:[0-9]+]], $4, $[[R5]]
116 ; ALL: $[[BB0:[A-Z_0-9]+]]:
117 ; ALL: ll $[[R10:[0-9]+]], 0($[[R2]])
118 ; ALL: addu $[[R11:[0-9]+]], $[[R10]], $[[R9]]
119 ; ALL: and $[[R12:[0-9]+]], $[[R11]], $[[R7]]
120 ; ALL: and $[[R13:[0-9]+]], $[[R10]], $[[R8]]
121 ; ALL: or $[[R14:[0-9]+]], $[[R13]], $[[R12]]
122 ; ALL: sc $[[R14]], 0($[[R2]])
123 ; ALL: beqz $[[R14]], $[[BB0]]
125 ; ALL: and $[[R15:[0-9]+]], $[[R10]], $[[R7]]
126 ; ALL: srlv $[[R16:[0-9]+]], $[[R15]], $[[R5]]
128 ; NO-SEB-SEH: sll $[[R17:[0-9]+]], $[[R16]], 24
129 ; NO-SEB-SEH: sra $2, $[[R17]], 24
131 ; HAS-SEB-SEH: seb $2, $[[R16]]
134 define signext i8 @AtomicLoadSub8(i8 signext %incr) nounwind {
136 %0 = atomicrmw sub i8* @y, i8 %incr monotonic
139 ; ALL-LABEL: AtomicLoadSub8:
141 ; MIPS32-ANY: lw $[[R0:[0-9]+]], %got(y)
142 ; MIPS64-ANY: ld $[[R0:[0-9]+]], %got_disp(y)(
144 ; ALL: addiu $[[R1:[0-9]+]], $zero, -4
145 ; ALL: and $[[R2:[0-9]+]], $[[R0]], $[[R1]]
146 ; ALL: andi $[[R3:[0-9]+]], $[[R0]], 3
147 ; CHECK-EL: sll $[[R5:[0-9]+]], $[[R3]], 3
148 ; CHECK-EB: xori $[[R4:[0-9]+]], $[[R3]], 3
149 ; CHECK-EB: sll $[[R5:[0-9]+]], $[[R4]], 3
150 ; ALL: ori $[[R6:[0-9]+]], $zero, 255
151 ; ALL: sllv $[[R7:[0-9]+]], $[[R6]], $[[R5]]
152 ; ALL: nor $[[R8:[0-9]+]], $zero, $[[R7]]
153 ; ALL: sllv $[[R9:[0-9]+]], $4, $[[R5]]
155 ; ALL: $[[BB0:[A-Z_0-9]+]]:
156 ; ALL: ll $[[R10:[0-9]+]], 0($[[R2]])
157 ; ALL: subu $[[R11:[0-9]+]], $[[R10]], $[[R9]]
158 ; ALL: and $[[R12:[0-9]+]], $[[R11]], $[[R7]]
159 ; ALL: and $[[R13:[0-9]+]], $[[R10]], $[[R8]]
160 ; ALL: or $[[R14:[0-9]+]], $[[R13]], $[[R12]]
161 ; ALL: sc $[[R14]], 0($[[R2]])
162 ; ALL: beqz $[[R14]], $[[BB0]]
164 ; ALL: and $[[R15:[0-9]+]], $[[R10]], $[[R7]]
165 ; ALL: srlv $[[R16:[0-9]+]], $[[R15]], $[[R5]]
167 ; NO-SEB-SEH: sll $[[R17:[0-9]+]], $[[R16]], 24
168 ; NO-SEB-SEH: sra $2, $[[R17]], 24
170 ; HAS-SEB-SEH:seb $2, $[[R16]]
173 define signext i8 @AtomicLoadNand8(i8 signext %incr) nounwind {
175 %0 = atomicrmw nand i8* @y, i8 %incr monotonic
178 ; ALL-LABEL: AtomicLoadNand8:
180 ; MIPS32-ANY: lw $[[R0:[0-9]+]], %got(y)
181 ; MIPS64-ANY: ld $[[R0:[0-9]+]], %got_disp(y)(
183 ; ALL: addiu $[[R1:[0-9]+]], $zero, -4
184 ; ALL: and $[[R2:[0-9]+]], $[[R0]], $[[R1]]
185 ; ALL: andi $[[R3:[0-9]+]], $[[R0]], 3
186 ; CHECK-EL: sll $[[R5:[0-9]+]], $[[R3]], 3
187 ; CHECK-EB: xori $[[R4:[0-9]+]], $[[R3]], 3
188 ; CHECK-EB: sll $[[R5:[0-9]+]], $[[R4]], 3
189 ; ALL: ori $[[R6:[0-9]+]], $zero, 255
190 ; ALL: sllv $[[R7:[0-9]+]], $[[R6]], $[[R5]]
191 ; ALL: nor $[[R8:[0-9]+]], $zero, $[[R7]]
192 ; ALL: sllv $[[R9:[0-9]+]], $4, $[[R5]]
194 ; ALL: $[[BB0:[A-Z_0-9]+]]:
195 ; ALL: ll $[[R10:[0-9]+]], 0($[[R2]])
196 ; ALL: and $[[R18:[0-9]+]], $[[R10]], $[[R9]]
197 ; ALL: nor $[[R11:[0-9]+]], $zero, $[[R18]]
198 ; ALL: and $[[R12:[0-9]+]], $[[R11]], $[[R7]]
199 ; ALL: and $[[R13:[0-9]+]], $[[R10]], $[[R8]]
200 ; ALL: or $[[R14:[0-9]+]], $[[R13]], $[[R12]]
201 ; ALL: sc $[[R14]], 0($[[R2]])
202 ; ALL: beqz $[[R14]], $[[BB0]]
204 ; ALL: and $[[R15:[0-9]+]], $[[R10]], $[[R7]]
205 ; ALL: srlv $[[R16:[0-9]+]], $[[R15]], $[[R5]]
207 ; NO-SEB-SEH: sll $[[R17:[0-9]+]], $[[R16]], 24
208 ; NO-SEB-SEH: sra $2, $[[R17]], 24
210 ; HAS-SEB-SEH: seb $2, $[[R16]]
213 define signext i8 @AtomicSwap8(i8 signext %newval) nounwind {
215 %0 = atomicrmw xchg i8* @y, i8 %newval monotonic
218 ; ALL-LABEL: AtomicSwap8:
220 ; MIPS32-ANY: lw $[[R0:[0-9]+]], %got(y)
221 ; MIPS64-ANY: ld $[[R0:[0-9]+]], %got_disp(y)(
223 ; ALL: addiu $[[R1:[0-9]+]], $zero, -4
224 ; ALL: and $[[R2:[0-9]+]], $[[R0]], $[[R1]]
225 ; ALL: andi $[[R3:[0-9]+]], $[[R0]], 3
226 ; CHECK-EL: sll $[[R5:[0-9]+]], $[[R3]], 3
227 ; CHECK-EB: xori $[[R4:[0-9]+]], $[[R3]], 3
228 ; CHECK-EB: sll $[[R5:[0-9]+]], $[[R4]], 3
229 ; ALL: ori $[[R6:[0-9]+]], $zero, 255
230 ; ALL: sllv $[[R7:[0-9]+]], $[[R6]], $[[R5]]
231 ; ALL: nor $[[R8:[0-9]+]], $zero, $[[R7]]
232 ; ALL: sllv $[[R9:[0-9]+]], $4, $[[R5]]
234 ; ALL: $[[BB0:[A-Z_0-9]+]]:
235 ; ALL: ll $[[R10:[0-9]+]], 0($[[R2]])
236 ; ALL: and $[[R18:[0-9]+]], $[[R9]], $[[R7]]
237 ; ALL: and $[[R13:[0-9]+]], $[[R10]], $[[R8]]
238 ; ALL: or $[[R14:[0-9]+]], $[[R13]], $[[R18]]
239 ; ALL: sc $[[R14]], 0($[[R2]])
240 ; ALL: beqz $[[R14]], $[[BB0]]
242 ; ALL: and $[[R15:[0-9]+]], $[[R10]], $[[R7]]
243 ; ALL: srlv $[[R16:[0-9]+]], $[[R15]], $[[R5]]
245 ; NO-SEB-SEH: sll $[[R17:[0-9]+]], $[[R16]], 24
246 ; NO-SEB-SEH: sra $2, $[[R17]], 24
248 ; HAS-SEB-SEH: seb $2, $[[R16]]
252 define signext i8 @AtomicCmpSwap8(i8 signext %oldval, i8 signext %newval) nounwind {
254 %pair0 = cmpxchg i8* @y, i8 %oldval, i8 %newval monotonic monotonic
255 %0 = extractvalue { i8, i1 } %pair0, 0
258 ; ALL-LABEL: AtomicCmpSwap8:
260 ; MIPS32-ANY: lw $[[R0:[0-9]+]], %got(y)
261 ; MIPS64-ANY: ld $[[R0:[0-9]+]], %got_disp(y)(
263 ; ALL: addiu $[[R1:[0-9]+]], $zero, -4
264 ; ALL: and $[[R2:[0-9]+]], $[[R0]], $[[R1]]
265 ; ALL: andi $[[R3:[0-9]+]], $[[R0]], 3
266 ; CHECK-EL: sll $[[R5:[0-9]+]], $[[R3]], 3
267 ; CHECK-EB: xori $[[R4:[0-9]+]], $[[R3]], 3
268 ; CHECK-EB: sll $[[R5:[0-9]+]], $[[R4]], 3
269 ; ALL: ori $[[R6:[0-9]+]], $zero, 255
270 ; ALL: sllv $[[R7:[0-9]+]], $[[R6]], $[[R5]]
271 ; ALL: nor $[[R8:[0-9]+]], $zero, $[[R7]]
272 ; ALL: andi $[[R9:[0-9]+]], $4, 255
273 ; ALL: sllv $[[R10:[0-9]+]], $[[R9]], $[[R5]]
274 ; ALL: andi $[[R11:[0-9]+]], $5, 255
275 ; ALL: sllv $[[R12:[0-9]+]], $[[R11]], $[[R5]]
277 ; ALL: $[[BB0:[A-Z_0-9]+]]:
278 ; ALL: ll $[[R13:[0-9]+]], 0($[[R2]])
279 ; ALL: and $[[R14:[0-9]+]], $[[R13]], $[[R7]]
280 ; ALL: bne $[[R14]], $[[R10]], $[[BB1:[A-Z_0-9]+]]
282 ; ALL: and $[[R15:[0-9]+]], $[[R13]], $[[R8]]
283 ; ALL: or $[[R16:[0-9]+]], $[[R15]], $[[R12]]
284 ; ALL: sc $[[R16]], 0($[[R2]])
285 ; ALL: beqz $[[R16]], $[[BB0]]
288 ; ALL: srlv $[[R17:[0-9]+]], $[[R14]], $[[R5]]
290 ; NO-SEB-SEH: sll $[[R18:[0-9]+]], $[[R17]], 24
291 ; NO-SEB-SEH: sra $2, $[[R18]], 24
293 ; HAS-SEB-SEH: seb $2, $[[R17]]
296 define i1 @AtomicCmpSwapRes8(i8* %ptr, i8 signext %oldval, i8 signext %newval) nounwind {
298 %0 = cmpxchg i8* %ptr, i8 %oldval, i8 %newval monotonic monotonic
299 %1 = extractvalue { i8, i1 } %0, 1
301 ; ALL-LABEL: AtomicCmpSwapRes8
303 ; ALL: addiu $[[R1:[0-9]+]], $zero, -4
304 ; ALL: and $[[R2:[0-9]+]], $4, $[[R1]]
305 ; ALL: andi $[[R3:[0-9]+]], $4, 3
306 ; CHECK-EL: sll $[[R5:[0-9]+]], $[[R3]], 3
307 ; CHECK-EB: xori $[[R4:[0-9]+]], $[[R3]], 3
308 ; CHECK-EB: sll $[[R5:[0-9]+]], $[[R4]], 3
309 ; ALL: ori $[[R6:[0-9]+]], $zero, 255
310 ; ALL: sllv $[[R7:[0-9]+]], $[[R6]], $[[R5]]
311 ; ALL: nor $[[R8:[0-9]+]], $zero, $[[R7]]
312 ; ALL: andi $[[R9:[0-9]+]], $5, 255
313 ; ALL: sllv $[[R10:[0-9]+]], $[[R9]], $[[R5]]
314 ; ALL: andi $[[R11:[0-9]+]], $6, 255
315 ; ALL: sllv $[[R12:[0-9]+]], $[[R11]], $[[R5]]
317 ; ALL: $[[BB0:[A-Z_0-9]+]]:
318 ; ALL: ll $[[R13:[0-9]+]], 0($[[R2]])
319 ; ALL: and $[[R14:[0-9]+]], $[[R13]], $[[R7]]
320 ; ALL: bne $[[R14]], $[[R10]], $[[BB1:[A-Z_0-9]+]]
322 ; ALL: and $[[R15:[0-9]+]], $[[R13]], $[[R8]]
323 ; ALL: or $[[R16:[0-9]+]], $[[R15]], $[[R12]]
324 ; ALL: sc $[[R16]], 0($[[R2]])
325 ; ALL: beqz $[[R16]], $[[BB0]]
328 ; ALL: srlv $[[R17:[0-9]+]], $[[R14]], $[[R5]]
330 ; NO-SEB-SEH: sll $[[R18:[0-9]+]], $[[R17]], 24
331 ; NO-SEB-SEH: sra $[[R19:[0-9]+]], $[[R18]], 24
333 ; HAS-SEB-SEH: seb $[[R19:[0-9]+]], $[[R17]]
335 ; ALL: xor $[[R20:[0-9]+]], $[[R19]], $5
336 ; ALL: sltiu $2, $[[R20]], 1
339 ; Check one i16 so that we cover the seh sign extend
340 @z = common global i16 0, align 1
342 define signext i16 @AtomicLoadAdd16(i16 signext %incr) nounwind {
344 %0 = atomicrmw add i16* @z, i16 %incr monotonic
347 ; ALL-LABEL: AtomicLoadAdd16:
349 ; MIPS32-ANY: lw $[[R0:[0-9]+]], %got(z)
350 ; MIPS64-ANY: ld $[[R0:[0-9]+]], %got_disp(z)(
352 ; ALL: addiu $[[R1:[0-9]+]], $zero, -4
353 ; ALL: and $[[R2:[0-9]+]], $[[R0]], $[[R1]]
354 ; ALL: andi $[[R3:[0-9]+]], $[[R0]], 3
355 ; CHECK-EB: xori $[[R4:[0-9]+]], $[[R3]], 2
356 ; CHECK-EB: sll $[[R5:[0-9]+]], $[[R4]], 3
357 ; CHECK-EL: sll $[[R5:[0-9]+]], $[[R3]], 3
358 ; ALL: ori $[[R6:[0-9]+]], $zero, 65535
359 ; ALL: sllv $[[R7:[0-9]+]], $[[R6]], $[[R5]]
360 ; ALL: nor $[[R8:[0-9]+]], $zero, $[[R7]]
361 ; ALL: sllv $[[R9:[0-9]+]], $4, $[[R5]]
363 ; ALL: $[[BB0:[A-Z_0-9]+]]:
364 ; ALL: ll $[[R10:[0-9]+]], 0($[[R2]])
365 ; ALL: addu $[[R11:[0-9]+]], $[[R10]], $[[R9]]
366 ; ALL: and $[[R12:[0-9]+]], $[[R11]], $[[R7]]
367 ; ALL: and $[[R13:[0-9]+]], $[[R10]], $[[R8]]
368 ; ALL: or $[[R14:[0-9]+]], $[[R13]], $[[R12]]
369 ; ALL: sc $[[R14]], 0($[[R2]])
370 ; ALL: beqz $[[R14]], $[[BB0]]
372 ; ALL: and $[[R15:[0-9]+]], $[[R10]], $[[R7]]
373 ; ALL: srlv $[[R16:[0-9]+]], $[[R15]], $[[R5]]
375 ; NO-SEB-SEH: sll $[[R17:[0-9]+]], $[[R16]], 16
376 ; NO-SEB-SEH: sra $2, $[[R17]], 16
378 ; MIPS32R2: seh $2, $[[R16]]
382 @countsint = common global i32 0, align 4
384 define i32 @CheckSync(i32 signext %v) nounwind noinline {
386 %0 = atomicrmw add i32* @countsint, i32 %v seq_cst
389 ; ALL-LABEL: CheckSync:
398 ; make sure that this assertion in
399 ; TwoAddressInstructionPass::TryInstructionTransform does not fail:
401 ; line 1203: assert(TargetRegisterInfo::isVirtualRegister(regB) &&
403 ; it failed when MipsDAGToDAGISel::ReplaceUsesWithZeroReg replaced an
404 ; operand of an atomic instruction with register $zero.
405 @a = external global i32
407 define i32 @zeroreg() nounwind {
409 %pair0 = cmpxchg i32* @a, i32 1, i32 0 seq_cst seq_cst
410 %0 = extractvalue { i32, i1 } %pair0, 0
411 %1 = icmp eq i32 %0, 1
412 %conv = zext i1 %1 to i32
416 ; Check that MIPS32R6 has the correct offset range.
417 ; FIXME: At the moment, we don't seem to do addr+offset for any atomic load/store.
418 define i32 @AtomicLoadAdd32_OffGt9Bit(i32 signext %incr) nounwind {
420 %0 = atomicrmw add i32* getelementptr(i32* @x, i32 256), i32 %incr monotonic
423 ; ALL-LABEL: AtomicLoadAdd32_OffGt9Bit:
425 ; MIPS32-ANY: lw $[[R0:[0-9]+]], %got(x)
426 ; MIPS64-ANY: ld $[[R0:[0-9]+]], %got_disp(x)(
428 ; ALL: addiu $[[PTR:[0-9]+]], $[[R0]], 1024
429 ; ALL: $[[BB0:[A-Z_0-9]+]]:
430 ; ALL: ll $[[R1:[0-9]+]], 0($[[PTR]])
431 ; ALL: addu $[[R2:[0-9]+]], $[[R1]], $4
432 ; ALL: sc $[[R2]], 0($[[PTR]])
433 ; ALL: beqz $[[R2]], $[[BB0]]