New testcases to test LICM of call instructions
[oota-llvm.git] / test / Transforms / LICM / call_sink_pure_function.ll
1 ; RUN: llvm-as < %s | opt -basicaa -licm | llvm-dis | grep -C1 strlen | grep Out: 
2 declare int %strlen(sbyte*)
3 declare void %foo()
4
5 int %test(sbyte* %P) {
6         br label %Loop
7
8 Loop:
9         %A = call int %strlen(sbyte* %P)   ;; Can hoist/sink call
10         br bool false, label %Loop, label %Out
11
12 Out:
13         ret int %A
14 }