1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=powerpc64le-linux-gnu < %s | FileCheck %s -check-prefix=PPC64LE
4 define void @test(i8* %ptr, i8 %cmp, i8 %val) {
7 ; PPC64LE-NEXT: clrlwi 4, 4, 24
8 ; PPC64LE-NEXT: .LBB0_1:
9 ; PPC64LE-NEXT: lbarx 6, 0, 3
10 ; PPC64LE-NEXT: cmpw 4, 6
11 ; PPC64LE-NEXT: bne 0, .LBB0_3
12 ; PPC64LE-NEXT: # %bb.2:
13 ; PPC64LE-NEXT: stbcx. 5, 0, 3
14 ; PPC64LE-NEXT: beqlr 0
15 ; PPC64LE-NEXT: b .LBB0_1
16 ; PPC64LE-NEXT: .LBB0_3:
17 ; PPC64LE-NEXT: stbcx. 6, 0, 3
19 %res = cmpxchg i8* %ptr, i8 %cmp, i8 %val monotonic monotonic