aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/Inline/inline_dce.ll
blob: 5cb118f7283c2b1fcefd54449bda5405beca6b43 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
; This checks to ensure that the inline pass deletes functions if they get 
; inlined into all of their callers.

; RUN: llvm-upgrade < %s | llvm-as | opt -inline | llvm-dis | \
; RUN:   not grep %reallysmall

implementation

internal int %reallysmall(int %A) {
	ret int %A
}

void %caller1() {
	call int %reallysmall(int 5)
	ret void
}

void %caller2(int %A) {
	call int %reallysmall(int %A)
	ret void
}

int %caller3(int %A) {
	%B = call int %reallysmall(int %A)
	ret int %B
}