[llvm-commits] [llvm] r91428 - /llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp

Chris Lattner sabre at nondot.org
Tue Dec 15 01:05:16 PST 2009


Author: lattner
Date: Tue Dec 15 03:05:13 2009
New Revision: 91428

URL: http://llvm.org/viewvc/llvm-project?rev=91428&view=rev
Log:
add some other xforms that should be done as part of PR5783

Modified:
    llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp?rev=91428&r1=91427&r2=91428&view=diff

==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp Tue Dec 15 03:05:13 2009
@@ -2644,10 +2644,11 @@
 //   * 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





More information about the llvm-commits mailing list