aboutsummaryrefslogtreecommitdiff
path: root/test/Transforms/LICM/call_sink_pure_function.ll
blob: c0457a17fc4e6c5f9a919dca39a560f660bbab78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
; RUN: llvm-as < %s | opt -basicaa -licm | llvm-dis | %prcontext strlen 1 | grep Out:

declare i32 @strlen(i8*) readonly

declare void @foo()

define i32 @test(i8* %P) {
	br label %Loop

Loop:		; preds = %Loop, %0
	%A = call i32 @strlen( i8* %P ) readonly		; <i32> [#uses=1]
	br i1 false, label %Loop, label %Out

Out:		; preds = %Loop
	ret i32 %A
}