1 # RUN: llc -mtriple=aarch64-none-linux-gnu -run-pass none -o - %s | FileCheck %s 2 3 --- | 4 define i32 @swp(i32* %addr) #0 { 5 entry: 6 %0 = atomicrmw xchg i32* %addr, i32 1 monotonic 7 ret i32 %0 8 } 9 10 attributes #0 = { "target-features"="+lse" } 11 ... 12 --- 13 name: swp 14 alignment: 2 15 tracksRegLiveness: true 16 registers: 17 - { id: 0, class: gpr64common } 18 - { id: 1, class: gpr32 } 19 - { id: 2, class: gpr32 } 20 liveins: 21 - { reg: '$x0', virtual-reg: '%0' } 22 body: | 23 bb.0.entry: 24 liveins: $x0 25 26 ; CHECK-LABEL: swp 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) 31 $w0 = COPY %2 32 RET_ReallyLR implicit $w0 33 ... 34