1; RUN: llc -mtriple powerpc-ibm-aix-xcoff -mcpu=pwr4 -mattr=-altivec \ 2; RUN: -stop-after=machine-cp --verify-machineinstrs < %s | FileCheck \ 3; RUN: --check-prefixes=MIR,MIR32 %s 4 5; RUN: llc -mtriple powerpc64-ibm-aix-xcoff -mcpu=pwr4 -mattr=-altivec \ 6; RUN: -stop-after=machine-cp --verify-machineinstrs < %s | FileCheck \ 7; RUN: --check-prefixes=MIR,MIR64 %s 8 9; RUN: llc -mtriple powerpc-ibm-aix-xcoff -mcpu=pwr4 -mattr=-altivec \ 10; RUN: --verify-machineinstrs < %s | FileCheck --check-prefixes=ASM,ASM32 %s 11 12; RUN: llc -mtriple powerpc64-ibm-aix-xcoff -mcpu=pwr4 -mattr=-altivec \ 13; RUN: --verify-machineinstrs < %s | FileCheck --check-prefixes=ASM,ASM64 %s 14 15%struct.S = type { i8 } 16%struct.T = type { double, i32, i32, i32, float } 17 18define void @test1() { 19entry: 20 %s = alloca %struct.S, align 4 21 call void @foo(%struct.S* sret(%struct.S) %s) 22 ret void 23} 24 25define void @test2() { 26entry: 27 %t = alloca %struct.T, align 8 28 call void @bar(%struct.T* sret(%struct.T) %t) 29 ret void 30} 31 32declare void @foo(%struct.S* sret(%struct.S)) 33declare void @bar(%struct.T* sret(%struct.T)) 34 35; MIR: name: test1 36; MIR: stack: 37; MIR-NEXT: - { id: 0, name: s, type: default, offset: 0, size: 1, alignment: 8, 38 39; MIR32: bb.0.entry: 40; MIR32-NEXT: ADJCALLSTACKDOWN 56, 0, implicit-def dead $r1, implicit $r1 41; MIR32-NEXT: renamable $r3 = ADDI %stack.0.s, 0 42; MIR32-NEXT: BL_NOP <mcsymbol .foo[PR]>, csr_aix32, implicit-def dead $lr, implicit $rm, implicit $r3, implicit $r2, implicit-def $r1 43; MIR32-NEXT: ADJCALLSTACKUP 56, 0, implicit-def dead $r1, implicit $r1 44 45; MIR64: bb.0.entry: 46; MIR64-NEXT: ADJCALLSTACKDOWN 112, 0, implicit-def dead $r1, implicit $r1 47; MIR64-NEXT: renamable $x3 = ADDI8 %stack.0.s, 0 48; MIR64-NEXT: BL8_NOP <mcsymbol .foo[PR]>, csr_ppc64, implicit-def dead $lr8, implicit $rm, implicit $x3, implicit $x2, implicit-def $r1 49; MIR64-NEXT: ADJCALLSTACKUP 112, 0, implicit-def dead $r1, implicit $r1 50 51 52; ASM-LABEL: .test1: 53 54; ASM32: stwu 1, -64(1) 55; ASM32-NEXT: addi 3, 1, 56 56; ASM32-NEXT: bl .foo[PR] 57; ASM32-NEXT: nop 58; ASM32-NEXT: addi 1, 1, 64 59 60; ASM64: stdu 1, -128(1) 61; ASM64-NEXT: addi 3, 1, 120 62; ASM64-NEXT: bl .foo[PR] 63; ASM64-NEXT: nop 64; ASM64-NEXT: addi 1, 1, 128 65 66 67 68; MIR: name: test2 69; MIR: stack: 70; MIR-NEXT: - { id: 0, name: t, type: default, offset: 0, size: 24, alignment: 8, 71 72; MIR32: bb.0.entry: 73; MIR32-NEXT: ADJCALLSTACKDOWN 56, 0, implicit-def dead $r1, implicit $r1 74; MIR32-NEXT: renamable $r3 = ADDI %stack.0.t, 0 75; MIR32-NEXT: BL_NOP <mcsymbol .bar[PR]>, csr_aix32, implicit-def dead $lr, implicit $rm, implicit $r3, implicit $r2, implicit-def $r1 76; MIR32-NEXT: ADJCALLSTACKUP 56, 0, implicit-def dead $r1, implicit $r1 77 78; MIR64: bb.0.entry: 79; MIR64-NEXT: ADJCALLSTACKDOWN 112, 0, implicit-def dead $r1, implicit $r1 80; MIR64-NEXT: renamable $x3 = ADDI8 %stack.0.t, 0 81; MIR64-NEXT: BL8_NOP <mcsymbol .bar[PR]>, csr_ppc64, implicit-def dead $lr8, implicit $rm, implicit $x3, implicit $x2, implicit-def $r1 82; MIR64-NEXT: ADJCALLSTACKUP 112, 0, implicit-def dead $r1, implicit $r1 83 84 85; ASM-LABEL: .test2: 86 87; ASM32: stwu 1, -80(1) 88; ASM32-NEXT: addi 3, 1, 56 89; ASM32-NEXT: bl .bar[PR] 90; ASM32-NEXT: nop 91; ASM32-NEXT: addi 1, 1, 80 92 93 94; ASM64: stdu 1, -144(1) 95; ASM64-NEXT: addi 3, 1, 120 96; ASM64-NEXT: bl .bar[PR] 97; ASM64-NEXT: nop 98; ASM64-NEXT: addi 1, 1, 144 99