File: high-reg-clobber.mir

package info (click to toggle)
llvm-toolchain-15 1%3A15.0.6-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,554,644 kB
  • sloc: cpp: 5,922,452; ansic: 1,012,136; asm: 674,362; python: 191,568; objc: 73,855; f90: 42,327; lisp: 31,913; pascal: 11,973; javascript: 10,144; sh: 9,421; perl: 7,447; ml: 5,527; awk: 3,523; makefile: 2,520; xml: 885; cs: 573; fortran: 567
file content (50 lines) | stat: -rw-r--r-- 2,163 bytes parent folder | download | duplicates (9)
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
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -mtriple thumbv6m-arm-none-eabi -run-pass regallocbasic %s -o - | FileCheck %s
# RUN: llc -mtriple thumbv6m-arm-none-eabi -run-pass greedy %s -o - | FileCheck %s
# RUN: llc -mtriple thumbv6m-arm-none-eabi -run-pass regallocfast %s -o - | FileCheck %s --check-prefix=FAST

...
---
name:            constraint_h
alignment:       2
tracksRegLiveness: true
registers:
  - { id: 0, class: tgpr }
  - { id: 1, class: hgpr }
  - { id: 2, class: tgpr }
liveins:
  - { reg: '$r0', virtual-reg: '%0' }
frameInfo:
  maxAlignment:    4
  maxCallFrameSize: 0
  localFrameSize:  4
stack:
  - { id: 0, size: 4, alignment: 4, local-offset: -4 }
machineFunctionInfo: {}
body:             |
  bb.0.entry:
    liveins: $r0

    ; CHECK-LABEL: name: constraint_h
    ; CHECK: liveins: $r0
    ; CHECK: [[COPY:%[0-9]+]]:tgpr = COPY $r0
    ; CHECK: tSTRspi [[COPY]], %stack.0, 0, 14 /* CC::al */, $noreg
    ; CHECK: [[tLDRspi:%[0-9]+]]:tgpr = tLDRspi %stack.0, 0, 14 /* CC::al */, $noreg
    ; CHECK: [[COPY1:%[0-9]+]]:hgpr = COPY [[tLDRspi]]
    ; CHECK: INLINEASM &"mov r12, $0", 1 /* sideeffect attdialect */, 1048585 /* reguse:GPRnoip_and_GPRnopc */, %1, 12 /* clobber */, implicit-def early-clobber $r12
    ; CHECK: tBX_RET 14 /* CC::al */, $noreg
    ; FAST-LABEL: name: constraint_h
    ; FAST: liveins: $r0
    ; FAST: tSTRspi killed renamable $r0, %stack.0, 0, 14 /* CC::al */, $noreg
    ; FAST: renamable $r0 = tLDRspi %stack.0, 0, 14 /* CC::al */, $noreg
    ; FAST: renamable $r8 = COPY killed renamable $r0
    ; FAST: INLINEASM &"mov r12, $0", 1 /* sideeffect attdialect */, 1048585 /* reguse:GPRnoip_and_GPRnopc */, killed renamable $r8, 12 /* clobber */, implicit-def dead early-clobber $r12
    ; FAST: tBX_RET 14 /* CC::al */, $noreg
    %0:tgpr = COPY $r0
    tSTRspi %0, %stack.0, 0, 14 /* CC::al */, $noreg
    %2:tgpr = tLDRspi %stack.0, 0, 14 /* CC::al */, $noreg
    %1:hgpr = COPY %2
    INLINEASM &"mov r12, $0", 1 /* sideeffect attdialect */, 1048585 /* reguse:hGPR */, %1, 12 /* clobber */, implicit-def early-clobber $r12
    tBX_RET 14 /* CC::al */, $noreg

...