File: cmpxchg.mir

package info (click to toggle)
llvm-toolchain-20 1%3A20.1.6-1~exp1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 2,111,304 kB
  • sloc: cpp: 7,438,677; ansic: 1,393,822; asm: 1,012,926; python: 241,650; f90: 86,635; objc: 75,479; lisp: 42,144; pascal: 17,286; sh: 10,027; ml: 5,082; perl: 4,730; awk: 3,523; makefile: 3,349; javascript: 2,251; xml: 892; fortran: 672
file content (62 lines) | stat: -rw-r--r-- 2,869 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -o - %s -mtriple=armv7-unknown-linux-gnu -verify-machineinstrs -run-pass=arm-pseudo | FileCheck %s
# RUN: llc -o - %s -mtriple=armv7eb-unknown-linux-gnu -verify-machineinstrs -run-pass=arm-pseudo | FileCheck %s
---
name: func
tracksRegLiveness: true
body: |
  bb.0:
    liveins: $r0_r1, $r4_r5, $r3, $lr
    ; CHECK-LABEL: name: func
    ; CHECK: successors: %bb.1(0x80000000)
    ; CHECK-NEXT: liveins: $r0_r1, $r4_r5, $r3, $lr
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: .1:
    ; CHECK-NEXT: successors: %bb.3(0x40000000), %bb.2(0x40000000)
    ; CHECK-NEXT: liveins: $r4_r5, $r2
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: $r0_r1 = LDREXD $r2, 14 /* CC::al */, $noreg
    ; CHECK-NEXT: CMPrr killed $r0, $r4, 14 /* CC::al */, $noreg, implicit-def $cpsr
    ; CHECK-NEXT: CMPrr killed $r1, $r5, 0 /* CC::eq */, killed $cpsr, implicit-def $cpsr
    ; CHECK-NEXT: Bcc %bb.3, 1 /* CC::ne */, killed $cpsr
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: .2:
    ; CHECK-NEXT: successors: %bb.1(0x40000000), %bb.3(0x40000000)
    ; CHECK-NEXT: liveins: $r4_r5, $r2
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: early-clobber $r3 = STREXD $r4_r5, $r2, 14 /* CC::al */, $noreg
    ; CHECK-NEXT: CMPri killed $r3, 0, 14 /* CC::al */, $noreg, implicit-def $cpsr
    ; CHECK-NEXT: Bcc %bb.1, 1 /* CC::ne */, killed $cpsr
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: .3:
    dead early-clobber renamable $r0_r1, dead early-clobber renamable $r2_r3 = CMP_SWAP_64 killed renamable $r2_r3, killed renamable $r4_r5, renamable $r4_r5 :: (volatile load store monotonic monotonic (s64))
...
---
name: func2
tracksRegLiveness: true
body: |
  bb.0:
    liveins: $r1, $r2, $r3, $r12, $lr
    ; CHECK-LABEL: name: func2
    ; CHECK: successors: %bb.1(0x80000000)
    ; CHECK-NEXT: liveins: $r1, $r2, $r3, $r12, $lr
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: .1:
    ; CHECK-NEXT: successors: %bb.3(0x40000000), %bb.2(0x40000000)
    ; CHECK-NEXT: liveins: $lr, $r3, $r12
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: $r1 = LDREX $r3, 14 /* CC::al */, $noreg
    ; CHECK-NEXT: CMPrr killed $r1, $r12, 14 /* CC::al */, $noreg, implicit-def $cpsr
    ; CHECK-NEXT: Bcc %bb.3, 1 /* CC::ne */, killed $cpsr
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: .2:
    ; CHECK-NEXT: successors: %bb.1(0x40000000), %bb.3(0x40000000)
    ; CHECK-NEXT: liveins: $lr, $r3, $r12
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: early-clobber $r2 = STREX $lr, $r3, 14 /* CC::al */, $noreg
    ; CHECK-NEXT: CMPri killed $r2, 0, 14 /* CC::al */, $noreg, implicit-def $cpsr
    ; CHECK-NEXT: Bcc %bb.1, 1 /* CC::ne */, killed $cpsr
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: .3:
    dead early-clobber renamable $r1, dead early-clobber renamable $r2 = CMP_SWAP_32 killed renamable $r3, killed renamable $r12, killed renamable $lr
...