1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-23 04:52:54 +02:00
llvm-mirror/test/Transforms/LICM/call_sink_pure_function.ll
Duncan Sands 265752ae8f Ding dong, the DoesntAccessMemoryFns and
OnlyReadsMemoryFns tables are dead!  We
get more, and more accurate, information
from gcc via the readnone and readonly
function attributes.

llvm-svn: 44288
2007-11-23 19:30:27 +00:00

17 lines
350 B
LLVM

; 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
}