summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-12-15 09:05:13 +0000
committerChris Lattner <sabre@nondot.org>2009-12-15 09:05:13 +0000
commit24aba42d048463dba0db132b6fb13c012ed30f02 (patch)
treefc1929930c4a932baeb88949026ea5bdc0f49052 /llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp
parent4179fa03573f8d08f13497951e3024b1e5356561 (diff)
downloadbcm5719-llvm-24aba42d048463dba0db132b6fb13c012ed30f02.tar.gz
bcm5719-llvm-24aba42d048463dba0db132b6fb13c012ed30f02.zip
add some other xforms that should be done as part of PR5783
llvm-svn: 91428
Diffstat (limited to 'llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp b/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp
index 0d03e55eba7..6fd884bbd6d 100644
--- a/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp
+++ b/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp
@@ -2644,10 +2644,11 @@ bool SimplifyLibCalls::doInitialization(Module &M) {
// * strcspn("",a) -> 0
// * strcspn(s,"") -> strlen(a)
//
-// strstr:
+// strstr: (PR5783)
// * strstr(x,x) -> x
-// * strstr(s1,s2) -> offset_of_s2_in(s1)
-// (if s1 and s2 are constant strings)
+// * strstr(x, "") -> x
+// * strstr(x, "a") -> strchr(x, 'a')
+// * strstr(s1,s2) -> result (if s1 and s2 are constant strings)
//
// tan, tanf, tanl:
// * tan(atan(x)) -> x
OpenPOWER on IntegriCloud