1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -o - %s -mtriple=armv7-unknown-linux-gnu -verify-machineinstrs -run-pass=arm-pseudo | FileCheck %s
3 # RUN: llc -o - %s -mtriple=thumbv7-unknown-linux-gnu -verify-machineinstrs -run-pass=arm-pseudo | FileCheck %s --check-prefix=THUMB
6 tracksRegLiveness: true
9 liveins: $r0_r1, $r4_r5, $r3, $lr
10 ; CHECK-LABEL: name: func
11 ; CHECK: successors: %bb.1(0x80000000)
12 ; CHECK: liveins: $r0_r1, $r4_r5, $r3, $lr
14 ; CHECK: successors: %bb.3(0x40000000), %bb.2(0x40000000)
15 ; CHECK: liveins: $r4_r5, $r3
16 ; CHECK: $r0_r1 = LDREXD $r3, 14 /* CC::al */, $noreg
17 ; CHECK: CMPrr killed $r0, $r4, 14 /* CC::al */, $noreg, implicit-def $cpsr
18 ; CHECK: CMPrr killed $r1, $r5, 0 /* CC::eq */, killed $cpsr, implicit-def $cpsr
19 ; CHECK: Bcc %bb.3, 1 /* CC::ne */, killed $cpsr
21 ; CHECK: successors: %bb.1(0x40000000), %bb.3(0x40000000)
22 ; CHECK: liveins: $r4_r5, $r3
23 ; CHECK: early-clobber $r2 = STREXD $r4_r5, $r3, 14 /* CC::al */, $noreg
24 ; CHECK: CMPri killed $r2, 0, 14 /* CC::al */, $noreg, implicit-def $cpsr
25 ; CHECK: Bcc %bb.1, 1 /* CC::ne */, killed $cpsr
27 ; THUMB-LABEL: name: func
28 ; THUMB: successors: %bb.1(0x80000000)
29 ; THUMB: liveins: $r0_r1, $r4_r5, $r3, $lr
31 ; THUMB: successors: %bb.3(0x40000000), %bb.2(0x40000000)
32 ; THUMB: liveins: $r4, $r5, $r3
33 ; THUMB: $r0, $r1 = t2LDREXD $r3, 14 /* CC::al */, $noreg
34 ; THUMB: tCMPhir killed $r0, $r4, 14 /* CC::al */, $noreg, implicit-def $cpsr
35 ; THUMB: tCMPhir killed $r1, $r5, 0 /* CC::eq */, killed $cpsr, implicit-def $cpsr
36 ; THUMB: tBcc %bb.3, 1 /* CC::ne */, killed $cpsr
38 ; THUMB: successors: %bb.1(0x40000000), %bb.3(0x40000000)
39 ; THUMB: liveins: $r4, $r5, $r3
40 ; THUMB: early-clobber $r2 = t2STREXD $r4, $r5, $r3, 14 /* CC::al */, $noreg
41 ; THUMB: t2CMPri killed $r2, 0, 14 /* CC::al */, $noreg, implicit-def $cpsr
42 ; THUMB: tBcc %bb.1, 1 /* CC::ne */, killed $cpsr
44 dead early-clobber renamable $r0_r1, dead early-clobber renamable $r2 = CMP_SWAP_64 killed renamable $r3, killed renamable $r4_r5, renamable $r4_r5 :: (volatile load store monotonic monotonic (s64))
48 tracksRegLiveness: true
51 liveins: $r1, $r2, $r3, $r12, $lr
52 ; CHECK-LABEL: name: func2
53 ; CHECK: successors: %bb.1(0x80000000)
54 ; CHECK: liveins: $r1, $r2, $r3, $r12, $lr
56 ; CHECK: successors: %bb.3(0x40000000), %bb.2(0x40000000)
57 ; CHECK: liveins: $lr, $r3, $r12
58 ; CHECK: $r1 = LDREX $r3, 14 /* CC::al */, $noreg
59 ; CHECK: CMPrr killed $r1, $r12, 14 /* CC::al */, $noreg, implicit-def $cpsr
60 ; CHECK: Bcc %bb.3, 1 /* CC::ne */, killed $cpsr
62 ; CHECK: successors: %bb.1(0x40000000), %bb.3(0x40000000)
63 ; CHECK: liveins: $lr, $r3, $r12
64 ; CHECK: early-clobber $r2 = STREX $lr, $r3, 14 /* CC::al */, $noreg
65 ; CHECK: CMPri killed $r2, 0, 14 /* CC::al */, $noreg, implicit-def $cpsr
66 ; CHECK: Bcc %bb.1, 1 /* CC::ne */, killed $cpsr
68 ; THUMB-LABEL: name: func2
69 ; THUMB: successors: %bb.1(0x80000000)
70 ; THUMB: liveins: $r1, $r2, $r3, $r12, $lr
72 ; THUMB: successors: %bb.3(0x40000000), %bb.2(0x40000000)
73 ; THUMB: liveins: $lr, $r3, $r12
74 ; THUMB: $r1 = t2LDREX $r3, 0, 14 /* CC::al */, $noreg
75 ; THUMB: tCMPhir killed $r1, $r12, 14 /* CC::al */, $noreg, implicit-def $cpsr
76 ; THUMB: tBcc %bb.3, 1 /* CC::ne */, killed $cpsr
78 ; THUMB: successors: %bb.1(0x40000000), %bb.3(0x40000000)
79 ; THUMB: liveins: $lr, $r3, $r12
80 ; THUMB: early-clobber $r2 = t2STREX $lr, $r3, 0, 14 /* CC::al */, $noreg
81 ; THUMB: t2CMPri killed $r2, 0, 14 /* CC::al */, $noreg, implicit-def $cpsr
82 ; THUMB: tBcc %bb.1, 1 /* CC::ne */, killed $cpsr
84 dead early-clobber renamable $r1, dead early-clobber renamable $r2 = CMP_SWAP_32 killed renamable $r3, killed renamable $r12, killed renamable $lr