1 # RUN: llc -mtriple=aarch64-none-linux-gnu -run-pass none -o - %s | FileCheck %s
4 define i32 @swp(i32* %addr) #0 {
6 %0 = atomicrmw xchg i32* %addr, i32 1 monotonic
10 attributes #0 = { "target-features"="+lse" }
15 tracksRegLiveness: true
17 - { id: 0, class: gpr64common }
18 - { id: 1, class: gpr32 }
19 - { id: 2, class: gpr32 }
21 - { reg: '$x0', virtual-reg: '%0' }
27 ; CHECK: {{[0-9]+}}:gpr32 = SWPW killed %1, %0 :: (volatile load store monotonic 4 on %ir.addr)
28 %0:gpr64common = COPY $x0
29 %1:gpr32 = MOVi32imm 1
30 %2:gpr32 = SWPW killed %1, %0 :: (volatile load store monotonic 4 on %ir.addr)
32 RET_ReallyLR implicit $w0