mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-21 00:32:23 +00:00
e4dc717585
OnlyReadsMemoryFns tables are dead! We get more, and more accurate, information from gcc via the readnone and readonly function attributes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44288 91177308-0d34-0410-b5e6-96231b3b80d8
17 lines
350 B
LLVM
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
|
|
}
|