diff options
author | dim <dim@FreeBSD.org> | 2012-04-14 13:54:10 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2012-04-14 13:54:10 +0000 |
commit | 1fc08f5e9ef733ef1ce6f363fecedc2260e78974 (patch) | |
tree | 19c69a04768629f2d440944b71cbe90adae0b615 /test/Transforms/SimplifyLibCalls/StrLen.ll | |
parent | 07637c87f826cdf411f0673595e9bc92ebd793f2 (diff) | |
download | FreeBSD-src-1fc08f5e9ef733ef1ce6f363fecedc2260e78974.zip FreeBSD-src-1fc08f5e9ef733ef1ce6f363fecedc2260e78974.tar.gz |
Vendor import of llvm trunk r154661:
http://llvm.org/svn/llvm-project/llvm/trunk@r154661
Diffstat (limited to 'test/Transforms/SimplifyLibCalls/StrLen.ll')
-rw-r--r-- | test/Transforms/SimplifyLibCalls/StrLen.ll | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/Transforms/SimplifyLibCalls/StrLen.ll b/test/Transforms/SimplifyLibCalls/StrLen.ll index 45b349d..acd8aaf 100644 --- a/test/Transforms/SimplifyLibCalls/StrLen.ll +++ b/test/Transforms/SimplifyLibCalls/StrLen.ll @@ -6,6 +6,7 @@ target datalayout = "e-p:32:32" @hello = constant [6 x i8] c"hello\00" ; <[6 x i8]*> [#uses=3] @null = constant [1 x i8] zeroinitializer ; <[1 x i8]*> [#uses=3] @null_hello = constant [7 x i8] c"\00hello\00" ; <[7 x i8]*> [#uses=1] +@nullstring = constant i8 0 declare i32 @strlen(i8*) @@ -54,3 +55,8 @@ define i1 @test7() { %ne_null = icmp ne i32 %null_l, 0 ; <i1> [#uses=1] ret i1 %ne_null } + +define i32 @test8() { + %len = tail call i32 @strlen(i8* @nullstring) nounwind + ret i32 %len +} |