projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4a5129c
)
add some other xforms that should be done as part of PR5783
author
Chris Lattner
<sabre@nondot.org>
Tue, 15 Dec 2009 09:05:13 +0000
(09:05 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Tue, 15 Dec 2009 09:05:13 +0000
(09:05 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91428
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/Scalar/SimplifyLibCalls.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Scalar/SimplifyLibCalls.cpp
b/lib/Transforms/Scalar/SimplifyLibCalls.cpp
index 0d03e55eba7644f17867d9b65ddf4a0fe8562199..6fd884bbd6da346398f351c1b18139bcf749118f 100644
(file)
--- a/
lib/Transforms/Scalar/SimplifyLibCalls.cpp
+++ b/
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