File: aix32-crsave.mir

package info (click to toggle)
llvm-toolchain-14 1%3A14.0.6-12
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,496,180 kB
  • sloc: cpp: 5,593,972; ansic: 986,872; asm: 585,869; python: 184,223; objc: 72,530; lisp: 31,119; f90: 27,793; javascript: 9,780; pascal: 9,762; sh: 9,482; perl: 7,468; ml: 5,432; awk: 3,523; makefile: 2,538; xml: 953; cs: 573; fortran: 567
file content (76 lines) | stat: -rw-r--r-- 3,273 bytes parent folder | download | duplicates (12)
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# RUN: llc -mtriple powerpc-unknown-aix-xcoff -x mir -mcpu=pwr4 -mattr=-altivec \
# RUN: -run-pass=prologepilog --verify-machineinstrs < %s | \
# RUN: FileCheck %s --check-prefixes=CHECK

---
name:            CRMultiSave
alignment:       16
tracksRegLiveness: true
liveins:
  - { reg: '$r3', virtual-reg: '' }
body:             |
  bb.0.entry:
    liveins: $r3
    renamable $r29 = ANDI_rec killed renamable $r3, 1, implicit-def dead $cr0, implicit-def $cr0gt
    renamable $cr2lt = COPY $cr0gt
    renamable $cr4lt = COPY $cr0gt
    renamable $r3 = COPY $r29
    BLR implicit $lr, implicit $rm, implicit $r3

    ; CHECK-LABEL:  fixedStack:
    ; CHECK-NEXT:   - { id: 0, type: spill-slot, offset: -12, size: 4, alignment: 4, stack-id: default,
    ; CHECK-NEXT:       callee-saved-register: '$r29', callee-saved-restored: true, debug-info-variable: '',
    ; CHECK-NEXT:       debug-info-expression: '', debug-info-location: '' }
    ; CHECK-NEXT:   - { id: 1, type: default, offset: 4, size: 4, alignment: 4, stack-id: default,
    ; CHECK-NEXT:       isImmutable: true, isAliased: false, callee-saved-register: '$cr4',
    ; CHECK-NEXT:       callee-saved-restored: true, debug-info-variable: '', debug-info-expression: '',
    ; CHECK-NEXT:       debug-info-location: '' }
    ; CHECK-LABEL:  stack:

    ; CHECK:      bb.0.entry:
    ; CHECK-NEXT:  liveins: $r3, $r29, $cr2, $cr4

    ; CHECK:      $r12 = MFCR implicit killed $cr2, implicit killed $cr4
    ; CHECK-NEXT: STW killed $r12, 4, $r1
    ; CHECK-NEXT: STW killed $r29, -12, $r1 :: (store (s32) into %fixed-stack.0)

    ; CHECK:      $r29 = LWZ -12, $r1 :: (load (s32) from %fixed-stack.0)
    ; CHECK-NEXT: $r12 = LWZ 4, $r1
    ; CHECK-NEXT: $cr2 = MTOCRF $r12
    ; CHECK-NEXT: $cr4 = MTOCRF killed $r12

...
---
name:            CR3Save
alignment:       16
tracksRegLiveness: true
liveins:
  - { reg: '$r3', virtual-reg: '' }
body:             |
  bb.0.entry:
    liveins: $r3
    renamable $r14 = ANDI_rec killed renamable $r3, 1, implicit-def dead $cr0, implicit-def $cr0gt
    renamable $cr3lt = COPY $cr0gt
    renamable $r3 = COPY $r14
    BLR implicit $lr, implicit $rm, implicit $r3

    ; CHECK-LABEL: fixedStack:
    ; CHECK-NEXT:  - { id: 0, type: spill-slot, offset: -72, size: 4, alignment: 8, stack-id: default,
    ; CHECK-NEXT:      callee-saved-register: '$r14', callee-saved-restored: true, debug-info-variable: '',
    ; CHECK-NEXT:      debug-info-expression: '', debug-info-location: '' }
    ; CHECK-NEXT:  - { id: 1, type: default, offset: 4, size: 4, alignment: 4, stack-id: default,
    ; CHECK-NEXT:      isImmutable: true, isAliased: false, callee-saved-register: '$cr3',
    ; CHECK-NEXT:      callee-saved-restored: true, debug-info-variable: '', debug-info-expression: '',
    ; CHECK-NEXT:      debug-info-location: '' }
    ; CHECK-LABEL: stack:

    ; CHECK:      bb.0.entry:
    ; CHECK-NEXT:   liveins: $r3, $r14, $cr3

    ; CHECK:      $r12 = MFCR implicit killed $cr3
    ; CHECK-NEXT: STW killed $r12, 4, $r1
    ; CHECK-NEXT: STW killed $r14, -72, $r1 :: (store (s32) into %fixed-stack.0, align 8)

    ; CHECK:      $r14 = LWZ -72, $r1 :: (load (s32) from %fixed-stack.0, align 8)
    ; CHECK-NEXT: $r12 = LWZ 4, $r1
    ; CHECK-NEXT: $cr3 = MTOCRF killed $r12