1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple powerpc64le-unknown-linux-gnu -x mir -mcpu=pwr8 -mattr=-altivec \
3 # RUN: -run-pass=prologepilog --verify-machineinstrs %s -o - | \
4 # RUN: FileCheck %s --check-prefix=SAVEONE
6 # RUN: llc -mtriple powerpc64-unknown-linux-gnu -x mir -mcpu=pwr7 -mattr=-altivec \
7 # RUN: -run-pass=prologepilog --verify-machineinstrs %s -o - | \
8 # RUN: FileCheck %s --check-prefix=SAVEALL
10 # RUN: llc -mtriple powerpc64-unknown-aix-xcoff -x mir -mcpu=pwr4 -mattr=-altivec \
11 # RUN: -run-pass=prologepilog --verify-machineinstrs %s -o - | \
12 # RUN: FileCheck %s --check-prefix=SAVEALL
17 tracksRegLiveness: true
19 - { reg: '$x3', virtual-reg: '' }
23 ; SAVEONE-LABEL: name: CRAllSave
24 ; SAVEONE: liveins: $x3, $cr2, $cr4
25 ; SAVEONE-NEXT: {{ $}}
26 ; SAVEONE-NEXT: $x12 = MFCR8 implicit killed $cr2, implicit killed $cr4
27 ; SAVEONE-NEXT: STW8 killed $x12, 8, $x1
28 ; SAVEONE-NEXT: renamable $x3 = ANDI8_rec killed renamable $x3, 1, implicit-def dead $cr0, implicit-def $cr0gt
29 ; SAVEONE-NEXT: renamable $cr2lt = COPY $cr0gt
30 ; SAVEONE-NEXT: renamable $cr4lt = COPY $cr0gt
31 ; SAVEONE-NEXT: $x12 = LWZ8 8, $x1
32 ; SAVEONE-NEXT: $cr2 = MTOCRF8 $x12
33 ; SAVEONE-NEXT: $cr4 = MTOCRF8 killed $x12
34 ; SAVEONE-NEXT: BLR8 implicit $lr8, implicit $rm, implicit $x3
36 ; SAVEALL-LABEL: name: CRAllSave
37 ; SAVEALL: liveins: $x3, $cr2, $cr4
38 ; SAVEALL-NEXT: {{ $}}
39 ; SAVEALL-NEXT: $x12 = MFCR8 implicit killed $cr2, implicit killed $cr4
40 ; SAVEALL-NEXT: STW8 killed $x12, 8, $x1
41 ; SAVEALL-NEXT: renamable $x3 = ANDI8_rec killed renamable $x3, 1, implicit-def dead $cr0, implicit-def $cr0gt
42 ; SAVEALL-NEXT: renamable $cr2lt = COPY $cr0gt
43 ; SAVEALL-NEXT: renamable $cr4lt = COPY $cr0gt
44 ; SAVEALL-NEXT: $x12 = LWZ8 8, $x1
45 ; SAVEALL-NEXT: $cr2 = MTOCRF8 $x12
46 ; SAVEALL-NEXT: $cr4 = MTOCRF8 killed $x12
47 ; SAVEALL-NEXT: BLR8 implicit $lr8, implicit $rm, implicit $x3
48 renamable $x3 = ANDI8_rec killed renamable $x3, 1, implicit-def dead $cr0, implicit-def $cr0gt
49 renamable $cr2lt = COPY $cr0gt
50 renamable $cr4lt = COPY $cr0gt
51 BLR8 implicit $lr8, implicit $rm, implicit $x3
61 tracksRegLiveness: true
63 - { reg: '$x3', virtual-reg: '' }
67 ; SAVEONE-LABEL: name: CR2Save
68 ; SAVEONE: liveins: $x3, $cr2
69 ; SAVEONE-NEXT: {{ $}}
70 ; SAVEONE-NEXT: $x12 = MFOCRF8 killed $cr2
71 ; SAVEONE-NEXT: STW8 killed $x12, 8, $x1
72 ; SAVEONE-NEXT: renamable $x3 = ANDI8_rec killed renamable $x3, 1, implicit-def dead $cr0, implicit-def $cr0gt
73 ; SAVEONE-NEXT: renamable $cr2lt = COPY $cr0gt
74 ; SAVEONE-NEXT: $x12 = LWZ8 8, $x1
75 ; SAVEONE-NEXT: $cr2 = MTOCRF8 killed $x12
76 ; SAVEONE-NEXT: BLR8 implicit $lr8, implicit $rm, implicit $x3
78 ; SAVEALL-LABEL: name: CR2Save
79 ; SAVEALL: liveins: $x3, $cr2
80 ; SAVEALL-NEXT: {{ $}}
81 ; SAVEALL-NEXT: $x12 = MFCR8 implicit killed $cr2
82 ; SAVEALL-NEXT: STW8 killed $x12, 8, $x1
83 ; SAVEALL-NEXT: renamable $x3 = ANDI8_rec killed renamable $x3, 1, implicit-def dead $cr0, implicit-def $cr0gt
84 ; SAVEALL-NEXT: renamable $cr2lt = COPY $cr0gt
85 ; SAVEALL-NEXT: $x12 = LWZ8 8, $x1
86 ; SAVEALL-NEXT: $cr2 = MTOCRF8 killed $x12
87 ; SAVEALL-NEXT: BLR8 implicit $lr8, implicit $rm, implicit $x3
88 renamable $x3 = ANDI8_rec killed renamable $x3, 1, implicit-def dead $cr0, implicit-def $cr0gt
89 renamable $cr2lt = COPY $cr0gt
90 BLR8 implicit $lr8, implicit $rm, implicit $x3