summaryrefslogtreecommitdiffstats
path: root/test/Transforms/SimplifyLibCalls/StrStr.ll
diff options
context:
space:
mode:
authorrdivacky <rdivacky@FreeBSD.org>2010-07-13 17:19:57 +0000
committerrdivacky <rdivacky@FreeBSD.org>2010-07-13 17:19:57 +0000
commit9112829d76cbb8e0c8ef51bbc2d7d1be48cd7b74 (patch)
tree9de1c5f67a98cd0e73c60838396486c984f63ac2 /test/Transforms/SimplifyLibCalls/StrStr.ll
parent1e3dec662ea18131c495db50caccc57f77b7a5fe (diff)
downloadFreeBSD-src-9112829d76cbb8e0c8ef51bbc2d7d1be48cd7b74.zip
FreeBSD-src-9112829d76cbb8e0c8ef51bbc2d7d1be48cd7b74.tar.gz
Update LLVM to r108243.
Diffstat (limited to 'test/Transforms/SimplifyLibCalls/StrStr.ll')
-rw-r--r--test/Transforms/SimplifyLibCalls/StrStr.ll12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/Transforms/SimplifyLibCalls/StrStr.ll b/test/Transforms/SimplifyLibCalls/StrStr.ll
index 2cac2d4..eefd2e8 100644
--- a/test/Transforms/SimplifyLibCalls/StrStr.ll
+++ b/test/Transforms/SimplifyLibCalls/StrStr.ll
@@ -46,3 +46,15 @@ entry:
; CHECK: @test4
; CHECK: ret i8* %P
}
+
+define i1 @test5(i8* %P, i8* %Q) nounwind readonly {
+entry:
+ %call = tail call i8* @strstr(i8* %P, i8* %Q) nounwind ; <i8*> [#uses=1]
+ %cmp = icmp eq i8* %call, %P
+ ret i1 %cmp
+; CHECK: @test5
+; CHECK: [[LEN:%[a-z]+]] = call {{i[0-9]+}} @strlen(i8* %Q)
+; CHECK: [[NCMP:%[a-z]+]] = call {{i[0-9]+}} @strncmp(i8* %P, i8* %Q, {{i[0-9]+}} [[LEN]])
+; CHECK: icmp eq {{i[0-9]+}} [[NCMP]], 0
+; CHECK: ret i1
+}
OpenPOWER on IntegriCloud