2 ; RUN: opt -inline -S -debug-only=inline-cost < %s 2>&1 | FileCheck %s
4 target datalayout = "E-m:e-i64:64-n32:64"
5 target triple = "powerpc64le-ibm-linux-gnu"
7 define i16 @outer1(i8* %ptr) {
8 %C = call i16 @inner1(i8* %ptr)
13 ; CHECK: Analyzing call of inner1
14 ; CHECK: NumInstructionsSimplified: 2
15 ; CHECK: NumInstructions: 3
16 define i16 @inner1(i8* %ptr) {
17 %L = load i8, i8* %ptr
18 %E = zext i8 %L to i16
22 define i32 @outer2(i8* %ptr) {
23 %C = call i32 @inner2(i8* %ptr)
28 ; CHECK: Analyzing call of inner2
29 ; CHECK: NumInstructionsSimplified: 2
30 ; CHECK: NumInstructions: 3
31 define i32 @inner2(i8* %ptr) {
32 %L = load i8, i8* %ptr
33 %E = zext i8 %L to i32
37 define i32 @outer3(i16* %ptr) {
38 %C = call i32 @inner3(i16* %ptr)
43 ; CHECK: Analyzing call of inner3
44 ; CHECK: NumInstructionsSimplified: 2
45 ; CHECK: NumInstructions: 3
46 define i32 @inner3(i16* %ptr) {
47 %L = load i16, i16* %ptr
48 %E = zext i16 %L to i32
52 define i32 @outer4(i16* %ptr) {
53 %C = call i32 @inner4(i16* %ptr)
58 ; CHECK: Analyzing call of inner4
59 ; CHECK: NumInstructionsSimplified: 2
60 ; CHECK: NumInstructions: 3
61 define i32 @inner4(i16* %ptr) {
62 %L = load i16, i16* %ptr
63 %E = sext i16 %L to i32
67 define i64 @outer5(i8* %ptr) {
68 %C = call i64 @inner5(i8* %ptr)
73 ; CHECK: Analyzing call of inner5
74 ; CHECK: NumInstructionsSimplified: 2
75 ; CHECK: NumInstructions: 3
76 define i64 @inner5(i8* %ptr) {
77 %L = load i8, i8* %ptr
78 %E = zext i8 %L to i64
82 define i64 @outer6(i16* %ptr) {
83 %C = call i64 @inner6(i16* %ptr)
88 ; CHECK: Analyzing call of inner6
89 ; CHECK: NumInstructionsSimplified: 2
90 ; CHECK: NumInstructions: 3
91 define i64 @inner6(i16* %ptr) {
92 %L = load i16, i16* %ptr
93 %E = zext i16 %L to i64
97 define i64 @outer7(i16* %ptr) {
98 %C = call i64 @inner7(i16* %ptr)
103 ; CHECK: Analyzing call of inner7
104 ; CHECK: NumInstructionsSimplified: 2
105 ; CHECK: NumInstructions: 3
106 define i64 @inner7(i16* %ptr) {
107 %L = load i16, i16* %ptr
108 %E = sext i16 %L to i64
112 define i64 @outer8(i32* %ptr) {
113 %C = call i64 @inner8(i32* %ptr)
118 ; CHECK: Analyzing call of inner8
119 ; CHECK: NumInstructionsSimplified: 2
120 ; CHECK: NumInstructions: 3
121 define i64 @inner8(i32* %ptr) {
122 %L = load i32, i32* %ptr
123 %E = zext i32 %L to i64
127 define i64 @outer9(i32* %ptr) {
128 %C = call i64 @inner9(i32* %ptr)
133 ; CHECK: Analyzing call of inner9
134 ; CHECK: NumInstructionsSimplified: 2
135 ; CHECK: NumInstructions: 3
136 define i64 @inner9(i32* %ptr) {
137 %L = load i32, i32* %ptr
138 %E = sext i32 %L to i64