1 ; RUN: llc -mtriple=powerpc64-unknown-aix-xcoff -mcpu=pwr4 --mattr=-altivec \
2 ; RUN: --verify-machineinstrs < %s | FileCheck --check-prefix=64BIT %s
4 ; RUN: llc -mtriple=powerpc-unknown-aix-xcoff -mcpu=pwr4 --mattr=-altivec \
5 ; RUN: --verify-machineinstrs < %s | FileCheck --check-prefix=32BIT %s
7 define dso_local signext i32 @killOne(i32 signext %i) {
9 tail call void asm sideeffect "# Clobber CR", "~{cr4}"()
10 %call = call signext i32 @do_something(i32 %i)
14 define dso_local signext i32 @killAll(i32 signext %i) {
16 tail call void asm sideeffect "# Clobber CR", "~{cr0},~{cr1},~{cr2},~{cr3},~{cr4},~{cr5},~{cr6},~{cr7}" ()
17 %call = call signext i32 @do_something(i32 %i)
21 declare signext i32 @do_something(i32 signext)
23 ; 64BIT-LABEL: .killOne:
26 ; 64BIT-NEXT: stw 12, 8(1)
28 ; 64BIT-NEXT: stdu 1, -112(1)
29 ; 64BIT: std 0, 128(1)
32 ; 64BIT: bl .do_something
34 ; 64BIT: addi 1, 1, 112
35 ; 64BIT-NEXT: ld 0, 16(1)
36 ; 64BIT-NEXT: lwz 12, 8(1)
38 ; 64BIT-NEXT: mtocrf 8, 12
41 ; 32BIT-LABEL: .killOne:
44 ; 32BIT-NEXT: stw 12, 4(1)
46 ; 32BIT-NEXT: stwu 1, -64(1)
50 ; 32BIT: bl .do_something
52 ; 32BIT: addi 1, 1, 64
53 ; 32BIT-NEXT: lwz 0, 8(1)
54 ; 32BIT-NEXT: lwz 12, 4(1)
56 ; 32BIT-NEXT: mtocrf 8, 12
60 ; 64BIT-LABEL: .killAll:
62 ; 64BIT: addi 1, 1, 112
63 ; 64BIT-NEXT: ld 0, 16(1)
64 ; 64BIT-NEXT: lwz 12, 8(1)
66 ; 64BIT-NEXT: mtocrf 32, 12
67 ; 64BIT-NEXT: mtocrf 16, 12
68 ; 64BIT-NEXT: mtocrf 8, 12
72 ; 32BIT-LABEL: .killAll:
74 ; 32BIT: addi 1, 1, 64
75 ; 32BIT-NEXT: lwz 0, 8(1)
76 ; 32BIT-NEXT: lwz 12, 4(1)
78 ; 32BIT-NEXT: mtocrf 32, 12
79 ; 32BIT-NEXT: mtocrf 16, 12
80 ; 32BIT-NEXT: mtocrf 8, 12