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